mcp-echo-test-server
v1.0.1
Published
A simple MCP server for testing that echoes all input parameters unchanged
Downloads
6
Maintainers
Readme
MCP Echo Test Server
A simple Model Context Protocol (MCP) server for testing parameter passing. This server echoes all input parameters unchanged, making it perfect for debugging and testing MCP integrations.
Features
- 🔄 Echo Tool: Returns all input parameters exactly as received
- 📊 Parameter Analysis: Shows parameter types and count
- 🔍 Debug Mode: Optional verbose logging for troubleshooting
- 📝 Server Info: Provides server capabilities and version information
- 🎯 Type Support: Handles strings, numbers, booleans, arrays, objects, and more
Installation
Via NPM (Recommended)
npm install -g mcp-echo-test-serverFrom Source
git clone https://github.com/yourusername/mcp-echo-test-server.git
cd mcp-echo-test-server
npm install
npm run build
npm linkUsage
With Cursor
Add to your Cursor settings (~/.cursor/mcp_settings.json or through Cursor Settings UI):
{
"mcpServers": {
"echo": {
"type": "stdio",
"command": "npx",
"args": ["-y", "mcp-echo-test-server"],
"env": {
"DEBUG": "false"
}
}
}
}With Claude Desktop
Add to your Claude configuration:
{
"mcpServers": {
"echo": {
"command": "npx",
"args": ["-y", "mcp-echo-test-server"],
"env": {
"DEBUG": "false"
}
}
}
}Enable Debug Mode
Set the DEBUG environment variable to "true" for verbose logging:
{
"env": {
"DEBUG": "true"
}
}Available Tools
1. echo
Echoes all input parameters unchanged. Perfect for testing parameter passing.
Parameters:
string_param(optional): String parameter for testingnumber_param(optional): Number parameter for testingboolean_param(optional): Boolean parameter for testingarray_param(optional): Array parameter for testingobject_param(optional): Object parameter with any propertiesextra_params(optional): Additional parameters as key-value pairs- Any other parameters are also accepted and returned
Example Response:
{
"status": "success",
"message": "Echo successful - parameters returned as received",
"data": {
"received_params": {
"string_param": "test",
"number_param": 42,
"boolean_param": true
},
"param_count": 3,
"param_types": {
"string_param": "string",
"number_param": "number",
"boolean_param": "boolean"
}
},
"timestamp": "2024-10-16T03:50:00.000Z"
}2. server_info
Returns information about the MCP Echo Server.
Parameters: None
Example Response:
{
"status": "success",
"message": "MCP Echo Server Info",
"data": {
"name": "mcp-echo-test-server",
"version": "1.0.0",
"description": "A simple MCP server that echoes all input parameters",
"capabilities": [
"echo - Returns all input parameters unchanged",
"server_info - Returns server information"
]
},
"timestamp": "2024-10-16T03:50:00.000Z"
}Development
Project Structure
mcp-echo-test-server/
├── src/
│ ├── index.ts # Business logic (EchoClient)
│ └── dotenv-silent.ts # Silent environment variable loader
├── examples/
│ └── mcp-server.ts # MCP server implementation
├── package.json
├── tsconfig.json
├── mcp.json # MCP tool definitions
└── README.mdBuild
npm run buildTest Locally
npm run testClean Build
npm run cleanUse Cases
- Testing MCP Integration: Verify your MCP client setup is working correctly
- Parameter Debugging: Understand how parameters are passed and received
- Type Validation: Test different parameter types and structures
- Protocol Learning: Learn how MCP servers work with a simple example
- Troubleshooting: Use debug mode to diagnose connection issues
Technical Details
- Protocol: Model Context Protocol (MCP)
- Transport: Standard I/O (stdio)
- Communication: JSON-RPC 2.0
- Runtime: Node.js >= 16.0.0
- Language: TypeScript
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Author
Deng Pengfei
Support
For issues, questions, or suggestions, please create an issue on GitHub.
