AgentHubAgentHub

DB MCP Server

MCP ServerMCP Registry官方收录

io.github.stucchi/db · v1.2.1

Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.

概览

DB MCP Server 是一个MCP Server,收录自 官方 MCP Registry。支持 stdio 传输。本页提供 Cursor、Claude Code 等客户端的安装配置片段。

安装

选择你的平台查看安装方式

{
  "mcpServers": {
    "db": {
      "command": "uvx",
      "args": [
        "db-mcp-server"
      ],
      "env": {
        "DB_TYPE": "<DB_TYPE>",
        "DB_DATABASE": "<DB_DATABASE>"
      }
    }
  }
}

环境变量

DB_TYPE必填

Database type

DB_DATABASE必填

Database name

DB_MODE可选

Access mode

DB_HOST可选

Database host (MySQL/PostgreSQL)

DB_PORT可选

Database port (MySQL: 3306, PostgreSQL: 5432)

DB_USER可选

Database user (MySQL default: root, PostgreSQL default: postgres)

DB_PASSWORD可选secret

Database password (MySQL/PostgreSQL, optional)

DB_URL可选secret

MongoDB connection URL (required for MongoDB, e.g. mongodb://...)

SSH_HOST可选

SSH bastion host for tunneling (MySQL/PostgreSQL only)

SSH_PORT可选

SSH port

SSH_USER可选

SSH username (default: current OS user)

SSH_KEY可选

Path to SSH private key (e.g. ~/.ssh/id_rsa)

SSH_PASSWORD可选secret

SSH password (if no key provided)

相关资源

统一 Manifest

{
  "id": "io.github.stucchi/db",
  "type": "mcp-server",
  "version": "1.2.1",
  "displayName": "DB MCP Server",
  "description": "Database MCP server for MySQL, PostgreSQL, MongoDB, and SQLite with SSH tunneling support.",
  "repository": {
    "url": "https://github.com/stucchi/db-mcp-server",
    "source": "github"
  },
  "distribution": {
    "packages": [
      {
        "registryType": "pypi",
        "identifier": "db-mcp-server",
        "version": "1.2.1",
        "transport": "stdio",
        "environmentVariables": [
          {
            "name": "DB_TYPE",
            "description": "Database type",
            "isRequired": true
          },
          {
            "name": "DB_DATABASE",
            "description": "Database name",
            "isRequired": true
          },
          {
            "name": "DB_MODE",
            "description": "Access mode"
          },
          {
            "name": "DB_HOST",
            "description": "Database host (MySQL/PostgreSQL)"
          },
          {
            "name": "DB_PORT",
            "description": "Database port (MySQL: 3306, PostgreSQL: 5432)"
          },
          {
            "name": "DB_USER",
            "description": "Database user (MySQL default: root, PostgreSQL default: postgres)"
          },
          {
            "name": "DB_PASSWORD",
            "description": "Database password (MySQL/PostgreSQL, optional)",
            "isSecret": true
          },
          {
            "name": "DB_URL",
            "description": "MongoDB connection URL (required for MongoDB, e.g. mongodb://...)",
            "isSecret": true
          },
          {
            "name": "SSH_HOST",
            "description": "SSH bastion host for tunneling (MySQL/PostgreSQL only)"
          },
          {
            "name": "SSH_PORT",
            "description": "SSH port"
          },
          {
            "name": "SSH_USER",
            "description": "SSH username (default: current OS user)"
          },
          {
            "name": "SSH_KEY",
            "description": "Path to SSH private key (e.g. ~/.ssh/id_rsa)"
          },
          {
            "name": "SSH_PASSWORD",
            "description": "SSH password (if no key provided)",
            "isSecret": true
          }
        ]
      }
    ],
    "remotes": []
  },
  "dependencies": [],
  "installTargets": [
    "claude-code",
    "claude-desktop",
    "cursor",
    "vscode"
  ],
  "keywords": [],
  "provenance": {
    "origin": "official-mcp-registry",
    "originalId": "io.github.stucchi/db",
    "originalUrl": "https://registry.modelcontextprotocol.io/v0.1/servers/io.github.stucchi%2Fdb/versions/latest",
    "isOfficial": true,
    "status": "active"
  }
}
DB MCP Server — MCP Server 安装与配置 · AgentHub