MCP YAML API
一个模型上下文协议 (MCP) 服务器,它可以根据 YAML 文件中定义的 API 配置创建工具。此服务器允许您通过在 YAML 配置文件中定义 API 端点来创建 MCP 工具,从而轻松地将外部 API 集成到您的 MCP 生态系统中。
特征
使用 YAML 配置多个 API 端点
支持所有 HTTP 方法(GET、POST、PATCH、PUT、DELETE)
敏感数据的环境变量插值
从 URL 模板自动生成参数
用于创建工具的工厂模式
完整的 MCP 服务器实现
安装
配置
在您的项目中创建一个api.yaml
文件:
为您的 API 令牌创建一个.env
文件:
用法
运行 MCP 服务器:
服务器将为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 请求
执照
麻省理工学院
remote-capable server
The server can be hosted and run remotely because it primarily relies on remote services or has no dependency on the local environment.
Tools
模型上下文协议服务器根据 YAML 文件中定义的 API 配置创建工具,允许轻松将外部 API 集成到 MCP 生态系统中而无需编码。
Related MCP Servers
- -securityFlicense-qualityA Model Context Protocol server implementation that enables connection between OpenAI APIs and MCP clients for coding assistance with features like CLI interaction, web API integration, and tool-based architecture.Last updated -35
- -securityAlicense-qualityA streamlined foundation for building Model Context Protocol servers in Python, designed to make AI-assisted development of MCP tools easier and more efficient.Last updated -13MIT License
- -securityAlicense-qualityA server that translates Model Context Protocol (MCP) tool callings to traditional HTTP API requests, allowing existing HTTP APIs to be integrated into MCP territory through configurable mappings.Last updated -1Apache 2.0
- -securityFlicense-qualityA server implementation of the Model Context Protocol (MCP) that provides REST API endpoints for managing and interacting with MCP resources.Last updated -