MCP Echo Server
Project description
# MCP Echo Server
Overview
The MCP Echo Server is a lightweight Python-based microservice designed to provide simple echo functionality. It receives messages and returns them back to the client, serving as a basic diagnostic and testing tool within the MCP framework.
Project Details
- Version: 0.1.0
- Python Compatibility: Python 3.11+
Features
- Message Echo: Returns any message sent to the server
- Comprehensive Validation: Robust input validation using Pydantic models
- Async Server Architecture: Built with asyncio for efficient performance
- Flexible Configuration: Configurable through environment variables and config files
Dependencies
Core dependencies:
- mcp (>=1.6.0)
- pydantic (>=2.11.2)
- PyYAML (>=6.0.2)
Development dependencies:
- pytest (>=8.3.5)
Installation
Prerequisites
- Python 3.11 or higher
- pip
- (Optional) Virtual environment recommended
Install from PyPI
pip install chuk-mcp-echo-server
Install from Source
- Clone the repository:
git clone <repository-url>
cd chuk-mcp-echo-server
- Create a virtual environment:
python -m venv venv
source venv/bin/activate # On Windows, use `venv\Scripts\activate`
- Install the package:
pip install . # Installs the package in editable mode
Development Installation
To set up for development:
pip install .[dev] # Installs package with development dependencies
Running the Server
Command-Line Interface
chuk-mcp-echo-server
Programmatic Usage
from chuk_mcp_echo_server.main import main
if __name__ == "__main__":
main()
Environment Variables
NO_BOOTSTRAP: Set to disable component bootstrapping- Other configuration options can be set in the configuration files
Available Tools
Echo
Input:
message: The string message to echo back
Example:
echo("Hello, world!")
Returns:
- The original message in an EchoResult object
Development
Code Formatting
- Black is used for code formatting
- isort is used for import sorting
- Line length is set to 88 characters
Running Tests
pytest
Contributing
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Ensure code passes formatting and testing
- Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
License
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file chuk_mcp_echo_server-0.1.5-py3-none-any.whl.
File metadata
- Download URL: chuk_mcp_echo_server-0.1.5-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b8687e5bff207ab4164381a6bcb099428374bf40ba0c8a21010a1dfc6f1dc5ff
|
|
| MD5 |
fb9a0187a3556b45b677a198042ac2f8
|
|
| BLAKE2b-256 |
6434ff4aed8d257852ca489d1bfe2b5d629b414cebb9553f5057f76810e07f56
|