ashrivastava
menu
// case study — api-to-mcp← all projects

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.

Experimental·ai·2026

Built in public to learn something or prove a pattern. Some are published packages, some are demos that live on this site.

// hero
API → MCP Server Generator
// stack
frontend
Next.js 15React 19TypeScriptTailwind CSS
backend
Next.js API RoutesOpenRouter (BYOK)
database
tools
Streaming SSEPer-IP rate limitingOpenAPI 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
// outcomes — impact3

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

// related — other projects
Own productpinnedfeatured
ai2026

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.

AILLMsJob SearchAnthropic Claude+3
Own productpinnedfeatured
ai2026

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.

AIDeveloper AnalyticsGitHub AppLLM Classification+2
Own productpinnedfeatured
ai2026

Grenz — Firewall for AI Agents

A local firewall for AI agents: scoped, revocable, observable permissions instead of your full GitHub token. Deny-by-default, MIT licensed, live at grenz.dev.

AI AgentsSecurityIAMMCP+2