mcpmock
Rapid MCP server prototyping from a single YAML file
claude mcp add --transport stdio dimirolz-mcpmock npx -y mcpmock
How to use
mcpmock is a Bun + TypeScript playground for rapidly prototyping MCP servers using a single YAML configuration. You describe your mock MCP server in a YAML file, then run the CLI, which starts either a stdio-based server for agent integrations or an HTTP server for browser/HTTP interactions. The tools defined in your YAML respond with configured data, with optional templating to interpolate tool inputs into responses. This makes it easy to test tool shapes, response formats, and transport behaviors without building full backend logic. The CLI can operate in two transports: stdio (default) for close integration with agents via stdin/stdout, and http which spins up an Express server backed by StreamableHTTPServerTransport for web-based interactions. Cross-origin requests are enabled so MCP Inspector and similar tools can connect directly.
How to install
Prerequisites:
- Node.js and npm installed, or Bun for local development workflow (bun install).
- Access to the npm registry to install mcpmock globally or locally.
Option A: Install globally (recommended for quick usage)
- Install the package globally:
npm install -g mcpmock
- Run the CLI pointing to your YAML config, for example:
npx mcpmock ./examples/basic/mock.yaml
Option B: Install locally and run from source (development workflow)
- Install dependencies (bun preferred for speed):
bun install
- Build the project (if you’re developing locally):
bun run build
- Run the server using the built bundle (example YAML path):
node dist/index.js examples/basic/mock.yaml
Notes:
- The CLI expects a YAML file that defines server, tools, and responses (as shown in the README examples).
- When using the http transport, the server will start an Express server and expose endpoints suitable for MCP tooling.
Additional notes
Tips and known considerations:
- Ensure each tool in your YAML config has a unique name and a valid input_schema. The response can reference args via {{ args.* }} and supports nested structures.
- If a referenced argument is missing, the tool call will error, which helps with debugging during iteration.
- The stdio transport is ideal for integration with agents via streams, while the http transport is useful for browser-based testing and MCP Inspector workflows.
- Cross-origin requests are allowed with MCP Session IDs exposed to enable seamless agent/browser interactions.
- When developing locally, you can use Bun to speed up the build and testing process, but npm can be used as well for broader compatibility.
Related MCP Servers
context7
Context7 MCP Server -- Up-to-date code documentation for LLMs and AI code editors
obsidian -tools
Add Obsidian integrations like semantic search and custom Templater prompts to Claude or any MCP client.
MiniMax -JS
Official MiniMax Model Context Protocol (MCP) JavaScript implementation that provides seamless integration with MiniMax's powerful AI capabilities including image generation, video generation, text-to-speech, and voice cloning APIs.
mcp-bundler
Is the MCP configuration too complicated? You can easily share your own simplified setup!
akyn-sdk
Turn any data source into an MCP server in 5 minutes. Build AI-agents-ready knowledge bases.
promptboard
The Shared Whiteboard for Your AI Agents via MCP. Paste screenshots, mark them up, and share with AI.