HTTP Server with MCP Support logo

HTTP Server with MCP Support

by jhgaylor

An HTTP server built with Express and TypeScript that serves both a webpage and a Model Context Protocol (MCP) endpoint. It provides a stateless MCP server implementation with modern Streamable HTTP transport.

View on GitHub

Last updated: N/A

What is HTTP Server with MCP Support?

This is an HTTP server built with Express and TypeScript that implements the Model Context Protocol (MCP). It allows LLMs to interact with external data and functionality through a standardized JSON-RPC API.

How to use HTTP Server with MCP Support?

To use the server, clone the repository, install dependencies with npm install, build the TypeScript code with npm run build, and run the server in development mode with npm run dev. Interact with the MCP endpoint by sending POST requests to /mcp with a JSON-RPC payload, following the MCP specification. The server also serves a webpage at /.

Key features of HTTP Server with MCP Support

  • HTTP server with web and MCP functionality

  • Stateless MCP server implementation

  • TypeScript for type safety

  • Express.js for HTTP handling

Use cases of HTTP Server with MCP Support

  • Enabling LLMs to access external resources

  • Providing LLMs with tools to perform actions

  • Creating user prompts for LLMs

  • Integrating LLMs with existing systems

  • Building custom LLM agents

FAQ from HTTP Server with MCP Support

What is MCP?

MCP stands for Model Context Protocol, a standardized way for LLMs to interact with external data and functionality.

What are the requirements to run this server?

You need Node.js 18+ and npm or yarn installed.

How do I install the server?

Clone the repository, navigate to the directory, and run npm install.

How do I run the server in development mode?

Run npm run dev.

What endpoints are available?

The server supports a web endpoint at / and an MCP endpoint at /mcp.