Get the FREE Ultimate OpenClaw Setup Guide →

echo -for-testing

A simple echo MCP (Model Context Protocol) Server for testing MCP Clients.

Installation
Run this command in your terminal to add the MCP server to Claude Code.
Run in terminal:
Command
claude mcp add --transport stdio piebro-echo-mcp-server-for-testing uvx echo-mcp-server-for-testing \
  --env SECRET_KEY="123456789"

How to use

This MCP server implements a simple echo tool for testing MCP clients. It exposes an echo_tool that returns the message you provide, making it ideal for validating request/response flows and serialization. To use it, add the server to your MCP configuration (via uvx) by specifying the server name and the command to run. You can either run the server through uvx, which uses a pre-built package, or run it directly with uv by pointing to the repository directory. Once the server is running, use an MCP client (such as the included mcp-client-for-testing) to issue a tool_call to echo_tool and observe the echoed message in the response. This setup is handy for verifying client tool invocation, payload handling, and error propagation in a controlled environment.

How to install

Prerequisites:

  • Python 3.9+ (for the Python-based server)
  • uv (and optionally uvx for config-based execution)
  • Git (to clone the repository)

Installation steps:

  1. Install uv and uvx (per the project’s guidance or the official uv docs).

  2. Clone the repository: git clone https://github.com/piebro/echo-mcp-server-for-testing.git cd echo-mcp-server-for-testing

  3. Install Python dependencies (if any) and set up the environment: python -m venv venv source venv/bin/activate # on Windows use venv\Scripts\activate pip install -r requirements.txt # if a requirements file exists

  4. Run the server directly with uv (from the repository directory) or configure uvx as shown in the README:

    Using uv:

    uv directory run main.py

    Using uvx (recommended for MCP config):

    uvx echo-mcp-server-for-testing

  5. Verify the server starts and is reachable by using an MCP client to send a test tool_call to echo_tool.

Additional notes

  • The SECRET_KEY environment variable is required by the examples in the README; ensure you provide a secure value in production.
  • If running with uvx, ensure the working directory or installed package matches the server name used in the config.
  • When testing, the echo_tool will return the message you pass in the tool_call; use this to validate payload formatting and transport.
  • If you encounter port or binding issues, verify your environment allows the chosen interface and that another MCP server isn’t occupying the same name or port.
  • For Windows users, adjust shell commands to PowerShell syntax as needed (e.g., activate venv and path separators).
  • This server is intended as a testing template; for production, consider adding authentication, input validation, and robust error handling.

Related MCP Servers

Sponsor this space

Reach thousands of developers