saurav61091/mcp-openapi

💻 Developer Tools
0 Views
0 Installs

📇 ☁️ 🏠 - Turn any OpenAPI spec into callable MCP tools for Claude. Point at any OpenAPI 3.x spec and Claude can call every endpoint through natural language. Supports Bearer, API key, and Basic auth.

Quick Install

One-Click IDE Configuration
claude_desktop_config.json
{
  "mcpServers": {
    "saurav61091-mcp-openapi": {
      "command": "npx",
      "args": [
        "-y",
        "saurav61091-mcp-openapi"
      ]
    }
  }
}
Or

Using an AI coding agent (Claude Code, Cursor, etc.)? Copy a ready-made prompt that tells it to fetch the setup instructions and install this server for you.

Documentation Overview

mcp-openapi

npm version CI License: MIT Node.js MCP

Turn any OpenAPI spec into MCP tools for Claude — zero config, instant API access.

Point mcp-openapi-runner at any OpenAPI 3.x spec and Claude can call every endpoint through natural language. No custom integration code. No manual tool definitions. One line of config.

Why mcp-openapi?

Without mcp-openapiWith mcp-openapi
Write custom MCP server per APIOne config line per API
Define tool schemas manuallyAuto-generated from OpenAPI spec
Handle auth, params, body yourselfBuilt-in auth + parameter handling
Maintain code as API evolvesSpec changes = tools update automatically

Quick start

Add to your Claude Desktop / Claude Code / Cursor / Cline MCP config:

{
  "mcpServers": {
    "petstore": {
      "command": "npx",
      "args": ["-y", "mcp-openapi-runner", "--spec", "https://petstore3.swagger.io/api/v3/openapi.json"]
    }
  }
}

That's it. Claude can now discover and call every endpoint in that API.

Example conversation

You: What pets are available? Add a new dog named Buddy.

Claude: Let me check what's available. [calls list_endpoints → discovers findPetsByStatus, addPet, ...] [calls call_endpointfindPetsByStatus with status=available]

There are 3 pets currently available. Now I'll add Buddy... [calls call_endpointaddPet with {"name":"Buddy","status":"available"}]

Done! Buddy has been added with ID 12345.

Features

  • Zero config — just point at a spec URL or file
  • Any OpenAPI 3.x spec — JSON or YAML, local or remote, $ref auto-resolved
  • Auto-generated operationIds — works even when the spec doesn't define them
  • Built-in auth — Bearer, API key, Basic auth via environment variables
  • Endpoint filtering — only expose the endpoints you need with --filter
  • Custom headers — pass arbitrary headers with --header
  • Server URL override — point at staging/local with --server-url
  • Two-tool design — simple list_endpointscall_endpoint workflow
  • Works everywhere — Claude Desktop, Claude Code, Cursor, Cline, any MCP client

Ready-to-use configs

Stripe

{
  "mcpServers": {
    "stripe": {
      "command": "npx",
      "args": ["-y", "mcp-openapi-runner", "--spec", "https://raw.githubusercontent.com/stripe/openapi/master/openapi/spec3.json"],
      "env": {
        "OPENAPI_BEARER_TOKEN": "sk_test_..."
      }
    }
  }
}

GitHub REST API

{
  "mcpServers": {
    "github": {
      "command": "npx",
      "args": ["-y", "mcp-openapi-runner",
        "--spec", "https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.json",
        "--filter", "repos"],
      "env": {
        "OPENAPI_BEARER_TOKEN": "ghp_..."
      }
    }
  }
}

Your internal API

{
  "mcpServers": {
    "internal": {
      "command": "npx",
      "args": ["-y", "mcp-openapi-runner", "--spec", "http://localhost:8080/openapi.json"],
      "env": {
        "OPENAPI_API_KEY": "dev-key-123"
      }
    }
  }
}

Jira (Atlassian)

{
  "mcpServers": {
    "jira": {
      "command": "npx",
      "args": ["-y", "mcp-openapi-runner",
        "--spec", "https://dac-static.atlassian.com/cloud/jira/platform/swagger-v3.v3.json",
        "--server-url", "https://your-domain.atlassian.net",
        "--filter", "issue"],
      "env": {
        "OPENAPI_BASIC_USER": "you@company.com",
        "OPENAPI_BASIC_PASS": "your-api-token"
      }
    }
  }
}

