Tyk API Management MCP Server

A tool for creating MCP servers from OpenAPI/Swagger specifications that enables AI assistants to interact with REST APIs by converting OpenAPI specifications into MCP tools.

Get this MCP server

A tool for creating MCP servers from OpenAPI/Swagger specifications that enables AI assistants to interact with REST APIs by converting OpenAPI specifications into MCP tools.

Installation

NPX

npx -y @tyktechnologies/api-to-mcp --spec https://petstore3.swagger.io/api/v3/openapi.json

From Source Code

git clone <repository-url>
cd openapi-to-mcp-generator
npm install
npm run build

Configuration

Claude Desktop

{
  "mcpServers": {
    "api-tools": {
      "command": "npx",
      "args": [
        "-y",
        "@tyktechnologies/api-to-mcp",
        "--spec",
        "https://petstore3.swagger.io/api/v3/openapi.json"
      ],
      "enabled": true
    }
  }
}

Cursor

{
  "servers": [
    {
      "command": "npx",
      "args": [
        "-y",
        "@tyktechnologies/api-to-mcp",
        "--spec",
        "./path/to/your/openapi.json"
      ],
      "name": "My API Tools"
    }
  ]
}

Features

  • Dynamic loading of OpenAPI specifications from file or HTTP/HTTPS URL
  • Support for OpenAPI Overlays loaded from files or HTTP/HTTPS URL
  • Customizable mapping of OpenAPI operations to MCP tools
  • Advanced operation filtering using glob patterns for both operationId and URL paths
  • Comprehensive parameter handling with format and location metadata preservation
  • API authentication handling
  • OpenAPI metadata (name, version, description) used for MCP server configuration
  • Hierarchical fallback descriptions (operation description → operation summary → path summary)
  • Support for custom HTTP headers via environment variables and CLI
  • X-MCP header for tracking and identifying API requests

Environment Variables

Optional

  • OPENAPI_SPEC_PATH - Path to OpenAPI specification file
  • OPENAPI_OVERLAY_PATHS - Comma-separated paths to overlay JSON files
  • TARGET_API_BASE_URL - Base URL for API calls (overrides OpenAPI servers)
  • MCP_WHITELIST_OPERATIONS - Comma-separated list of operation IDs or URL paths to include (supports glob patterns)
  • MCP_BLACKLIST_OPERATIONS - Comma-separated list of operation IDs or URL paths to exclude (supports glob patterns)
  • API_KEY - API key for the target API (if required)
  • SECURITY_SCHEME_NAME - Name of the security scheme requiring API key
  • SECURITY_CREDENTIALS - JSON string containing security credentials for multiple schemes

Usage Examples

List all available pets in the pet store using the API

Notes

Configuration settings are applied in order of priority: command-line parameters, environment variables, then JSON configuration file. The server can be used with Vercel AI SDK for direct integration with JavaScript/TypeScript. You can fork this repository and customize it to create branded MCP servers for specific APIs.

Comments (0)

Sign In Sign in to leave a comment.

Spark Drops

Weekly picks: best new AI tools, agents & prompts

Venture Crew
Terms of Service

© 2026, Venture Crew