How to Turn Any REST API into an MCP Server (2026 Guide)
The Skillselion catalog tracks 7,730 MCP server listings across 82,301 total listings - the largest and fastest-growing segment. "API to MCP" reached #2 on Product Hunt on June 19, 2026 (114 upvotes), signaling that converting existing REST APIs into MCP servers is the dominant MCP use pattern. This guide covers the conversion workflow, the key decisions, and the skills that help Claude Code do it.
By Skillselion, an Ellelion LLC publication · Updated July 5, 2026 · 4 min read · Stats verified against the live catalog
The pattern is clear: developers don't just want to build MCP servers from scratch - they want to wrap the APIs they already have. "API to MCP" landed at #2 on Product Hunt on June 19, 2026 with 114 upvotes, and the Skillselion catalog's 7,730 MCP listings are full of exactly this pattern: Stripe MCP, GitHub MCP, database MCPs, internal-API MCPs. This guide explains the conversion workflow and how Claude Code handles it.
Key takeaways
- "API to MCP" was #2 on Product Hunt June 19, 2026 (114 upvotes) - the leading indicator of developer demand
- The Skillselion catalog tracks 7,730 MCP listings - the fastest-growing segment across 82,301 total listings
- The conversion pattern: REST endpoint → MCP tool definition → tool handler → server registration
- Claude Code handles the boilerplate; the key decisions are authentication, tool-name semantics, and response shaping
- For building MCP servers from scratch, see the companion MCP server build guide
Why convert an existing API to MCP instead of building from scratch?
MCP (Model Context Protocol) is the standard for giving AI agents structured access to external data and actions. If you already have a REST API - internal tooling, a product API, a third-party integration - wrapping it as an MCP server means any MCP-compatible agent (Claude Code, Cursor, other Claude SDK integrations) can use it immediately, without per-agent glue code. The 7,730 MCP listings in the Skillselion catalog (across 82,301 listings) represent exactly this: teams wrapping their own APIs once and making them available to all their agents.
What is the anatomy of an MCP tool definition?
Every REST endpoint maps to an MCP tool via three components: 1. Name - a clear, verb-noun identifier (get_user, create_invoice, search_products) that the LLM can understand and call correctly 2. Description - a sentence that tells the LLM when to use this tool (not just what it does) 3. Input schema - a JSON Schema object that validates the tool's parameters before the handler fires
The MCP SDK (TypeScript or Python) generates the server boilerplate; Claude Code with the MCP skills handles the translation from your OpenAPI spec or API docs.
How do I convert an OpenAPI spec to MCP tools with Claude Code?
The workflow Claude Code follows with the right skills: 1. Parse the OpenAPI YAML/JSON spec to identify endpoint groups 2. Group related endpoints into logical MCP tools (not necessarily 1:1 - one MCP tool can aggregate multiple REST calls) 3. Generate MCP tool definitions with name, description, and JSON Schema input 4. Write the handler that calls your REST API with the correct auth headers 5. Register the tools on the MCP server and expose the server's stdio or SSE transport
For the full MCP server authoring workflow, install the skills from the MCP server build guide and the best MCP server skills guide.
What are the key decisions when wrapping an API as MCP?
Authentication: How does the MCP server authenticate with your REST API? Common patterns:
- Environment variable secrets - simplest; the server reads
process.env.API_KEYand injects it into every request - OAuth flow - for user-scoped APIs; the MCP server handles the OAuth dance and passes the token
- mTLS - for internal APIs behind a service mesh
Tool granularity: One MCP tool per REST endpoint produces a noisy tool list that confuses the LLM. Group by user intent ("what does the agent want to accomplish?"), not by HTTP verb. A single manage_user tool that handles create/update/fetch is often better than three separate tools.
Response shaping: MCP tools return text or structured JSON. Shape responses to include only what the LLM needs - verbose API responses with metadata, pagination tokens, and internal IDs bloat the context and reduce reasoning quality.
How many MCP servers are in the Skillselion catalog?
As of June 2026, the Skillselion catalog tracks 7,730 MCP server listings across 82,301 total listings, with 97.8M total installs across all skill types. The MCP segment is the fastest-growing category - a direct reflection of the "wrap your API" pattern this guide covers. Browse them at the best MCP server skills guide.
A complete API-to-MCP conversion workflow
1. Document your API - if no OpenAPI spec exists, generate one from your existing routes 2. Group endpoints into logical MCP tools by user intent (not by HTTP method) 3. Scaffold the MCP server using the MCP TypeScript or Python SDK 4. Write tool handlers - each handler calls your REST API with proper auth 5. Test with Claude Code - install your local MCP server in Claude Code and verify tool descriptions are clear enough for the LLM to call them correctly 6. Reference the MCP server build guide for the server scaffolding patterns
Common pitfalls
- 1:1 endpoint-to-tool mapping - 50 REST endpoints should not become 50 MCP tools; group by user intent or the LLM will choose the wrong tool consistently
- Missing error messages in tool responses - when your REST API returns a 4xx, the MCP tool should return a human-readable error message, not the raw HTTP status code; the LLM needs to understand the error to decide what to do next
- Skipping the tool description - the tool name alone is insufficient; the description tells the LLM when to use the tool vs alternatives; a blank description breaks LLM tool selection
The full MCP ecosystem - 7,730 servers in the Skillselion catalog - shows what's possible. The best MCP server skills guide ranks the most-installed MCP skills by category.
Common questions
How do I convert a REST API to an MCP server?
Convert a REST API to MCP in four steps: (1) Group endpoints by user intent into logical MCP tools, (2) Write MCP tool definitions with name, description, and JSON Schema input for each group, (3) Write handlers that call your REST API with proper authentication, (4) Register the tools on an MCP server using the MCP TypeScript or Python SDK. See the [MCP server build guide](/guide/mcp-server-build-guide-2026) for the scaffolding patterns.
How many MCP servers are in the Skillselion catalog?
As of June 2026, the Skillselion catalog tracks 7,730 MCP server listings across 82,301 total listings, with 97.8M total installs across all skill types. MCP is the fastest-growing category. Browse the top ones at the [best MCP server skills guide](/guide/best-mcp-server-skills-for-claude-code).
What is the difference between an MCP tool and a REST endpoint?
An MCP tool is a named, described, schema-validated action with a semantic description for LLM tool selection. A REST endpoint is an HTTP method/path pair with no built-in LLM semantics. MCP tools are designed for AI agent consumption - the name and description are the primary interface the LLM uses to decide when and how to call the tool. Multiple REST endpoints often map to a single MCP tool grouped by user intent.
Does MCP work with any programming language?
Yes. The MCP SDK has official TypeScript and Python implementations. The TypeScript SDK (npm: @modelcontextprotocol/sdk) and Python SDK (pip: mcp) both support stdio and SSE transports. You can also implement the JSON-RPC protocol directly in any language - the 7,730 MCP servers in the Skillselion catalog span many languages.
Why is API-to-MCP trending in 2026?
API-to-MCP conversion is trending because MCP (Model Context Protocol) is becoming the standard for giving AI agents structured tool access. Developers with existing REST APIs can wrap them once as MCP servers and make them available to any MCP-compatible agent - Claude Code, Cursor, and others. "API to MCP" reached #2 on Product Hunt on June 19, 2026 with 114 upvotes, confirming strong developer demand. The Skillselion catalog's 7,730 MCP listings reflect this adoption.
Ranked by Skillselion - an independent directory of AI-coding tools, not affiliated with Anthropic, OpenAI or Cursor. Tool rankings reflect real adoption (installs, then GitHub stars) from the skills.sh registry and GitHub, last updated July 5, 2026.