Skip to main content

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

Project description

echo-mcp-server-for-testing

A simple echo MCP (Model Context Protocol) Server with a simple echo_tool for testing MCP Clients. It is also great as a template for new MCP Servers.

Usage

Install uv and add the server to an MCP config using uvx:

{
    "name": "echo-mcp-server-for-testing",
    "command": "uvx",
    "args": [
        "echo-mcp-server-for-testing"
    ],
    "env": {
        "SECRET_KEY": "123456789"
    }
}

or clone the repo and use uv with a directory:

{
    "name": "echo-mcp-server-for-testing",
    "command": "uv",
    "args": [
        "--directory",
        "path/to/root/dir/",
        "run",
        "main.py"
    ],
    "env": {
        "SECRET_KEY": "123456789"
    }
}

Development

Testing

Clone the repo and use mcp-client-for-testing to test the tools of the server.

uvx mcp-client-for-testing \
    --config '
    [
        {
            "name": "echo-mcp-server-for-testing",
            "command": "uv",
            "args": [
                "--directory", 
                "path/to/root/dir/", 
                "run", 
                "main.py"
            ],
            "env": {
                "SECRET_KEY": "123456789"
            }
        }
    ]
    ' \
    --tool_call '{"name": "echo_tool", "arguments": {"message": "Hello, world!"}}'

Formatting and Linting

The code is formatted and linted with ruff:

uv run ruff format
uv run ruff check --fix

Building with uv

Build the package using uv:

uv build

Releasing a New Version

To release a new version of the package to PyPI:

  1. Create and push a new Git tag following semantic versioning:
    git tag v0.2.0
    git push origin v0.2.0
    

The GitHub Actions workflow will automatically build and publish the package to PyPI when a new tag is pushed. The version number will be derived directly from the Git tag.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

echo_mcp_server_for_testing-0.1.5.tar.gz (18.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

echo_mcp_server_for_testing-0.1.5-py3-none-any.whl (4.8 kB view details)

Uploaded Python 3

File details

Details for the file echo_mcp_server_for_testing-0.1.5.tar.gz.

File metadata

File hashes

Hashes for echo_mcp_server_for_testing-0.1.5.tar.gz
Algorithm Hash digest
SHA256 7ac907df3c014ec94b3ee41f42ee5ad1908bcac7d51f0f2c653a5d83ec22536d
MD5 e0b63b6314479afa502d06aca3d9a3df
BLAKE2b-256 909acaa70dc9825367de310e90b92e5296384071bdb51d38fe1bb029e7c6d874

See more details on using hashes here.

Provenance

The following attestation bundles were made for echo_mcp_server_for_testing-0.1.5.tar.gz:

Publisher: publish.yml on piebro/echo-mcp-server-for-testing

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file echo_mcp_server_for_testing-0.1.5-py3-none-any.whl.

File metadata

File hashes

Hashes for echo_mcp_server_for_testing-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 cc7cea559b9e11fd02d1c0de3fb69d287651eed9f24e20427382e72390ef02a7
MD5 efd748fcafe0ad736c31f7f418d692e4
BLAKE2b-256 d2c8a072dbf2bc536f891eefec3a1cfc9eee5e37e84311dcea9fa4003b522d75

See more details on using hashes here.

Provenance

The following attestation bundles were made for echo_mcp_server_for_testing-0.1.5-py3-none-any.whl:

Publisher: publish.yml on piebro/echo-mcp-server-for-testing

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page