我的 20+ 真正实用的 MCP 服务器配置合集

20+ 实用 MCP 服务器配置大全

本文汇集了 20+ 个经过验证的实用 MCP 服务器配置。无论你使用的是 Claude Code、Codex 还是 Gemini CLI,都可以在这里找到对应的配置代码。

使用说明:点击下方的标签页(Tab)切换不同工具的配置格式。

Claude Code:通常修改 claude.json 或使用 claude mcp add 命令。

Codex:修改 config.toml 文件。

Gemini CLI:修改 settings.json 或使用 gemini mcp add 命令。


模块一:系统与文件控制 (基础必选)

1. Filesystem (本地文件系统)

允许 AI 读写你电脑上的文件。必装推荐,注意,这里的文件路径需要改为你自己的,路径代表了大模型调用MCP可以访问的具体路径,如果没有路径,大模型没有任何权限可以访问到电脑盘的文件

配置 (claude.json)

1
2
3
4
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "D:\\", "C:\\Users\\Prorise\\Desktop"]
}

命令

1
claude mcp add filesystem -- npx -y @modelcontextprotocol/server-filesystem "D:/" "C:/Users/Prorise/Desktop"

配置 (config.toml)

1
2
3
[mcp_servers.filesystem]
command = "npx.cmd"
args = ["-y", "@modelcontextprotocol/server-filesystem", "D:\\", "C:\\Users\\Prorise\\Desktop"]

配置 (settings.json)

1
2
3
4
"filesystem": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-filesystem", "D:\\", "C:\\Users\\Prorise\\Desktop"]
}

2. Everything Search (全盘秒搜)

功能:调用 Everything 引擎瞬间找到文件(Windows 专用)。
注意:需下载 Everything SDK 并配置 DLL 路径。

3. Fetch (网页读取)

允许 AI 将网页内容转换为 Markdown 读取,适合联网获取信息。

1
2
3
4
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}
1
2
3
[mcp_servers.fetch]
command = "uvx"
args = ["mcp-server-fetch"]
1
2
3
4
"fetch": {
"command": "uvx",
"args": ["mcp-server-fetch"]
}

模块二:Git 与 容器管理 (开发者标配)

4. GitHub (代码仓库)

管理 Issue、PR、搜索代码。需配置 Token,配置Token可以问问大模型

HTTP 方式 (推荐)

1
claude mcp add --transport http github --scope user https://api.githubcopilot.com/mcp/
1
2
3
4
5
[mcp_servers.github]
command = "npx.cmd"
args = ["-y", "@modelcontextprotocol/server-github"]
[mcp_servers.github.env]
GITHUB_PERSONAL_ACCESS_TOKEN = "ghp_xxxxxxxxxxxxxxxxxxxx"
1
2
3
4
5
6
7
"github": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-github"],
"env": {
"GITHUB_PERSONAL_ACCESS_TOKEN": "ghp_xxxxxxxxxxxxxxxxxxxx"
}
}

5. Docker (容器管理)

管理本地 Docker 容器和镜像。

1
2
3
4
"docker": {
"command": "npx",
"args": ["-y", "mcp-server-docker"]
}
1
2
3
[mcp_servers.docker]
command = "npx.cmd"
args = ["-y", "mcp-server-docker"]
1
2
3
4
"docker": {
"command": "npx",
"args": ["-y", "mcp-server-docker"]
}

6. Git (本地 Git)

操作本地 Git 仓库(add, commit, push, diff)。

1
2
3
4
"git": {
"command": "npx",
"args": ["-y", "mcp-server-git"]
}
1
2
3
[mcp_servers.git]
command = "npx.cmd"
args = ["-y", "mcp-server-git"]
1
2
3
4
"git": {
"command": "npx",
"args": ["-y", "mcp-server-git"]
}

模块三:后端与数据库

7. PostgreSQL (数据库)

连接 Postgres 数据库执行 SQL。

1
2
3
4
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost:5432/db"]
}
1
2
3
[mcp_servers.postgres]
command = "npx.cmd"
args = ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost:5432/db"]
1
2
3
4
"postgres": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-postgres", "postgresql://user:pass@localhost:5432/db"]
}

8. MySQL (数据库)

1
2
3
4
5
6
7
8
9
10
"mysql": {
"command": "npx",
"args": ["-y", "@benborla29/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_PASS": "password",
"MYSQL_DB": "test"
}
}
1
2
3
4
5
6
7
8
[mcp_servers.mysql]
command = "npx.cmd"
args = ["-y", "@benborla29/mcp-server-mysql"]
[mcp_servers.mysql.env]
MYSQL_HOST = "localhost"
MYSQL_USER = "root"
MYSQL_PASS = "password"
MYSQL_DB = "test"
1
2
3
4
5
6
7
8
9
10
"mysql": {
"command": "npx",
"args": ["-y", "@benborla29/mcp-server-mysql"],
"env": {
"MYSQL_HOST": "localhost",
"MYSQL_USER": "root",
"MYSQL_PASS": "password",
"MYSQL_DB": "test"
}
}

9. Redis (缓存)

1
2
3
4
"redis": {
"command": "npx",
"args": ["-y", "@pickstar-2002/redis-mcp@latest", "--host", "localhost", "--port", "6379"]
}
1
2
3
[mcp_servers.redis]
command = "npx.cmd"
args = ["-y", "@pickstar-2002/redis-mcp@latest", "--host", "localhost", "--port", "6379"]
1
2
3
4
"redis": {
"command": "npx",
"args": ["-y", "@pickstar-2002/redis-mcp@latest", "--host", "localhost", "--port", "6379"]
}

10. Supabase (云服务)

