Skip to main content
Glama
m4cd4r4
by m4cd4r4

mcpwrap

Live: https://mcp-forge-black.vercel.app

mcpwrap landing page

Turn any REST API into an MCP server in 10 seconds.

npx mcpwrap --spec https://petstore3.swagger.io/api/v3/openapi.json

No code generation. No config files. Just point and serve.

Why?

Other tools generate static code from your OpenAPI spec. mcpwrap wraps your API at runtime - it reads the spec, creates MCP tools dynamically, and proxies requests to your API. Update the spec, restart, done.

Related MCP server: ControlAPI-MCP

Quick Start

# From a URL
npx mcpwrap --spec https://api.example.com/openapi.json

# From a local file
npx mcpwrap --spec ./my-api.yaml

# With authentication
npx mcpwrap --spec ./api.json --auth "Bearer $MY_TOKEN"

# With API key header
npx mcpwrap --spec ./api.json --auth "X-API-Key:your-key-here"

# Filter endpoints
npx mcpwrap --spec ./api.json --include "/pets/*" --exclude "/admin/*"

Claude Desktop Integration

Add to your Claude Desktop config (claude_desktop_config.json):

{
  "mcpServers": {
    "my-api": {
      "command": "npx",
      "args": ["mcpwrap", "--spec", "https://api.example.com/openapi.json"]
    }
  }
}

How It Works

  1. Reads your OpenAPI 3.0/3.1 spec (JSON or YAML, local or remote)

  2. Parses every endpoint into an MCP tool (one tool per operation)

  3. Maps parameters and request bodies to MCP tool input schemas

  4. Proxies tool calls to your API and returns the response

  5. Flattens large/nested responses for LLM readability

Features

  • Runtime wrapping - no generated code to maintain

  • OpenAPI 3.0 and 3.1 support

  • All HTTP methods - GET, POST, PUT, DELETE, PATCH

  • Auth passthrough - Bearer tokens, API keys, Basic auth

  • Path and query params - automatically mapped from tool arguments

  • Request body - JSON body passed as body argument

  • Response flattening - truncates deep nesting and long arrays

  • Endpoint filtering - include/exclude by path pattern

  • Verbose mode - logs requests to stderr for debugging

CLI Options

Option

Description

Default

--spec <path>

Path or URL to OpenAPI spec (required)

-

--base-url <url>

Override base URL from spec

From spec

--auth <auth>

Auth: Bearer TOKEN, HEADER:VALUE

None

--include <patterns>

Only include matching paths

All

--exclude <patterns>

Exclude matching paths

None

--transport <type>

stdio or http

stdio

--port <number>

Port for HTTP transport

3100

--no-flatten

Disable response flattening

Enabled

--verbose

Log requests to stderr

Off

Tool Naming

Tools are named using the operationId from your spec when available, falling back to METHOD_path_segments (e.g., get_pets_petId).

Development

git clone https://github.com/m4cd4r4/mcpwrap
cd mcpwrap
npm install
npm test
npm run dev -- --spec examples/petstore.json --verbose

License

MIT

F
license - not found
Not graded
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    A Python-based MCP server that integrates OpenAPI-described REST APIs into MCP workflows, enabling dynamic exposure of API endpoints as MCP tools.
    153
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    An MCP server that dynamically converts any OpenAPI or REST API into MCP tools, allowing for real-time server switching and schema reloading. It supports variable substitution for headers and bodies, enabling seamless authentication and interaction with multiple API environments.
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    A dynamic MCP server that automatically discovers and generates tools from any REST API using OpenAPI/Swagger specifications, enabling instant endpoint access with zero manual configuration.
    MIT

View all related MCP servers

Related MCP Connectors

  • MCP server for AI access to Swagger by SmartBear.

  • MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.

  • MCP server exposing the Backtest360 engine API as tools for AI agents.

View all MCP Connectors

Latest Blog Posts

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/m4cd4r4/mcpwrap'

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