home / mcp / mcp playground mcp server

MCP Playground MCP Server

Provides a playground for MCP with stdio and SSE transports, including tools and resources.

Installation
Add the following to your MCP client configuration file.

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.

How to use

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.

How to install

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.

Cài đặt và chạy MCP Playground

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.

Additional configuration and usage notes

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.

Development workflow

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.

Testing tips

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.

Notes

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.

Available tools

echo

Responds with the input message echoed back to you.

add

Adds two numbers and returns the result.

get_time

Returns the current server time.

generate_uuid

Generates a random UUID (available over SSE).