MCP Tool AI
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., "@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.
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 installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
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/dkokane0/mcp-tool-ai'
If you have feedback or need assistance with the MCP directory API, please join our Discord server