Authentication

Pass credentials via environment variables:

{
  "mcpServers": {
    "my-api": {
      "command": "npx",
      "args": ["-y", "mcp-openapi-runner", "--spec", "https://api.example.com/openapi.json"],
      "env": {
        "OPENAPI_BEARER_TOKEN": "your-token-here"
      }
    }
  }
}
VariableDescription
OPENAPI_BEARER_TOKENBearer token → Authorization: Bearer <token>
OPENAPI_API_KEYAPI key value
OPENAPI_API_KEY_HEADERHeader name for API key (default: X-Api-Key)
OPENAPI_BASIC_USERHTTP Basic auth username
OPENAPI_BASIC_PASSHTTP Basic auth password

CLI options

npx mcp-openapi-runner --spec <url-or-path> [options]

Options:
  --spec         Path or URL to an OpenAPI 3.x spec (JSON or YAML)
  --server-url   Override the base URL from the spec
  --filter       Only expose endpoints matching a pattern (path, tag, or operationId)
  --header       Add custom header to all requests ("Name: Value", repeatable)
  --help         Show help

Examples

# Basic usage
npx mcp-openapi-runner --spec https://petstore3.swagger.io/api/v3/openapi.json

# Only pet-related endpoints
npx mcp-openapi-runner --spec ./openapi.yaml --filter pets

# Point at local dev server
npx mcp-openapi-runner --spec ./openapi.yaml --server-url http://localhost:3000

# Custom headers
npx mcp-openapi-runner --spec ./openapi.yaml --header "X-Tenant: acme" --header "X-Debug: true"

# With auth
OPENAPI_BEARER_TOKEN=mytoken npx mcp-openapi-runner --spec https://api.example.com/openapi.json

Tools

mcp-openapi-runner exposes exactly two tools:

ToolDescription
list_endpointsReturns all operations grouped by tag with operationIds, methods, paths, and parameters
call_endpointExecutes any operation by operationId with path/query/header/body parameters

The two-tool design means Claude always has a clear workflow: discover → call.

How it works

  1. Loads the OpenAPI spec from the given URL or file path
  2. Dereferences all $ref schemas using @apidevtools/swagger-parser
  3. Applies endpoint filter if --filter is set
  4. Registers two MCP tools with the connected client
  5. list_endpoints generates a human+LLM-readable summary of all operations
  6. call_endpoint resolves params, builds the URL, attaches auth + custom headers, returns the response

Requirements

  • Node.js 18+
  • OpenAPI 3.x spec (JSON or YAML, local file or URL)

Contributing

Contributions welcome! See CONTRIBUTING.md for guidelines.

License

MIT

Related MCP Servers

Moxie-Docs-MCP★ Featured

MCP & Agent Skills for Automated Documentation, and codebase conventions + context

💻 Developer Tools2 views
3KniGHtcZ/codebeamer-mcp

📇 ☁️ 🍎 🪟 🐧 - Codebeamer ALM integration for managing work items, trackers, and projects. Provides 17 tools for reading and writing items, associations, references, comments, and risk management data via Codebeamer REST API v3.

💻 Developer Tools1 views
21st-dev/Magic-MCP

Create crafted UI components inspired by the best 21st.dev design engineers.

💻 Developer Tools0 views
a-25/ios-mcp-code-quality-server

📇 🏠 🍎 - iOS code quality analysis and test automation server. Provides comprehensive Xcode test execution, SwiftLint integration, and detailed failure analysis. Operates in both CLI and MCP server modes for direct developer usage and AI assistant integration.

💻 Developer Tools0 views

Engagement

Views
0
Installs
0
Upvotes
0

Views and upvotes are unique per visitor network (hashed IP). Installs count copy actions.

Status

Health: Not checked yet

We have not completed a health check for this listing yet.

No check timestamp yet.

Unclaimed listing (imported or pending owner verification). Claim it →
★ Spotlight Slot

Feature Your MCP Server

Get maximum visibility for your server across our directory, search results, and detail pages.

Spotlight Your Server

Own this project?

This directory is pre-filled from public sources. Claim via GitHub README, site badge, or DNS TXT to get the verified badge and attach your website.

Claim this listing

Promote this listing

Optional paid placement. Free listings stay free forever.

Share & Embed

Add our SVG badge (dark/light directory styles) or embeddable widget to your site.