Echo MCP Server
A simple echo server using Model Context Protocol
Ask AI about Echo MCP Server
Powered by Claude · Grounded in docs
I know everything about Echo MCP Server. Ask me about installation, configuration, usage, or troubleshooting.
0/500
Reviews
Documentation
MCP Examples
This repository contains examples and implementations for the Model Context Protocol (MCP). The examples are designed to demonstrate how to build and use MCP servers and tools effectively.
Repository Structure
The repository is organized as follows:
mcp-node-examples/
echo/
index.ts
package.json
tsconfig.json
mcp-node-examples/echo
This folder contains an example implementation of an MCP server using Node.js. The server includes a simple tool called echo_tool that echoes back the input provided by the client.
Files:
index.ts: The main entry point for the echo server implementation.package.json: Contains the dependencies and scripts for the Node.js project.tsconfig.json: TypeScript configuration file.
Getting Started
To run the examples in this repository, follow these steps:
-
Clone the repository:
git clone https://github.com/muhtalipdede/mcp-examples.git cd mcp-examples/mcp-node-examples/echo -
Install dependencies:
npm install -
Run the server:
npm start
Usage
The echo server listens for client connections and provides the following functionality:
echo_tool: Accepts a string input and returns the same string as output.
Example Request
{
"method": "callTool",
"params": {
"name": "echo_tool",
"arguments": {
"input": "Hello, MCP!"
}
},
"jsonrpc": "2.0",
"id": 1
}
Example Response
{
"result": {
"content": {
"type": "text",
"text": "Echo: Hello, MCP!"
},
"isError": false
},
"jsonrpc": "2.0",
"id": 1
}
Contributing
Contributions are welcome! Feel free to open issues or submit pull requests to improve the examples or add new ones.
License
This repository is licensed under the MIT License. See the LICENSE file for details.
