使用说明
盐MCP服务器
一个统一的MCP(模型上下文协议)服务器,为GitHub、Stripe、Supabase、AWS Route53和Asana提供工具。
快速开始
# Clone and setup
git clone <repo-url>
cd salt-mcp-server
node scripts/setup.js
# Edit credentials
# Edit .env with your API keys (see Configuration below)
# Add to Claude Desktop (see Claude Desktop Setup below)
先决条件
- Node.js 20+ — 下载
- pnpm --由安装脚本自动安装
配置
复制 .env.example 到 .env 并填写您的凭据:
| 服务 | 环境变量 | 如何获取 |
|---|---|---|
| GitHub | GITHUB_TOKEN |
GitHub设置→ 代币 |
| 条纹 | STRIPE_SECRET_KEY |
条纹仪表板→ API密钥 |
| Supabase | SUPABASE_URL, SUPABASE_SERVICE_KEY |
Supabase仪表板→ 设置→ API |
| AWS路由53 | AWS_ACCESS_KEY_ID, AWS_SECRET_ACCESS_KEY |
AWS IAM控制台 |
| Asana | ASANA_ACCESS_TOKEN |
Asana开发者控制台 |
备注:您只需要计划使用的集成的凭据。
Supabase凭据
- 去你的 Supabase仪表板
- 选择您的项目
- 导航至 项目设置 → API
- 副本:
- 项目Url →
SUPABASE_URL - service_role 密钥→
SUPABASE_SERVICE_KEY(⚠️ 永远不要公开曝光)
- 项目Url →
Asana访问令牌
- 首选 Asana开发者控制台
- 点击 创建新令牌
- 命名它(例如“MCP服务器”)并立即复制令牌
Claude桌面设置
将以下内容添加到您的Claude Desktop配置中:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
视窗: %APPDATA%\Claude\claude_desktop_config.json
所有集成
{
"mcpServers": {
"salt": {
"command": "node",
"args": ["/absolute/path/to/salt-mcp-server/servers/gateway/dist/index.js"]
}
}
}
选择性整合
仅启用特定集成:
{
"mcpServers": {
"salt": {
"command": "node",
"args": [
"/absolute/path/to/salt-mcp-server/servers/gateway/dist/index.js",
"--integrations=github,asana"
]
}
}
}
只读模式
对于只应具有读取权限的团队成员:
{
"mcpServers": {
"salt": {
"command": "node",
"args": [
"/absolute/path/to/salt-mcp-server/servers/gateway/dist/index.js",
"--readonly"
]
}
}
}
混合权限
每个集成有不同的权限级别:
{
"mcpServers": {
"salt": {
"command": "node",
"args": [
"/absolute/path/to/salt-mcp-server/servers/gateway/dist/index.js",
"--github=full",
"--stripe=readonly",
"--route53=none"
]
}
}
}
可用工具
GitHub(11个工具)
| 工具 | 类型 | 描述 |
|---|---|---|
github_list_repos |
read | 列出存储库 |
github_get_repo |
read | 获取存储库详细信息 |
github_list_issues |
read | 列出问题 |
github_create_issue |
写 | 创建问题 |
github_list_prs |
read | 列出拉取请求 |
github_get_pr |
阅读 | 获取PR详细信息 |
github_create_pr |
write | 创建拉取请求 |
github_merge_pr |
write | 合并拉取请求 |
github_list_branches |
read | 列出分支 |
github_get_file |
read | 获取文件内容 |
github_search_code |
read | 搜索代码 |
条纹(11工具)
| 工具 | 类型 | 描述 |
|---|---|---|
stripe_list_customers |
read | 列出客户 |
stripe_get_customer |
read | 获取客户详细信息 |
stripe_create_customer |
写 | 创建客户 |
stripe_list_subscriptions |
read | 列出订阅 |
stripe_get_subscription |
read | 获取订阅详细信息 |
stripe_cancel_subscription |
write | 取消订阅 |
stripe_list_invoices |
read | 列出发票 |
stripe_list_payments |
read | 列出付款 |
stripe_get_balance |
read | 获取账户余额 |
stripe_list_products |
read | 列出产品 |
stripe_list_prices |
read | 列出价格 |
Supabase(10个工具)
| 工具 | 类型 | 描述 |
|---|---|---|
supabase_list_tables |
read | 列出数据库表 |
supabase_query |
read | 执行SELECT查询 |
supabase_insert |
write | 插入行 |
supabase_update |
write | 更新行 |
supabase_delete |
write | 删除行 |
supabase_rpc |
write | 调用数据库函数 |
supabase_list_buckets |
read | 列出存储桶 |
supabase_list_files |
read | 列出bucket中的文件 |
supabase_get_user |
read | 按ID获取用户 |
supabase_list_users |
read | 列出用户 |
AWS Route53(8个工具)
| 工具 | 类型 | 描述 |
|---|---|---|
route53_list_hosted_zones |
read | 列出托管区域 |
route53_get_hosted_zone |
read | 获取区域详细信息 |
route53_list_records |
read | 列出DNS记录 |
route53_get_record |
read | 获取特定记录 |
route53_create_record |
write | 创建DNS记录 |
route53_update_record |
write | 更新DNS记录 |
route53_delete_record |
write | 删除DNS记录 |
route53_list_health_checks |
read | 列出健康检查 |
Asana(10工具)
| 工具 | 类型 | 描述 |
|---|---|---|
asana_list_workspaces |
read | 列出工作区 |
asana_list_projects |
read | 列出项目 |
asana_get_project |
read | 获取项目详细信息 |
asana_list_tasks |
read | 列出任务 |
asana_get_task |
read | 获取任务详细信息 |
asana_create_task |
write | 创建任务 |
asana_update_task |
write | 更新任务 |
asana_add_comment |
write | 向任务添加注释 |
asana_list_sections |
read | 列出部分 |
asana_move_task |
write | 将任务移动到分区 |
CLI选项
--integrations=LIST Enable specific integrations (comma-separated)
--exclude=LIST Disable specific integrations
--readonly Enable read-only mode globally
--<integration>=LEVEL Set permission level (full/readonly/none)
--help Show help message
发展
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Build in watch mode
pnpm dev
# Run linting
pnpm lint
# Run tests
pnpm test
添加新集成
- 创建新目录:
servers/<integration-name>/ - 添加
package.json和@salt/shared依赖 - 创建
src/index.ts出口atools数组 - 将集成添加到
servers/gateway/package.json - 在中导入和注册工具
servers/gateway/src/index.ts
故障排除
| 问题 | 解决方案 |
|---|---|
| 工具未出现在Claude中 | 完全退出并重新打开Claude Desktop |
| “找不到模块”错误 | 运行 pnpm build |
| “缺少GITHUB_TOKEN” | 将凭据添加到 .env 或Claude配置 |
| “不支持Node.js版本” | 安装Node.js 20+ |
| “pnpm:找不到命令” | 运行 npm install -g pnpm |
| Windows:“无法加载pnpms.ps” | 运行 Set-ExecutionPolicy -Scope CurrentUser RemoteSigned |
许可证
麻省理工学院