MCP YAML API

by molavec

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

A Model Context Protocol (MCP) server that creates tools from API configurations defined in YAML files. This server allows you to create MCP tools by simply defining API endpoints in a YAML configuration file, making it easy to integrate external APIs into your MCP ecosystem.

Features

  • Configure multiple API endpoints using YAML
  • Supports all HTTP methods (GET, POST, PATCH, PUT, DELETE)
  • Environment variable interpolation for sensitive data
  • Automatic parameter generation from URL templates
  • Factory pattern for tool creation
  • Full MCP server implementation

Installation

npm install -g mcp-yaml-api

Configuration

Create an api.yaml file in your project:

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

Create a .env file for your API tokens:

API_TOKEN=your_api_token_here

Usage

Run the MCP server:

mcp-yaml-api

The server will create MCP tools for each API endpoint defined in your api.yaml file.

YAML Configuration

Each API endpoint in the YAML file should have:

  • url: The endpoint URL (supports path parameters like {id})
  • method: HTTP method (GET, POST, PATCH, PUT, DELETE)
  • api-token: API token (supports environment variables)
  • content: Request configuration
    • headers: Request headers
    • body: Request body schema (for POST, PUT, PATCH)

Example Configuration

See api.yaml for a complete example with all HTTP methods.

Contributing

  1. Fork the repository
  2. Create your feature branch
  3. Commit your changes
  4. Push to the branch
  5. Create a new Pull Request

License

MIT

-
security - not tested
F
license - not found
-
quality - not tested

A Model Context Protocol server that creates tools from API configurations defined in YAML files, allowing easy integration of external APIs into an MCP ecosystem without coding.

  1. Features
    1. Installation
      1. Configuration
        1. Usage
          1. YAML Configuration
            1. Example Configuration
              1. Contributing
                1. License

                  Related MCP Servers

                  • -
                    security
                    A
                    license
                    -
                    quality
                    MCP 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 -
                    4
                    3
                    TypeScript
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    MCP 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 -
                    13
                    2
                    TypeScript
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    An MCP server that exposes HTTP methods defined in an OpenAPI specification as tools, enabling interaction with APIs via the Model Context Protocol.
                    Last updated -
                    2
                    Python
                    MIT License
                  • -
                    security
                    A
                    license
                    -
                    quality
                    A 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 -
                    111
                    2
                    TypeScript
                    MIT License
                    • Apple

                  View all related MCP servers

                  ID: 01spoor8mp