StephenDryden/mcp-server-echo
If you are the rightful owner of mcp-server-echo and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
This document provides a structured overview of a minimal Model Context Protocol (MCP) server implemented in C#.
MCP Echo Server (C#)
This is a minimal Model Context Protocol (MCP) server in C# that exposes several demo tools and a workflow prompt.
Build and Run with Docker
-
Build the Docker image:
docker build -t mcp-echo-server .
-
Run the server:
docker run --rm -i mcp-echo-server
MCP Integration
This server is designed for STDIO transport and can be integrated with any MCP-compatible client, such as VS Code or Claude Desktop.
VS Code Integration:
Ensure your .vscode/mcp.json
contains:
{
"servers": {
"echo-server": {
"type": "stdio",
"command": "docker",
"args": [
"run",
"--rm",
"-i",
"mcp-echo-server"
]
}
}
}
Available Tools
Tools
- Echo: Returns the input text as-is.
- Reverse: Returns the reversed input text.
- Upper: Returns the input text in uppercase.
Resources
- SampleFileResource: Returns the contents of
sample.txt
(included in the Docker image).
Prompt
- WorkflowPrompt: "To transform text, first echo it, then reverse it, then convert to uppercase using the available tools."
This prompt can be used by MCP clients to guide tool orchestration in a workflow.
Testing in Copilot Chat Window
You can test the tools and resources directly from the Copilot chat window by entering:
#echo hello world
#reverse hello world
#upper hello world
The server will respond with the expected output for each tool.
To use the workflow prompt, ask Copilot to list available prompts or request:
#mcp_echo-server_workflowPrompt
This verifies that the MCP echo server is running and integrated correctly with Copilot, and demonstrates tool, resource, and prompt usage.
Makefile Usage
For convenience, you can use the provided Makefile:
make build # Build the Docker image
How It Works
How It Works
-
The server exposes three MCP classes:
- Tools (
EchoTools
): Providesecho
,reverse
, andupper
functions for text transformation. - Prompts (
EchoPrompts
): Provides workflow guidance, e.g.,workflowPrompt
for orchestrating tool usage. - Resources (
EchoResources
): Provides access to static files, e.g.,sampleFileResource
returns the contents ofsample.txt
.
- Tools (
-
You can call tools directly in chat (e.g.,
#echo hello world
,#reverse hello world
,#upper hello world
). -
Prompts can be accessed in chat (e.g.,
#workflowPrompt
) to guide workflows. -
Resources are browsable via the MCP resource browser or UI, and may not be directly callable in chat.
-
Designed for easy integration and testing with MCP clients and agents.
See .vscode/mcp.json
for integration details.