π§ͺ Mock Servers
Test MCP servers for development purposes.
π Quick Start
Build and run all mock servers with a single command:
make mock-servers
This builds both servers and starts mock-mcp-server on ports 9001 (HTTP) and 9002 (SSE).
To use custom ports:
make mock-servers PORT=3000
This starts HTTP on port 3000 and SSE on port 3001.
To stop and clean up:
make clean-mock-servers
π Servers
| Directory |
Transport |
Description |
local-stdio-server/ |
stdio |
Mock MCP server for local process examples |
mock-mcp-server/ |
http, sse |
Mock MCP server for external connection examples |
π₯οΈ local-stdio-server
A Go-based MCP server that communicates via stdio (stdin/stdout JSON-RPC).
Build
cd examples/_mock-servers/local-stdio-server
go build -o mock-stdio-server .
Usage
Used by examples/transports/local-mcp.yaml.
π mock-mcp-server
A Go-based MCP server that supports HTTP and SSE transports.
Run
cd examples/_mock-servers/mock-mcp-server
# HTTP mode
go run main.go -port 9001
# SSE mode
go run main.go -port 9002 -sse
Usage
Used by examples/transports/external-mcp.yaml.