使用说明
Matt的助理MCP服务器
一个整合的MCP服务器,提供71个工具,用于任务、内存、搜索、图像生成、GitHub、Vercel、HubSpot、Monday.com、n8n和谷歌日历。
为什么存在
之前: 12个以上的独立MCP,350多个工具膨胀的上下文,4台计算机上的配置同步噩梦。
之后: 1个统一的MCP,有大约71个专注的工具,数据库支持的状态,在任何地方都能正常工作。
快速开始
1.安装依赖项
cd assistant-mcp/server
npm install
2.配置环境
MCP的环境来自 .mcp.json 在项目根中。所需变量:
{
"assistant-mcp": {
"command": "npx",
"args": ["tsx", "src/index.ts"],
"cwd": "./assistant-mcp/server",
"env": {
"SUPABASE_URL": "https://your-project.supabase.co",
"SUPABASE_SERVICE_KEY": "your-service-key",
"ENCRYPTION_KEY": "your-32-byte-hex-key",
"MCP_AUTH_TOKEN": "mcp_live_your_token",
"NODE_ENV": "production",
"GOOGLE_OAUTH_CREDENTIALS": "/path/to/gcp-oauth.keys.json"
}
}
}
3.在Claude代码中启用
编辑 ~/.claude.json 并添加 "assistant-mcp" 到项目的 enabledMcpjsonServers 阵列。
4.重新启动克劳德代码
当Claude Code启动时,MCP会自动启动。
建筑
Claude Code ──► stdio ──► assistant-mcp ──► Supabase (State)
│
├── Brave Search API
├── Perplexity API
├── Gemini API (images)
├── GitHub API
├── Vercel API
├── HubSpot API
├── Monday.com API
├── n8n API
└── Google Calendar API
工具类别(共71个)
| 类别 | 计数 | 工具 |
|---|---|---|
| 元 | 4 | help, list_capabilities, server_status, tool_usage_stats |
| 任务 | 8 | list_tasks, get_task, create_task, update_task, complete_task, delete_task, urgent_tasks, process_inbox |
| 记忆 | 4 | save_memory, search_memory, recent_memories, delete_memory |
| 搜索 | 3 | web_search (勇敢), deep_research (困惑), quick_search (困惑) |
| 图像 | 2 | generate_image, edit_image (双子座2.0闪光灯) |
| GitHub | 4 | create_issue, create_pr, search_code, list_repos |
| 维塞尔 | 3 | deploy_site, list_deployments, get_deployment_url |
| HubSpot | 8 | hubspot_list_contacts, hubspot_get_contact, hubspot_create_contact, hubspot_list_deals, hubspot_create_deal, hubspot_list_companies, hubspot_search |
| Monday.com | 14 | monday_list_boards, monday_get_board, monday_list_items, monday_get_item, monday_create_item, monday_update_item, monday_create_update, monday_move_item, monday_archive_item, monday_delete_item, monday_search_items, monday_get_groups, monday_create_group |
| n8n | 14 | n8n_list_workflows, n8n_get_workflow, n8n_activate_workflow, n8n_execute_workflow, n8n_list_executions, n8n_get_execution, n8n_create_workflow, n8n_update_workflow, n8n_add_node, n8n_update_node, n8n_remove_node, n8n_delete_workflow, n8n_duplicate_workflow |
| 日历 | 7 | list_calendars, list_events, create_event, get_event, update_event, delete_event, get_freebusy |
凭证
API密钥加密存储在Subabase中。当前凭据:
| 服务 | 密钥名称 | 使用人 |
|---|---|---|
| 勇敢的搜索 | brave_search |
web_search |
| 困惑 | perplexity |
deep_research, quick_search |
| 双子座 | gemini |
generate_image, edit_image |
| GitHub | github |
create_issue, create_pr等等。 |
| Vercel | vercel |
deploy_site等等。 |
| HubSpot | hubspot |
全部 hubspot_* 工具 |
| Monday.com | monday |
全部 monday_* 工具 |
| n8n | n8n |
全部 n8n_* 工具 |
谷歌日历使用OAuth(存储在Supabase中的令牌 oauth_tokens 桌子)。
发展
项目结构
assistant-mcp/
├── server/
│ ├── src/
│ │ ├── index.ts # Main entry, tool loading, MCP server
│ │ ├── tools/ # Tool implementations
│ │ │ ├── meta.ts # help, list_capabilities, server_status
│ │ │ ├── tasks.ts # Task management
│ │ │ ├── memory.ts # Memory/persistence
│ │ │ ├── search.ts # Brave, Perplexity
│ │ │ ├── images.ts # Gemini image generation
│ │ │ ├── github.ts # GitHub API
│ │ │ ├── vercel.ts # Vercel deployments
│ │ │ ├── hubspot.ts # HubSpot CRM
│ │ │ ├── monday.ts # Monday.com boards
│ │ │ ├── n8n.ts # n8n workflows
│ │ │ └── calendar.ts # Google Calendar
│ │ ├── lib/
│ │ │ ├── encryption.ts # Credential storage/retrieval
│ │ │ ├── supabase.ts # Database client
│ │ │ └── logger.ts # Logging
│ │ ├── middleware/
│ │ │ └── auth.ts # API authentication
│ │ └── routes/
│ │ └── admin.ts # Admin API endpoints
│ ├── dist/ # Compiled JavaScript (generated)
│ └── package.json
├── cli/ # CLI management tool (optional)
├── admin-ui/ # React admin dashboard (optional)
├── ADD-INTEGRATION-GUIDE.md # How to add new services
├── DEPLOYMENT.md # Remote deployment guide
├── CHANGELOG.md # Version history
└── README.md # This file
添加新集成
看 附加说明-指南.md 获取分步说明。
快速摘要:
- 创建
server/src/tools/{service}.ts - 添加导入
server/src/index.tstoolModules数组 - 存储API密钥:使用
storeCredential('{service}', 'key') - 重新启动Claude代码
进行代码更改
重要提示: MCP现在使用 tsx 直接运行TypeScript。这意味着:
- 细微编辑 (更改现有工具中的逻辑)在下次MCP重启时生效
- 结构变化 (新文件、新导出)需要重新启动Claude Code
- 无手册
npm run build大多数变化都需要
如果未显示更改:
- 检查TypeScript错误:
npm run build - 完全重新启动Claude Code(而不仅仅是一个新的对话)
- 使用
/redeploy引导重启命令
脚本
npm start # Run with tsx (auto-compiles TypeScript)
npm run build # Compile TypeScript to JavaScript
npm run dev # Run with tsx watch mode (auto-reload)
npm run typecheck # Check types without compiling
HTTP管理员API
服务器还在端口9001上运行HTTP服务器进行管理:
| 端点 | 身份验证 | 描述 |
|---|---|---|
GET /health |
否 | 健康检查 |
GET /tools |
是 | 列出所有工具 |
POST /tools/call |
是 | 执行工具 |
POST /reload |
是 | 重建并重新加载工具 |
GET /admin/api/dashboard |
是 | 仪表板数据 |
GET /admin/api/credentials |
是 | 列出凭据 |
需要身份验证 Authorization: Bearer {MCP_AUTH_TOKEN} 头球
故障排除
MCP未出现在克劳德代码中
- 检查
.mcp.json语法是有效的JSON - 验证
~/.claude.json有"assistant-mcp"在enabledMcpjsonServers - 重新启动Claude代码
工具超时
- 检查Supabase连接:
server_status工具 - 验证是否存储了API凭据
- 检查网络问题
代码更改不起作用
- 重新启动Claude Code(MCP进程将旧代码保留在内存中)
- 如果仍然损坏,请检查TypeScript错误:
npm run build - 检查服务器日志中的加载错误
找不到凭据错误
将凭据存储在Supabase中:
import { storeCredential } from './lib/encryption.js';
await storeCredential('service_name', 'your-api-key');
多计算机设置
此文件夹通过OneDrive同步。每台机器所需的设置:
npm install在server/目录- 启用
"assistant-mcp"在~/.claude.json - 对于日历:每台机器运行一次OAuth流
安全
- 使用AES-256-GCM加密的API密钥
- 按凭证盐
- 加密存储的OAuth令牌
- 代码或日志中没有明文秘密
许可证
麻省理工学院
