Express MCP Server
@jhgaylor
An MCP server providing tools to extract text from things
概要
What is Express MCP Server?
Express MCP Server is a stateless Model Context Protocol (MCP) server built with Express and TypeScript. It implements a simple echo endpoint with a resource, tool, and prompt, using modern Streamable HTTP transport for LLMs to interact with external data.
How to use Express MCP Server?
Clone the repository, install dependencies with npm install, build TypeScript with npm run build, and run in development mode with npm run dev. The server exposes a POST /mcp endpoint that accepts JSON-RPC requests. Use curl to send initialize and tools/call commands as shown in the README.
Key features of Express MCP Server
- Stateless MCP server with Streamable HTTP transport
- TypeScript for type safety
- Express.js for HTTP handling
- Three echo components: resource, tool, and prompt
- Simple JSON-RPC endpoint for LLM interaction
Use cases of Express MCP Server
- Testing MCP protocol implementations in a controlled environment
- Building a lightweight mock MCP server for development
- Providing a quick echo service for LLM tool demonstrations
- Prototyping MCP resource, tool, and prompt integration
FAQ from Express MCP Server
What runtime and package manager are required?
Node.js 18+ and either npm or yarn.
How do I interact with the server?
Send a POST request to /mcp with a JSON-RPC payload, as shown in the curl examples for initialize and tools/call.
What MCP components does the server provide?
A resource at echo://{message}, a tool called echo, and a prompt called echo – all echo the provided message back.
What transport does the server use?
It uses the Streamable HTTP transport for Model Context Protocol.
Is the server stateful or stateless?
It is stateless; each request is handled independently without persistent session state.