home / mcp / mcp playground mcp server
Provides a playground for MCP with stdio and SSE transports, including tools and resources.
Configuration
View docs{
"mcpServers": {
"anhkhoa289-mcp-playground": {
"url": "http://localhost:3000/mcp"
}
}
}You can run MCP with two transport methods: a local stdio server for tight integration with tools that communicate over stdin/stdout, and an HTTP SSE server for browser-friendly or network clients. This setup offers useful tools, sample resources, TypeScript safety, and hot development support so you can experiment with Model Context Protocol quickly.
Choose your transport method based on your integration scenario. For local tooling or desktop integrations, run the stdio server and connect through stdin/stdout. For web-based clients or remote tools, start the SSE HTTP server and connect via the SSE endpoint.
You can access a set of example tools such as echo, add, get_time, and generate_uuid, plus sample resources like server info and example data. Type safety is provided through TypeScript, and development mode supports hot reloading for rapid iteration.
Prerequisites: ensure Node.js and npm are installed on your system.
Install dependencies and prepare the project.
Start the stdio transport server for development or production use.
npm install# Development mode for stdio transport
npm run dev
# Production build and start for stdio transport
npm run build
npm start# Development mode for SSE transport
npm run dev:sse
# Production mode for SSE transport
npm run build
npm run start:sse# Claude Desktop integration (stdio transport) example configuration
{
"mcpServers": {
"mcp-playground": {
"command": "node",
"args": ["/path/to/mcp-playground/dist/index.js"]
}
}
}For development in Claude Desktop, you can also use a local development command setup that executes the TypeScript source directly with a runtime like tsx. This is shown as an alternative in development scenarios.
Two transport methods are available: - Stdio Transport (Pure MCP SDK) runs through stdin/stdout for tight local integration. - SSE Transport (Server-Sent Events) runs over HTTP and exposes a health endpoint, an SSE stream, and a message receiver. The SSE server listens on port 3000 by default and offers the following endpoints: health, sse, and messages.
To connect from a client, provide the appropriate transport: - For stdio, spawn the server process with the node runtime and the script path to the built index. - For SSE, connect to the SSE endpoint via HTTP and use the MCP client transport designed for SSE.
Build and watch for changes, then run in the desired transport mode. - Build and watch is available for automatic rebuilds during development. - Run the stdio server in dev mode for rapid testing. - Run the SSE server in dev mode for testing web-based clients.
Test Stdio Transport by starting the stdio server in development mode and sending a JSON-RPC request through the terminal to the server process, ensuring it responds as expected.
Test SSE Transport by starting the SSE server and querying the health endpoint, then opening the SSE stream in a browser or with a curl command to verify the connection remains open and messages flow correctly.
This setup emphasizes practical usage for developers and integrators who want to experiment with MCP in both local and HTTP-based environments. Tools and resources are provided to help you simulate common interactions and validate your client implementations.
Responds with the input message echoed back to you.
Adds two numbers and returns the result.
Returns the current server time.
Generates a random UUID (available over SSE).