canonical-vault-mcp-server
canonical-vault-mcp-server
只读 MCP 服务器,将 canonical-vault GitHub 仓库暴露给任何 MCP 客户端 —— GitHub Copilot、Claude,或任何支持 Streamable HTTP MCP 的客户端。
五个工具,全部只读,全部限定于 kushkillerjsixx66/canonical-vault:
工具 | 用途 |
| 列出指定路径下的文件/目录 |
| 获取文件的解码后文本内容 |
| 谱系 —— 指定路径的提交历史 |
| 单个提交的完整详情 + 差异统计 |
| 跨仓库代码搜索 |
此服务器有意不包含任何写入工具 —— 这里没有任何东西可以提交、推送或修改 vault。
1. 部署到 Vercel
npm install -g vercel # if you don't have it
cd canonical-vault-mcp-server
vercel login
vercel接受默认设置(Vercel 会自动将 api/mcp.ts 检测为 Node 无服务器函数)。运行 vercel --prod 后,你会得到一个类似这样的 URL:
https://canonical-vault-mcp-server.vercel.app你的 MCP 端点是:
https://canonical-vault-mcp-server.vercel.app/api/mcp环境变量(在 Vercel 控制台 → 设置 → 环境变量中设置)
变量 | 必需 | 默认值 | 备注 |
| 强烈建议 | 无 | 具有 |
| 否 |
| 仅在仓库迁移时更改 |
| 否 |
| 仅在仓库重命名时更改 |
| 否 |
| 未提供 |
添加环境变量后,重新部署(vercel --prod),以便函数读取到它们。
Related MCP server: github-mcp-tool
2. 将 GitHub Copilot 连接到它
Copilot(在 VS Code 中,以及 Copilot 编码代理)会从工作区中的 .vscode/mcp.json 或 VS Code 的全局 MCP 设置中读取 MCP 服务器配置。添加:
{
"servers": {
"canonical-vault": {
"type": "http",
"url": "https://canonical-vault-mcp-server.vercel.app/api/mcp"
}
}
}然后在 VS Code 中:命令面板 → "MCP: List Servers" → canonical-vault → 启动。Copilot Chat 会自动识别这五个 vault_* 工具,并可在代理模式下调用它们。
对于 Copilot 的远程编码代理(非 VS Code 本地),同一个 URL 可以注册到 github.com 上你组织的 MCP 服务器设置中,无论你的套餐中 Copilot 代理 MCP 配置位于何处 —— 这部分由 GitHub 负责,与本服务器无关。
3. 本地测试(部署之前)
npm install
npm run build
npx @modelcontextprotocol/inspector node dist/index.js这会打开 MCP Inspector UI,你可以在将 Copilot 接入之前,针对实时仓库手动调用每个工具。
要在本地测试 HTTP 路径而不是 stdio:
npm install -g vercel
vercel dev
# endpoint: http://localhost:3000/api/mcp设计选择说明
无状态按请求传输:
api/mcp.ts在每次 POST 时都会创建一个全新的McpServer+StreamableHTTPServerTransport。这是无服务器架构的正确模式 —— Vercel 函数在调用之间不会保留内存,因此无需维护会话,而且可以避免两个调用者同时访问端点时发生请求 ID 冲突。谱系 = 提交历史,而非自定义概念 ——
vault_get_file_history实际上就是GET /commits?path=...,这是将"谱系"映射到 GitHub API 实际提供能力的最忠实方式。如果你的 vault 谱系链概念(治理/vault 流水线)需要更具体的内容 —— 例如读取位于仓库内的谱系清单文件 —— 那么更好的做法是让vault_get_file直接指向该清单,而不是由我们重新实现 git 历史。按你的要求设计为只读 —— 此服务器无法写入 canonical-vault。如果你之后希望 Copilot 提交回写(例如通过 PR),那需要单独一套带有真正破坏性操作审查的写入工具,而不是悄悄附加的功能。
搜索注意事项:GitHub 的代码搜索 API 只索引默认分支,并且有自身的传播延迟 —— 几秒前刚提交的文件可能还不会出现在
vault_search_files中。vault_get_file和vault_list_directory始终反映实时文件树。
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables GitHub API integration via MCP, allowing search, repository details, file contents, and issue management.452ISC
- FlicenseNot gradedqualityDmaintenanceEnables managing GitHub repositories, files, and user information through MCP, with support for creating, updating, and deleting repository contents, as well as fetching user profiles.1
- FlicenseNot gradedqualityCmaintenanceRead-only MCP server for the GitHub REST API that enables agents to query repositories, issues, files, and users without any write access.
- FlicenseNot gradedqualityBmaintenanceEnables read-only access to GitLab projects, files, directories, and merge requests through MCP tools.
Related MCP Connectors
A MCP server built for developers enabling Git based project management with project and personal…
Scan any public GitHub MCP-server repo for security issues. 37 MCP-specific L1 rules, 8 languages.
An MCP server that gives your AI access to the source code and docs of all public github repos
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/kushkillerjsixx66/canonical-vault-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server