A server that enables AI models like Claude to directly interact with YCloud WhatsApp API through natural language, automatically generating tools from the OpenAPI specification.
English | 中文
这是一个基于Model Context Protocol (MCP)构建的YCloud WhatsApp API服务器。它能够自动从YCloud WhatsApp OpenAPI规范中生成工具,让AI模型(如Claude)可以直接与YCloud WhatsApp API交互。
在使用此服务器之前,您需要:
# 克隆仓库 git clone https://github.com/YCloud-Developers/ycloud-whatsapp-mcp-server.git cd ycloud-whatsapp-mcp-server # 安装依赖 npm install # 构建项目 npm run build
要使用YCloud API,您需要一个API密钥进行身份验证:
API密钥应作为请求头 X-API-Key
包含在所有API请求中。
您可以通过以下环境变量配置服务器:
API_BASE_URL
: YCloud API的基础URL(默认:https://api.ycloud.com/v2)OPENAPI_SPEC_PATH
: OpenAPI规范的路径或URL(默认:https://docs.ycloud.com/openapi.json)API_HEADERS
: API请求头(格式:key1:value1,key2:value2)要在Claude桌面应用中使用此服务器,请编辑Claude配置文件:
找到或创建Claude桌面配置文件:
~/Library/Application Support/Claude/claude_desktop_config.json
%APPDATA%\Claude\claude_desktop_config.json
添加以下配置:
{ "mcpServers": { "ycloud-whatsapp": { "command": "node", "args": ["path/to/ycloud-whatsapp-mcp-server/build/index.js"], "env": { "API_BASE_URL": "https://api.ycloud.com/v2", "API_HEADERS": "X-API-Key:your-api-key-here" } } } }
your-api-key-here
为您的YCloud API密钥# 设置环境变量并运行 API_BASE_URL=https://api.ycloud.com/v2 \ API_HEADERS="X-API-Key:your-api-key-here" \ npm start
在Claude中,您可以使用以下提示来与YCloud API交互:
请帮我查询我的YCloud账户余额。
Claude将能够调用适当的API端点并返回结果。
在开发过程中,您可以使用以下方法调试MCP服务器:
欢迎提交Pull Request或创建Issue来改进此项目。
MIT
Discover shared experiences
Shared threads will appear here, showcasing real-world applications and insights from the community. Check back soon for updates!