Used for configuration management through environment variables in both hub and server components
Serves as the foundation for the MCP hub, handling JSON-RPC requests at the /mcp endpoint and health checks at /health
Provides tool examples that can interact with GitHub through an API key configuration option
Serves as the runtime environment for the MCP server, with specific version requirements (v16 or higher)
Integrates with OpenAI services through an API key configuration, enabling AI capabilities for the MCP server
Used as the implementation language for the hub component, with TypeScript source files compiled to JavaScript
Used for bridge and tool definitions through YAML files in the bridges directory
mcp-hub
Host an express app of streamablehttp and stdio MCP servers that you can use from your own website. (comes with a mini chat dialog to check responses)
Table of Contents
Features
- Streamable HTTP MCP transport server built on Model Context Protocol SDK
- Demo stdio MCP transport server
- Built-in demo tool (
echo
) for testing - Express façade handling JSON-RPC at
/mcp
and health checks at/health
- Mini front-end chat UI to test MCP responses
Prerequisites
- Node.js v16 or higher
- npm (included with Node.js)
Installation
- Clone the repository:
- Install root dependencies in root:
- Install hub and server dependencies:
Configuration
Create environment variable files in both hub/
and server/
directories:
hub/.env
server/.env
Usage
- Build and start the MCP hub server:
- Start the front-end proxy server:
- Open your browser at http://localhost:3000 to access the chat UI.
- The hub JSON-RPC endpoint is available at
http://localhost:4000/mcp
.
Directory Structure
Scripts
All scripts are defined in the root package.json
:
npm run build
: Compile TypeScript inhub
and copy bridge filesnpm run copy:bridges
: Copy bridge YAML definitions tohub/dist
npm run start:hub
: Build then run the MCP hub servernpm run start:server
: Run the Express static server with chat UI
License
- This project is licensed under the Apache License 2.0. See the LICENSE file for details.
This server cannot be installed
An Express server implementation of Model Context Protocol that allows websites to connect to LLMs through streamable HTTP and stdio transports, with a built-in chat UI for testing responses.
Related MCP Servers
- -securityAlicense-qualityA Model Context Protocol server that allows LLMs to interact with web content through standardized tools, currently supporting web scraping functionality.Last updated -PythonMIT License
- -securityAlicense-qualityA Model Context Protocol Server that enables LLMs to interact with and execute REST API calls through natural language prompts, supporting GET/PUT/POST/PATCH operations on configured APIs.Last updated -5PythonApache 2.0
- -securityFlicense-qualityA Model Context Protocol server that enables LLMs to fetch and process web content in multiple formats (HTML, JSON, Markdown, text) with automatic format detection.Last updated -TypeScript
- -securityAlicense-qualityA Model Context Protocol server that enables LLMs to interact with databases (currently MongoDB) through natural language, supporting operations like querying, inserting, deleting documents, and running aggregation pipelines.Last updated -TypeScriptMIT License