Metadata-Version: 2.4
Name: echo-mcp-server-for-testing
Version: 0.1.3
Summary: A simple echo MCP (Model Context Protocol) Server for testing MCP Clients
Author-email: Piet Brömmel <piet.broemmel@gmail.com>
License-Expression: MIT
Project-URL: Homepage, https://github.com/piebro/mcp-server-for-testing
Project-URL: Bug Tracker, https://github.com/piebro/mcp-server-for-testing/issues
Keywords: mcp,server,testing
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Requires-Python: >=3.10
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: ruff
Requires-Dist: mcp
Dynamic: license-file

# echo-mcp-server-for-testing

A simple echo MCP (Model Context Protocol) Server with a simple `echo_tool` for testing MCP Clients.

## Usage

Install [uv](https://docs.astral.sh/uv/) and add the server to an MCP config using `uvx`:

```json
{
    "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:

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

## Development

### Testing

Clone the repo and use [mcp-client-for-testing](https://github.com/piebro/mcp-client-for-testing) to test the tools of the server.

```bash
uvx mcp-client-for-testing \
    --config '
    [
        {
            "name": "echo-mcp-server-for-testing",
            "command": "uv",
            "args": [
                "--directory", 
                "path/to/root/dir/", 
                "run", 
                "server.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:

```bash
uv run ruff format
uv run ruff check --fix
```

### Building with uv

Build the package using uv:

```bash
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:
   ```bash
   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](LICENSE) file for details.
