# 添加用户 server claude mcp add --transport http hubspot --scope user https://mcp.hubspot.com/anthropic
选择正确的范围
本地范围:个人 servers、实验配置或特定于一个项目的敏感凭据
项目范围:团队共享的 servers、项目特定的工具或协作所需的服务
用户范围:跨多个项目需要的个人实用程序、开发工具或经常使用的服务
实际示例
连接到 Sentry 监控错误
1 2 3 4 5 6 7 8 9 10
# 1. 添加 Sentry MCP server claude mcp add --transport http sentry https://mcp.sentry.dev/mcp
# 2. 使用 /mcp 对您的 Sentry 帐户进行身份验证 /mcp
# 3. 调试生产问题 "What are the most common errors in the last 24 hours?" "Show me the stack trace for error ID abc123" "Which deployment introduced these new errors?"
连接到 GitHub 进行代码审查
1 2 3 4 5 6 7 8 9 10
# 1. 添加 GitHub MCP server claude mcp add --transport http github https://api.githubcopilot.com/mcp/
# 2. 在 Claude Code 中进行身份验证 /mcp
# 3. 现在您可以要求 Claude 使用 GitHub "Review PR #456 and suggest improvements" "Create a new issue for the bug we just found" "Show me all open PRs assigned to me"
查询 PostgreSQL 数据库
1 2 3 4 5 6 7 8
# 1. 使用您的连接字符串添加数据库 server claude mcp add --transport stdio db -- npx -y @bytebase/dbhub \ --dsn "postgresql://readonly:[email protected]:5432/analytics"
# 2. 自然地查询您的数据库 "What's our total revenue this month?" "Show me the schema for the orders table" "Find customers who haven't made a purchase in 90 days"
使用远程 MCP servers 进行身份验证
OAuth 2.0 身份验证
添加需要身份验证的 server:
1
claude mcp add --transport http sentry https://mcp.sentry.dev/mcp