DEV Community

Ricardo Rodrigues
Ricardo Rodrigues

Posted on

The MCP Generator — Scaffold a Working MCP Server in 60 Seconds With Plain English

Published on MCPNest Blog | April 2026


Most developers who want a custom MCP server don't build one.

Not because they can't. Because starting is hard.

Where do you begin? Which SDK version? What's the right file structure? How do you register tools correctly? How do you handle errors? What does claude_desktop_config.json need to say to load the server?

These questions cost time. A developer unfamiliar with the MCP SDK typically spends 2-4 hours on setup before writing a single line of actual tool logic. For a solo developer or a platform engineer who already has a full day job, that's the entire Sunday afternoon gone before anything useful runs.

The barrier to publishing an MCP server is high. The MCP Generator lowers it.


What It Does

The MCP Generator takes a plain English description — up to 500 characters — and returns a complete MCP server scaffold in TypeScript. What would take 2-4 hours reading SDK documentation takes 30 seconds.

You describe what you want. The Generator builds the structure.

Input examples:

  • "A server that fetches real-time weather for any city"
  • "An MCP server that queries a Postgres database and lists tables"
  • "A server that reads and writes files in a local directory"

Output: A JSON object with four fields:

{
  "name": "weather-mcp-server",
  "description": "Fetches real-time weather data for any city using the OpenWeather API",
  "code": "// Complete TypeScript MCP server code...",
  "install": "{ \"mcpServers\": { \"weather-mcp-server\": { \"command\": \"npx\", \"args\": [\"-y\", \"weather-mcp-server\"] } } }"
}
Enter fullscreen mode Exit fullscreen mode

The code field is a complete TypeScript file — tool registration, request handlers, error handling, and the correct SDK boilerplate. The install field is the config snippet ready to paste into claude_desktop_config.json.

TypeScript always. Not JavaScript. The MCP SDK is TypeScript-first and the Generator follows that convention.


How It Works Under the Hood

The Generator calls the Anthropic API directly — /v1/messages with Claude Haiku. A specialised system prompt instructs the model to generate MCP servers that follow the correct SDK conventions, register tools with the right schema structure, and output the result as valid JSON.

This is worth explaining because it matters for what the Generator is and isn't.

It is not a code database. It is not a template engine. It is Claude, with a very specific prompt, generating TypeScript code for your exact use case on demand.

That means the output is tailored to your description. It also means the quality of what you get depends on how clearly you describe what you want. A precise description produces a precise scaffold. A vague one produces a generic one.


The Problem It Solves

Building an MCP server from scratch has a steep entry cost even for experienced developers. The official MCP TypeScript SDK is well-documented, but documentation takes time to read. And most of what you need to set up — the server initialisation, the tool list handler, the tool call handler, the transport setup — is identical across every server.

The parts that are unique to your use case are the tool implementations themselves: the actual logic that calls your API, queries your database, or reads your filesystem. Everything else is boilerplate.

The Generator handles the boilerplate. You write the logic.

It's the same principle as create-react-app or npm init — not a replacement for knowing how to code, but a fast path to the starting line.


What You Get

When you run the Generator with a description like "a server that connects to a Postgres database with tools to query tables, list schemas, and run SELECT statements", the output includes:

Correct tool registration — each tool defined with its name, description, and JSON Schema for input parameters. Missing or incorrect schemas are the most common cause of MCP servers not loading.

Both required request handlersListToolsRequestSchema and CallToolRequestSchema, correctly wired up. Forgetting either breaks the server entirely.

Error handling for unknown tools — a catch that throws a meaningful error instead of hanging silently.

Environment variable placeholders — if your server needs an API key or connection string, the Generator uses process.env.YOUR_VAR with a clear comment.

Ready-to-use install config — the exact JSON snippet for claude_desktop_config.json, with the correct server name and command.


Limitations

The Generator is honest about what it is.

It produces a scaffold, not a finished server. The tool implementations — the actual calls to your API, the database queries, the file reads — are placeholders that you replace with your own logic. The Generator gives you the correct structure so you don't have to figure that out from documentation. The business logic is yours.

It requires sign-in to use. This is to prevent abuse of the underlying API call.

The output is always TypeScript. If you need JavaScript, you can transpile it, but the Generator won't produce JS directly.

And because it uses a language model to generate code, edge cases or unusual patterns may not always produce exactly what you expect. Treat the output as a strong starting point, not as production-ready code that needs no review.


Try It

The MCP Generator is at mcpnest.io/tools.

Sign in, describe your server, and get your scaffold. Add your logic, push to GitHub, and if you want it in the MCPNest registry, submit it at mcpnest.io/publish.

If you build something with it and the listing doesn't exist yet, submitting it helps the registry. Every new server makes it more useful for everyone looking for tools.

And if the Generator produces something wrong, or if there's a pattern it doesn't handle well, tell me: malasartes@mcpnest.io. The prompt gets better every time I learn about a gap.


Ricardo Rodrigues is the founder of MCPNest and a Platform Engineer at BCP in Porto, Portugal. MCPNest is the marketplace and governance layer for MCP servers — 7,561+ servers indexed, with Enterprise workspaces and a Gateway launching June 2026.


Tags: MCP, Model Context Protocol, TypeScript, Claude, AI Tools, Developer Tools, MCP Generator

Top comments (0)