Integrations
Supports environment variable interpolation for API tokens and sensitive data through .env files, allowing secure storage of credentials used in API configurations.
Provides installation through the npm package registry with global installation support via 'npm install -g mcp-yaml-api'.
Enables defining and configuring multiple API endpoints using YAML syntax, supporting various HTTP methods, parameter generation, and request configurations.
MCP YAML API
一个模型上下文协议 (MCP) 服务器,它可以根据 YAML 文件中定义的 API 配置创建工具。此服务器允许您通过在 YAML 配置文件中定义 API 端点来创建 MCP 工具,从而轻松地将外部 API 集成到您的 MCP 生态系统中。
特征
- 使用 YAML 配置多个 API 端点
- 支持所有 HTTP 方法(GET、POST、PATCH、PUT、DELETE)
- 敏感数据的环境变量插值
- 从 URL 模板自动生成参数
- 用于创建工具的工厂模式
- 完整的 MCP 服务器实现
安装
Copy
配置
在您的项目中创建一个api.yaml
文件:
Copy
为您的 API 令牌创建一个.env
文件:
Copy
用法
运行 MCP 服务器:
Copy
服务器将为api.yaml
文件中定义的每个 API 端点创建 MCP 工具。
YAML 配置
YAML 文件中的每个 API 端点都应该具有:
url
:端点 URL(支持{id}
等路径参数)method
:HTTP 方法(GET、POST、PATCH、PUT、DELETE)api-token
:API 令牌(支持环境变量)content
:请求配置headers
:请求标头body
:请求主体模式(用于 POST、PUT、PATCH)
示例配置
请参阅api.yaml
以获取包含所有 HTTP 方法的完整示例。
贡献
- 分叉存储库
- 创建你的功能分支
- 提交你的更改
- 推送到分支
- 创建新的 Pull 请求
执照
麻省理工学院
Related MCP Servers
- -securityAlicense-qualityMCP Server simplifies the implementation of the Model Context Protocol by providing a user-friendly API to create custom tools and manage server workflows efficiently.Last updated -43TypeScriptMIT License
- -securityAlicense-qualityMCP Server provides a simpler API to interact with the Model Context Protocol by allowing users to define custom tools and services to streamline workflows and processes.Last updated -132TypeScriptMIT License
- -securityAlicense-qualityAn MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.Last updated -2PythonMIT License
- -securityAlicense-qualityA Model Context Protocol server that exposes over 200+ APIs from API.market as MCP resources, allowing large language models to discover and interact with various APIs through natural language commands.Last updated -1112TypeScriptMIT License