mcp-echo-server
v1.0.0
Published
A minimal MCP server template that echoes messages
Maintainers
Readme
MCP Echo Server
A minimal Model Context Protocol (MCP) server template that provides a simple echo functionality. This template is designed to be a starting point for building your own MCP servers.
Features
- Simple echo tool that returns messages
- Minimal dependencies
- TypeScript support
- Ready for npm publishing
Installation
You can run this server directly using npx:
npx mcp-echo-serverOr install it globally:
npm install -g mcp-echo-serverUsage
As an MCP Server
Configure your MCP client to use this server. For example, in Claude Desktop, add to your claude_desktop_config.json:
{
"mcpServers": {
"echo": {
"command": "npx",
"args": ["mcp-echo-server"]
}
}
}Available Tools
The server provides one tool:
- echo: Echoes back any message you send to it
- Parameters:
message(string): The message to echo back
- Parameters:
Development
Setup
# Clone the repository
git clone <your-repo-url>
cd mcp-echo-server
# Install dependencies
npm install
# Build the project
npm run buildRunning in Development
npm run devUsing as a Template
This server is designed to be a minimal starting point. To create your own MCP server:
- Fork or clone this repository
- Update the
package.jsonwith your project details - Modify
src/index.tsto add your own tools - Build and publish to npm
Adding New Tools
To add a new tool, modify src/index.ts:
server.tool(
"your-tool-name",
"Description of what your tool does",
{
// Define your parameters using Zod schema
param1: z.string().describe("Description of param1"),
param2: z.number().optional().describe("Optional param2")
},
async ({ param1, param2 }) => {
// Your tool logic here
return {
content: [{
type: "text",
text: `Your result here`
}]
};
}
);Publishing
To publish your own version:
- Update the
namefield inpackage.json - Set your npm registry (if using a scoped package)
- Run
npm publish
License
MIT
