Vedic Astro API文档MCP服务器
简洁的MCP服务器公开工具,用于快速发现路由、检查端点参数和查看示例响应。
工具
- list_routes:返回所有可用的路线路径。
- search_routes:对路线进行强有力的搜索(标记化的、模糊的子字符串,以及“行星细节”、“马哈达沙”等同义词)。
- check_endpoint:显示URL、方法和参数模式(类型、示例、选项)。
- 检查响应:显示路由的示例响应JSON。
设置
很简单: 只需将此仓库保存在本地,并在MCP客户端配置中指向它。
1.在本地保存回购
将此存储库克隆或下载到计算机上的任何位置:
git clone
cd documentation-MCP或者简单地下载并解压缩到文件夹中。
2.安装和构建(一次性)
npm install
npm run build这将创建 build/ 已编译服务器的目录。
3.配置您的MCP客户端
将此添加到您的Claude Desktop配置文件中:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json\ 窗户: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"vedicastroapi-documentation": {
"command": "node",
"args": [
"/absolute/path/to/documentation-MCP/build/index.js"
]
}
}
}重要提示: 替换 /absolute/path/to/documentation-MCP 保存仓库的实际绝对路径。
4.重新启动MCP客户端
重新启动Claude Desktop(或您的MCP客户端)以加载服务器。
验证
- 在客户端中查找MCP连接指示器。
- 你应该看到这样的工具
list_routes,search_routes,check_endpoint,check_response可用。
测试工具
尝试以下提示:
- “列出所有路线”
- “查找行星详细信息的路线”
- “参数/预测/每日日照”
- “回复/星座/行星详细信息”
故障排除
- 确保配置中的绝对路径正确。
- 确认
build/index.js建成后存在。 - 必要时重新安装和重建:
rm -rf build node_modules
npm install
npm run build用法
- 列出路线:“列出所有路线”
- 搜索路线:“查找行星详细信息的路线”,“搜索马哈达沙路线”
- 端点参数:“用于/预测/每日日照的参数”
- 示例响应:“对/星座/行星详细信息的响应”
发展
# Watch mode for development
npm run watch
# Build for production
npm run build构建笔记
- 之后
npm install,跑npm run build将TypeScript编译为build/. - 你应该看看
build/index.js以及工具文件build/tools/.
项目结构(简洁)
documentation-MCP/
├── src/
│ ├── index.ts # Server entry
│ ├── types.ts # Shared types
│ ├── global.d.ts # Decls for .cjs data
│ └── tools/
│ ├── searchRoutes.ts # search_routes (tokenized + synonyms)
│ ├── checkEndpoint.ts # check_endpoint
│ └── checkResponse.ts # check_response
├── routes.cjs # List of all API routes
├── endpoints_new_copy.cjs # Endpoint details with parameters
├── url_responses_by_category.cjs # Response examples
├── build/ # Compiled JavaScript (generated by tsc)
├── package.json
├── tsconfig.json
└── README.md备注
- 路线搜索支持同义词(例如,“行星详细信息”→ 星座终点;“马哈达沙”→ dashas端点)。
- 如果搜索没有返回任何结果,请尝试使用更简单的关键字;您始终可以运行listroutes来扫描完整列表。
- ⚠️ 重要的是,AI可能会犯错误: 要求它使用这些工具来访问API,检查真实的响应,然后根据它看到的内容进行编辑。 您仍然应该查看更改。
IDE集成
看 docs/IDE_INTEGRATIONS.md 有关在VS Code、Cursor、PhpStorm、Zed和Neovim中连接此MCP服务器的步骤。
数据源
routes.cjs-路线列表endpoints_new_copy.cjs-端点参数url_responses_by_category.cjs-响应示例
许可证
麻省理工学院