1
2
3
4
5
"supabase": {
"command": "npx",
"args": ["-y", "@supabase/mcp-server-supabase", "--project-ref", "your-project-ref"],
"env": { "SUPABASE_ACCESS_TOKEN": "your-token" }
}
1
2
3
4
5
[mcp_servers.supabase]
command = "npx.cmd"
args = ["-y", "@supabase/mcp-server-supabase", "--project-ref", "your-project-ref"]
[mcp_servers.supabase.env]
SUPABASE_ACCESS_TOKEN = "your-token"
1
2
3
4
5
"supabase": {
"command": "npx",
"args": ["-y", "@supabase/mcp-server-supabase", "--project-ref", "your-project-ref"],
"env": { "SUPABASE_ACCESS_TOKEN": "your-token" }
}

11. SQLite (轻量级数据库)

1
2
3
4
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "test.db"]
}
1
2
3
[mcp_servers.sqlite]
command = "uvx"
args = ["mcp-server-sqlite", "--db-path", "test.db"]
1
2
3
4
"sqlite": {
"command": "uvx",
"args": ["mcp-server-sqlite", "--db-path", "test.db"]
}

模块四:浏览器自动化

12. Chrome DevTools (浏览器控制)

1
2
3
4
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp"]
}
1
2
3
[mcp_servers.chrome_devtools]
command = "npx.cmd"
args = ["-y", "chrome-devtools-mcp"]
1
2
3
4
"chrome-devtools": {
"command": "npx",
"args": ["-y", "chrome-devtools-mcp"]
}

13. Playwright (自动化测试)

1
2
3
4
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp"]
}
1
2
3
[mcp_servers.playwright]
command = "npx.cmd"
args = ["-y", "@playwright/mcp"]
1
2
3
4
"playwright": {
"command": "npx",
"args": ["-y", "@playwright/mcp"]
}

14. Puppeteer (爬虫)

1
2
3
4
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}
1
2
3
[mcp_servers.puppeteer]
command = "npx.cmd"
args = ["-y", "@modelcontextprotocol/server-puppeteer"]
1
2
3
4
"puppeteer": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-puppeteer"]
}

模块五:AI 增强与实用工具

15. Sequential Thinking (深度思考)

强力推荐:让 AI 具备分步骤思考能力,解决复杂问题。

1
2
3
4
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}
1
2
3
[mcp_servers.sequential_thinking]
command = "npx.cmd"
args = ["-y", "@modelcontextprotocol/server-sequential-thinking"]
1
2
3
4
"sequential-thinking": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-sequential-thinking"]
}

16. Excel (表格处理)

1
2
3
4
5
"excel": {
"command": "npx",
"args": ["-y", "@zhiweixu/excel-mcp-server"],
"env": { "LOG_PATH": "E:\\excel.txt" }
}
1
2
3
4
5
[mcp_servers.excel]
command = "npx.cmd"
args = ["--yes", "@zhiweixu/excel-mcp-server"]
[mcp_servers.excel.env]
LOG_PATH = "E:\\ExcelLog\\excel.txt"
1
2
3
4
5
"excel": {
"command": "npx",
"args": ["-y", "@zhiweixu/excel-mcp-server"],
"env": { "LOG_PATH": "E:\\excel.txt" }
}

17. Magic (前端UI套件)

这是一个大模型支持度高的UI套件,包括动画,组件等,访问21st.dev: The first vibe-crafting tool 可以获取到对应的API_KEY

1
2
3
4
5
"magic": {
"command": "npx",
"args": ["-y", "@21st-dev/magic"],
"env": { "API_KEY": "sk_..." }
}
1
2
3
4
5
[mcp_servers.magic]
command = "npx.cmd"
args = ["-y", "@21st-dev/magic@latest"]
[mcp_servers.magic.env]
API_KEY = "sk_..."
1
2
3
4
5
"magic": {
"command": "npx",
"args": ["-y", "@21st-dev/magic"],
"env": { "API_KEY": "sk_..." }
}

模块六:生产力工具 (Notion/Slack/Sentry)

18. Notion (笔记)

1
claude mcp add --transport http notion https://mcp.notion.com/mcp
1
2
3
"notion": {
"url": "https://mcp.notion.com/mcp"
}

19. Sentry (监控)

1
2
3
4
"sentry": {
"command": "python",
"args": ["-m", "mcp_server_sentry", "--auth-token", "your-token"]
}
1
2
3
[mcp_servers.sentry]
command = "python"
args = ["-m", "mcp_server_sentry", "--auth-token", "your-token"]
1
2
3
4
"sentry": {
"command": "python",
"args": ["-m", "mcp_server_sentry", "--auth-token", "your-token"]
}

20. Slack (通讯)

1
2
3
4
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"]
}
1
2
3
[mcp_servers.slack]
command = "npx.cmd"
args = ["-y", "@modelcontextprotocol/server-slack"]
1
2
3
4
"slack": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-slack"]
}

模块七:其他实用工具

21. Time (时间工具)

让 AI 获取精确的当前时间。

1
2
3
4
"time": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-time"]
}
1
2
3
[mcp_servers.time]
command = "npx.cmd"
args = ["-y", "@modelcontextprotocol/server-time"]
1
2
3
4
"time": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-time"]
}

22. Memory (记忆)

为 AI 提供简单的键值对记忆存储。

1
2
3
4
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}
1
2
3
[mcp_servers.memory]
command = "npx.cmd"
args = ["-y", "@modelcontextprotocol/server-memory"]
1
2
3
4
"memory": {
"command": "npx",
"args": ["-y", "@modelcontextprotocol/server-memory"]
}