Echo MCP Server

Echo MCP Server

A Model Context Protocol (MCP) server implementing a echo service using .NETCORE

aadversteeg

Developer Tools
Visit Server

README

Echo MCP Server

A simple echo server implementing the Model Context Protocol (MCP). This server provides a basic echo functionality through the MCP interface.

Overview

The Echo MCP server is built with .NET Core using the Model Context Protocol C# SDK (github.com/modelcontextprotocol/csharp-sdk). It provides a tool for echoing messages back to the client. The server is designed to be lightweight and demonstrates how to create a custom MCP server with a simple functionality. It can be deployed either directly on a machine or as a Docker container.

Features

  • Echo any message back to the client
  • Customizable message format through configuration
  • Built on the Model Context Protocol standard

Getting Started

Prerequisites

  • .NET 9.0 (for local development/deployment)
  • Docker (for container deployment)

Build Instructions (for development)

If you want to build the project from source:

  1. Clone this repository:

    git clone https://github.com/yourusername/echo-mcp-server.git
    
  2. Navigate to the project root directory:

    cd echo-mcp-server
    
  3. Build the project using:

    dotnet build src/echo.sln
    
  4. Run the tests:

    dotnet test src/echo.sln
    

Docker Support

Manual Docker Build

To build the Docker image yourself:

# Navigate to the repository root
cd echo-mcp-server

# Build the Docker image
docker build -f src/Core.Infrastructure.McpServer/Dockerfile -t echo-mcp-server:latest src/

# Run the locally built image
docker run -d --name echo-mcp echo-mcp-server:latest

MCP Protocol Usage

Client Integration

To connect to the Echo MCP Server from your applications:

  1. Use the Model Context Protocol C# SDK or any MCP-compatible client
  2. Configure your client to connect to the server's endpoint
  3. Call the available tools described below

Available Tools

echo

Echoes the message back to the client.

Parameters:

  • message (required): The message to echo back.

Example request:

{
  "name": "echo",
  "parameters": {
    "message": "Hello, world!"
  }
}

Example response:

Echo: Hello, world!

Configuration

MessageFormat

The MessageFormat setting determines how the echoed message is formatted. It uses a template string with the {message} placeholder that gets replaced with the input message.

You can set the MessageFormat in two ways:

  1. appsettings.json file (for local deployment):
{
  "MessageFormat": "Server says: {message}"
}
  1. Environment Variables (for containerized deployments):

When using MCP server with Claude, environment variables are passed through the Claude Desktop configuration as shown in the "Configuring Claude Desktop" section below.

If not specified, the server defaults to "Echo: {message}".

Configuring Claude Desktop

Using Local Installation

To configure Claude Desktop to use a locally installed Echo server:

  1. Add the server configuration to the mcpServers section in your Claude Desktop configuration:
"echo": {
  "command": "dotnet",
  "args": [
    "YOUR_PATH_TO_DLL\\Core.Infrastructure.McpServer.dll"
  ],
  "env": {
    "MessageFormat": "Claude says: {message}"
  }
}
  1. Save the file and restart Claude Desktop

Using Docker Container

To use the Echo server from a Docker container with Claude Desktop:

  1. Add the server configuration to the mcpServers section in your Claude Desktop configuration:
"echo": {
  "command": "docker",
  "args": [
    "run",
    "--rm",
    "-i",
    "-e", "MessageFormat=Claude says: {message}",
    "echo-mcp-server:latest"
  ]
}

Using Docker with Custom Configuration File

To use a custom configuration file from your host system:

  1. Create a custom configuration file on your host machine (e.g., echo-appsettings.json):
{
  "MessageFormat": "My Custom Format: {message}",
  "Logging": {
    "LogLevel": {
      "Default": "Information",
      "Microsoft": "Warning"
    }
  }
}
  1. Update the Claude Desktop configuration to mount this file:
"echo": {
  "command": "docker",
  "args": [
    "run",
    "--rm",
    "-i",
    "-v", "C:/path/to/echo-appsettings.json:/app/appsettings.json",
    "echo-mcp-server:latest"
  ]
}

Important Notes:

  • The configuration file must exist on your host system before starting the container
  • You can use any filename on the host (e.g., echo-appsettings.json), but it must be mounted to /app/appsettings.json inside the container
  • Make sure the path is correct for your operating system (Windows uses backslashes or forward slashes, Linux/macOS use forward slashes)
  • After changing the configuration file, restart Claude Desktop to apply the changes
  1. Save the file and restart Claude Desktop

License

This project is licensed under the MIT License - see the LICENSE file for details.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
MCP Package Docs Server

MCP Package Docs Server

Facilitates LLMs to efficiently access and fetch structured documentation for packages in Go, Python, and NPM, enhancing software development with multi-language support and performance optimization.

Featured
Local
TypeScript
Claude Code MCP

Claude Code MCP

An implementation of Claude Code as a Model Context Protocol server that enables using Claude's software engineering capabilities (code generation, editing, reviewing, and file operations) through the standardized MCP interface.

Featured
Local
JavaScript
@kazuph/mcp-taskmanager

@kazuph/mcp-taskmanager

Model Context Protocol server for Task Management. This allows Claude Desktop (or any MCP client) to manage and execute tasks in a queue-based system.

Featured
Local
JavaScript
Linear MCP Server

Linear MCP Server

Enables interaction with Linear's API for managing issues, teams, and projects programmatically through the Model Context Protocol.

Featured
JavaScript
mermaid-mcp-server

mermaid-mcp-server

A Model Context Protocol (MCP) server that converts Mermaid diagrams to PNG images.

Featured
JavaScript
Jira-Context-MCP

Jira-Context-MCP

MCP server to provide Jira Tickets information to AI coding agents like Cursor

Featured
TypeScript
Linear MCP Server

Linear MCP Server

A Model Context Protocol server that integrates with Linear's issue tracking system, allowing LLMs to create, update, search, and comment on Linear issues through natural language interactions.

Featured
JavaScript
Sequential Thinking MCP Server

Sequential Thinking MCP Server

This server facilitates structured problem-solving by breaking down complex issues into sequential steps, supporting revisions, and enabling multiple solution paths through full MCP integration.

Featured
Python