Express MCP Server Echo
Implements an MCP server using Express.js as the HTTP framework for handling MCP JSON-RPC requests and responses, with support for Streamable HTTP transport.
Built with TypeScript to provide type safety throughout the MCP server implementation, enhancing code quality and developer experience.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Express MCP Server Echoecho back 'Hello, how are you today?'"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Express MCP Server
A stateless Model Context Protocol (MCP) server built with Express and TypeScript.
Features
Stateless MCP server implementation with modern Streamable HTTP transport
TypeScript for type safety
Express.js for HTTP handling
Related MCP server: Echo MCP Server
Requirements
Node.js 18+
npm or yarn
Installation
# Clone the repository (or download)
git clone https://github.com/your-username/sample-express-mcp-server.git
cd sample-express-mcp-server
# Install dependencies
npm installDevelopment
# Build the TypeScript code
npm run build
# Run in development mode with auto-reloading
npm run dev
# Run tests (when added)
npm testServer Structure
src/
├── index.ts # Main application entry point
└── server.ts # MCP server definition with resource, tool, and promptAvailable Functionality
This server implements a simple echo endpoint with three MCP components:
Resource:
echo://{message}- Returns the message as a resourceTool:
echo- Echoes the provided message back as a tool responsePrompt:
echo- Creates a user prompt with the provided message
MCP Protocol
This server implements the Model Context Protocol (MCP), a standardized way for LLMs to interact with external data and functionality. It exposes a stateless API endpoint that responds to JSON-RPC requests.
API Usage
Send a POST request to /mcp with a JSON-RPC payload:
Initialize
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Accept: text/event-stream" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {
"roots": {
"listChanged": true
},
"sampling": {}
},
"clientInfo": {
"name": "ExampleClient",
"version": "1.0.0"
}
}
}'Call Echo Tool
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-H "Accept: application/json" \
-H "Accept: text/event-stream" \
-d '{
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"name": "echo",
"arguments": {
"message": "Hello, World!"
}
},
"id": 1
}'License
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Flicense-qualityFmaintenanceThis server implements the Model Context Protocol to facilitate meaningful interaction and understanding development between humans and AI through structured tools and progressive interaction patterns.57
- AlicenseCqualityDmaintenanceA simple server implementing the Model Context Protocol (MCP) that echoes messages back, designed for testing MCP clients.12MIT
- Flicense-qualityDmaintenanceA basic Model Context Protocol server implementation that demonstrates core functionality including tools and resources for AI chat applications.
- AlicenseDqualityDmaintenanceA minimal Model Context Protocol server in TypeScript that demonstrates MCP-compliant resources and tools for LLMs, featuring simple resources and a basic tool that echoes messages or returns greetings.15Apache 2.0
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
A Model Context Protocol server for Wix AI tools
MCP (Model Context Protocol) server for Appwrite
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jhgaylor/express-mcp-server-echo'
If you have feedback or need assistance with the MCP directory API, please join our Discord server