一个使用YAML配置文件调用API的模型上下文协议(MCP)服务器。
这个服务器允许您通过简单的配置YAML文件连接到API! 🤩
适合:#懒程序员 #无代码 #低代码 #AI集成者 #自动化 #API网关 #数据管道 #快速原型设计 #LLM集成 #创造者
如果您没有使用编程语言进行高级API调用的技能,或者您只是想使用MCP快速连接您的AI模型与API,您会爱上这个MCP。 💖
在mcp.so仓库上做出反应并给我一个激励性的评论。

... 是的! 捐助一些资金来帮助支付我的咖啡和房租将会非常棒! 🙏🙏
/users/{id})[✨工作✨]/users?page={page}&limit={limit})[✨工作✨]api.yaml副本。npx -y mcp-api-client --init
npx -y mcp-api-client --test-server
Claude Client设置文件示例:"mcp": {
"servers": {
"mcp-api-client": {
"command": "npx",
"args": [
"-y",
"mcp-api-client",
"path-to-api.yaml"
]
},
}
}
Visual Studio Code设置文件示例:"mcp": {
"servers": {
"mcp-api-client": {
"command": "npx",
"args": [
"-y",
"mcp-api-client",
"path-to-api.yaml"
]
},
}
}

每个API YAML文件可以包括带有MCP信息的全局元数据:
metadata: 关于API集的一般信息
以及API端点定义列表:
apis: API端点定义列表。每个端点应具有
metadata:
name: API示例
version: 1.0.0
description: 此文件包含各种API端点的示例,用于测试目的。
apis:
- name: getUser
url: https://api.example.com/users/{id}
method: GET
content:
headers:
Accept: application/json
- name: createUser
url: https://api.example.com/users
method: POST
api-token: ${API_TOKEN}
content:
headers:
Content-Type: application/json
body:
name: string
email: string
...
参见public/apis.yaml以获得带有元数据和所有HTTP方法及参数类型的完整示例。
创建一个.env文件用于您的API令牌:
API_TOKEN=your_api_token_here
https://github.com/molavec/mcp-api-client/issues
MIT