create-mcp-server
The MCP SDK gets you to hello world. We built the part that gets you to production.
MCP is how AI assistants — Claude, Cursor, Windsurf — connect to external tools. The ecosystem is moving fast. Every AI developer is building servers. The raw SDK is documented. What it doesn’t give you: project structure, JSON Schema wiring for every tool input, transport configuration, a test harness that sends real protocol requests. The official docs stop where the maintainability work starts.
@workingmodel/create-mcp-server closes that gap. One command — npx @workingmodel/create-mcp-server my-server — and you have a fully typed, integration-tested MCP server running in under 60 seconds. Three templates. Two transport modes. An add tool subcommand that works inside existing projects. Live on npm, MIT licensed, open source.
Product: @workingmodel/create-mcp-server
Live: View on npm ↗
Built by: Working Model Inc
Goal: Production-ready MCP server scaffold — typed, tested, running in under 60 seconds.
Key differentiator: Integration tests that send real JSON-RPC requests over stdio. Not mocked.
Key Challenges & Strategic Objectives
- The raw SDK stops short. JSON Schema for tool inputs, transport setup, project structure, test harness — all manual. The official docs deliver hello world. They don’t deliver a project you can maintain.
- Three audiences, three templates. A single template would serve none of them well. Minimal needs to be one file — the protocol, nothing else. Standard needs a full tool registry, CI, and tests out of the box. Full needs auth stubs and Docker. Each had to be independently valid and independently testable.
- Type inference can’t be approximated. The
defineTool()helper had to take a Zod schema and return full TypeScript inference in the handler — automatically. Manual JSON Schema translation was the old problem. Making it invisible was the requirement. - The bin path. The first review pass found it: the
binfield in package.json pointed to the wrong path. A freshnpx @workingmodel/create-mcp-serverwould have installed cleanly and done nothing. It looked finished. It wasn’t.
Technical Solution & Architecture
Three components, one system.
1. Templates
Three entry points: minimal (single file — learn the protocol), standard (full tool registry, CI, tests — the default), full (resources, prompts, auth stub, Docker). A setup wizard asks transport preference — stdio for local clients, SSE for remote HTTP — and wires accordingly.
2. defineTool() helper
Write a Zod schema. Get full TypeScript inference in your handler. The tool-to-JSON-Schema conversion is automatic. You write the function. The types follow.
3. add tool subcommand
Works inside any existing project. npx @workingmodel/create-mcp-server add tool send-email scaffolds a typed tool file, writes its test, and registers it in the tool index. One command. Three files. Auto-wired.
4. MCP Inspector
npm run inspector builds the project and opens the official MCP debugging UI. Call your tools interactively before connecting any client.
5. Integration Tests
The test suite scaffolds a real project, builds it, spawns the server process, sends an actual MCP initialize request over stdio, and asserts the correct JSON-RPC response. Same protocol. Same transport. Same handshake a real client would send.
Outcomes & Results
Built, reviewed, fixed, and published in a single session.
- Templates shipped: 3 — minimal, standard, full.
- Tests: 16/16 passing across scaffold, add-tool, and live integration.
- Findings caught before publish: 13, across two review passes.
- Review score: 10/10.
- Type errors in any scaffolded project: 0.
- Package: 47 files, 17.6 kB packed.
One of those 13 findings was the bin path. The process found what finished actually meant.
What This Means
WM builds MCP integrations for clients. This is the scaffold we needed. We published it because there was no reason not to.
The 13 pre-publish findings aren’t a bug story. They’re a standard story. A 17 kB package reviewed with the same discipline as a production system. Because that’s the only discipline worth having.
Try It
Building something with MCP? Tell us what you’re working on.
Brought to you by Working Model Inc