Skip to main content
Glama

MCP YAML API

by molavec

MCP YAML API

一个模型上下文协议 (MCP) 服务器,它可以根据 YAML 文件中定义的 API 配置创建工具。此服务器允许您通过在 YAML 配置文件中定义 API 端点来创建 MCP 工具,从而轻松地将外部 API 集成到您的 MCP 生态系统中。

特征

  • 使用 YAML 配置多个 API 端点
  • 支持所有 HTTP 方法(GET、POST、PATCH、PUT、DELETE)
  • 敏感数据的环境变量插值
  • 从 URL 模板自动生成参数
  • 用于创建工具的工厂模式
  • 完整的 MCP 服务器实现

安装

npm install -g mcp-yaml-api

配置

在您的项目中创建一个api.yaml文件:

apis: getUser: url: https://api.example.com/users/{id} method: GET api-token: ${API_TOKEN} content: headers: Accept: application/json

为您的 API 令牌创建一个.env文件:

API_TOKEN=your_api_token_here

用法

运行 MCP 服务器:

mcp-yaml-api

服务器将为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 方法的完整示例。

贡献

  1. 分叉存储库
  2. 创建你的功能分支
  3. 提交你的更改
  4. 推送到分支
  5. 创建新的 Pull 请求

执照

麻省理工学院

Install Server
A
security – no known vulnerabilities
F
license - not found
A
quality - confirmed to work

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.

模型上下文协议服务器根据 YAML 文件中定义的 API 配置创建工具,允许轻松将外部 API 集成到 MCP 生态系统中而无需编码。

  1. 特征
    1. 安装
      1. 配置
        1. 用法
          1. YAML 配置
            1. 示例配置
              1. 贡献
                1. 执照

                  Related MCP Servers

                  • A
                    security
                    A
                    license
                    A
                    quality
                    A Model Context Protocol server that provides tools for code modification and generation via Large Language Models, allowing users to create, modify, rewrite, and delete files using structured XML instructions.
                    Last updated -
                    12
                    Python
                    MIT License
                    • Linux
                    • Apple
                  • A
                    security
                    A
                    license
                    A
                    quality
                    A comprehensive Model Context Protocol server that provides advanced Node.js development tooling for automating project creation, component generation, package management, and documentation with AI-powered assistance.
                    Last updated -
                    7
                    2
                    JavaScript
                    MIT License
                  • -
                    security
                    F
                    license
                    -
                    quality
                    A 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 -
                    28
                    Python
                    • Linux
                    • Apple
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A 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 -
                    14
                    Python
                    MIT License

                  View all related MCP servers

                  MCP directory API

                  We provide all the information about MCP servers via our MCP API.

                  curl -X GET 'https://glama.ai/api/mcp/v1/servers/molavec/mcp-yaml-api'

                  If you have feedback or need assistance with the MCP directory API, please join our Discord server