MCP Tool AI
Click on "Deploy 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., "@MCP Tool AIWhat AI providers are available?"
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.
MCP Tool AI
This repository contains a configurable Model Context Protocol (MCP) gateway. It runs multiple Streamable HTTP MCP servers and exposes all of their tools through one gateway endpoint that can be used from Cursor, Antigravity, or any other MCP client that supports Streamable HTTP.
Project Structure
mcp1.ts- MCP Server 1 on port3000add_numbersubtract_number
mcp2.ts- MCP Server 2 on port3001multiply_numberdivide_number
mcp-ai.ts- AI API MCP server on port3002list_ai_providerslist_ai_modelschat_with_modelopenai_compatible_request
mcp-gateway.ts- Gateway server on port8000Lists tools from both backend servers.
Prefixes tool names with the backend id, such as
1/add_numberorai/chat_with_model.Routes tool calls back to the correct MCP server.
config.ts- Shared environment configuration..env.example- Example environment configuration.
Related MCP server: mcpstead
Requirements
Node.js 20 or newer
npm
Install
npm installCreate a .env file from .env.example and add your provider keys:
PowerShell:
Copy-Item .env.example .envBash:
cp .env.example .envFor NVIDIA hosted NIM, set:
AI_PROVIDERS=nvidia
AI_DEFAULT_PROVIDER=nvidia
AI_NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1
AI_NVIDIA_MODEL=openai/gpt-oss-120b
AI_NVIDIA_API_KEY=your-key-hereNVIDIA NIM exposes OpenAI-compatible endpoints such as
POST /v1/chat/completions and GET /v1/models.
Run
Run everything in one terminal:
npm run allOr open four terminals from the project folder.
Terminal 1:
npm run server1Terminal 2:
npm run server2Terminal 3:
npm run aiTerminal 4:
npm run gatewayEndpoints:
Server 1:
http://localhost:3000/mcpServer 2:
http://localhost:3001/mcpAI Server:
http://localhost:3002/mcpGateway:
http://localhost:8000/mcp
Use the gateway URL in MCP clients:
http://localhost:8000/mcpType Check
npm run typecheckNotes
The gateway uses Streamable HTTP clients to connect to the backend MCP servers. When a client lists tools from the gateway, the gateway fetches tools from each registered backend and returns unique names in the format:
<server-id>/<tool-name>For example:
1/add_number1/subtract_number2/multiply_number2/divide_numberai/list_ai_providersai/list_ai_modelsai/chat_with_modelai/openai_compatible_request
Environment Configuration
All ports, paths, gateway entries, and AI providers are controlled by env vars.
Core MCP settings:
MCP_LISTEN_HOST=127.0.0.1
MCP_PUBLIC_HOST=localhost
MCP_PATH=/mcp
MCP1_PORT=3000
MCP2_PORT=3001
MCP_AI_PORT=3002
MCP_GATEWAY_PORT=8000
MCP_GATEWAY_SERVERS=1,2,aiAI provider settings:
AI_PROVIDERS=nvidia,my-local-api
AI_DEFAULT_PROVIDER=nvidia
AI_NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1
AI_NVIDIA_MODEL=openai/gpt-oss-120b
AI_NVIDIA_API_KEY=your-key-here
AI_MY_LOCAL_API_BASE_URL=http://localhost:11434/v1
AI_MY_LOCAL_API_MODEL=llama3.1
AI_MY_LOCAL_API_API_KEY=Every provider is assumed to be OpenAI-compatible. The AI MCP server adds the
configured key as an Authorization: Bearer ... header by default.
This server cannot be deployed
Maintenance
Related MCP Connectors
Host your MCP tool over streamable HTTP in one command.
Governed MCP gateway: one endpoint for your tools, with credential custody and audit log.
MCP Gateway: wrap any MCP server with cold-start retries, uptime SLA, and per-execution MPP billing.
Remote MCP server exposing SMI Aware tools, resources, and skills over Streamable HTTP.
Related MCP Servers
- AlicenseNot gradedqualityCmaintenanceA standalone MCP gateway that multiplexes multiple backend MCP servers behind a single endpoint, supporting both HTTP and stdio transports. It allows users to dynamically manage backends at runtime and organizes tools using a configurable namespace prefix.MIT
- AlicenseNot gradedqualityDmaintenanceMCP Gateway that aggregates multiple upstream MCP servers into a single endpoint with persistent connections, tool registry, and authentication.14 npm2MIT
- AlicenseNot gradedqualityDmaintenanceA lightweight MCP gateway that aggregates multiple MCP services into a unified stdio interface, automatically prefixing tool names with the service name to avoid conflicts.14 npmMIT
- FlicenseNot gradedqualityDmaintenanceA simple gateway that connects to multiple child MCP servers and forwards tool calls to them, enabling seamless client interactions with multiple tools.11 npm-