Back to Projects
ai
2026

API → MCP Server Generator

A real working tool that turns any OpenAPI 3.x JSON spec into a runnable Model Context Protocol server. The server-side fetcher downloads the spec, validates it, and extracts up to 15 endpoints with their parameters and bodies. A tightly-prompted LLM call then streams a complete src/index.ts using @modelcontextprotocol/sdk with stdio transport — one MCP tool per endpoint, JSON-Schema inputs derived from the OpenAPI parameter list, native fetch() with path interpolation, query, and body. Combine with `npm create mcp-server@latest` for the package boilerplate and you have a working MCP server for any HTTP API in under five minutes. Lives at /api-to-mcp.

api-to-mcp

API → MCP Server Generator

Technologies

Frontend

Next.js 15
React 19
TypeScript
Tailwind CSS

Backend

Next.js API Routes
OpenRouter (BYOK)

Database

Tools

Streaming SSE
Per-IP rate limiting
OpenAPI 3.x parser
Challenges
  • Most APIs don't have MCP servers — engineers manually port each one, repeating the same plumbing
  • OpenAPI specs vary wildly in completeness, naming, and quirks; generating reliable tool code requires careful prompt design
  • Long specs blow LLM context budgets; choosing what to include is half the problem
Solutions
  • Server-side OpenAPI fetcher + validator that strips the spec to just what a code generator needs
  • Tightly-scoped generator prompt that pins SDK imports, schema shape, fetch patterns — output streams as the model writes
  • Hard cap at 15 endpoints per generation with per-endpoint parameter slicing so context stays cheap
Key Outcomes & Impact

Working MCP server scaffold for any OpenAPI 3.x JSON spec in under a minute

Completes a coherent MCP toolkit alongside create-mcp-server (scaffolder) and portfolio-mcp (reference impl)

Demonstrates LLM-as-code-generator with structured prompting and streaming

Other Projects

JobJam.io — AI Job Search & Application Platform
JobJam.io — AI Job Search & Application Platform

AI-powered job search platform: discover roles, evaluate fit, tailor applications, and close skill gaps. One-time pricing, no subscriptions.

View Project
Fathohm — Comprehension-Debt System of Record
Fathohm — Comprehension-Debt System of Record

See how much of your codebase no human understands. A treemap of your repo colored by human comprehension score, with a tracked, assignable metric for 'who understands what' in an AI-native codebase.

View Project