multi-ai-hub
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., "@multi-ai-hubask Ollama to summarize the latest meeting notes"
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.
Multi-AI Hub
Privacy-first local MCP hub for coordinating multiple AI providers from Claude Code.
The hub runs on your machine, exposes a small Model Context Protocol server, and lets a commander agent ask bounded questions to other providers without handing them your whole workspace. It supports local Ollama seats for private work, cloud seats for non-sensitive critique, and a structured council mode for independent review.
Console and sharing
A GitHub repository is source code, not a running console. localhost and 127.0.0.1 always refer to the visitor's own computer. Sharing that address does not share your hub.
The repository includes the complete browser console in public/. There are two ways to use it:
Mode | Run | What it does |
Local console |
| Runs on your computer and calls only providers you configure. Cloud requests may incur charges. |
Public demo build |
| Produces |
Preview the demo with pnpm preview:demo, then open the local URL it prints. Demo and local modes are explicitly labelled. The demo works under a hosting subpath, such as /multi-ai-hub/, without contacting anyone's localhost. See deployment and privacy boundaries.
No hosted console URL is configured in this repository. A demo build does not itself publish a website.
Related MCP server: MCP-AI-Gateway
What It Does
Exposes MCP tools for Claude Code:
ask_openai,ask_gemini,ask_ollama,ask_qwen,ask_llama_fast,council_review,multi_ai_status, and optional cloud seats.Keeps API keys server-side in
.env; they are never sent to the browser.Uses local Ollama seats for private review and offline fallback.
Blocks obvious sensitive prompts from cloud seats with a fail-closed routing check.
Supports optional OpenAI-compatible cloud reviewers: Groq, Cerebras, Mistral, OpenRouter, GLM, and NVIDIA NIM.
Provides smoke tests and a secret/private marker scanner for safer sharing.
Includes a responsive console with provider configuration status, sample prompts, in-memory output, copy/clear actions, and recoverable errors. Each request is independent; previous messages are not sent as conversation context.
Providers
Base providers:
Claude via Claude Code CLI / Claude Max, or Anthropic API
OpenAI API
Gemini API
Ollama local models
Council seats:
Local: Qwen 30B, fast local seat, manual DeepSeek
Cloud: Gemini, Groq, Cerebras, Mistral, OpenRouter, GLM, NVIDIA NIM
Cloud seats are dormant until their matching API key is set.
Quick Start
Requirements:
Node.js 20+
pnpm
Claude Code installed or available through this package
Optional: Ollama for local seats
Install and configure:
git clone https://github.com/Star-957/multi-ai-hub.git
cd multi-ai-hub
pnpm install --frozen-lockfile
Copy-Item .env.example .envAdd provider keys to .env as needed:
GEMINI_API_KEY=
OPENAI_API_KEY=
NVIDIA_API_KEY=
OLLAMA_URL=http://127.0.0.1:11434Start the local HTTP server:
pnpm startOpen the URL printed by the server (default http://127.0.0.1:8787) on that same computer. You should see the console, not a 404. Keep the terminal running. Each person using the real console installs their own copy and supplies their own provider access.
For local inference, install/start Ollama separately and download the model named in .env. OLLAMA_URL accepts only a loopback HTTP(S) origin; remote endpoints and redirects are refused so seats labelled local stay on-machine. An empty value disables local seats. The console's configured label indicates settings are present; it is not a live connectivity or quota check. For Claude CLI, use the CLI's existing login. API providers need their own credentials and billing arrangements. Example model IDs may need updating to models available to your account.
HOST accepts only 127.0.0.1, localhost, or ::1; PORT must be an integer from 1 to 65535. Other bind addresses fail at startup. If startup reports the port is in use, stop the other instance or choose another local port.
Run the MCP server from Claude Code by pointing your MCP config at:
node node_modules/tsx/dist/cli.mjs src/mcp-server.tsMCP Tools
Always registered:
ask_openaiask_geminiask_ollamaask_qwenask_llama_fastask_deepseekcouncil_reviewmulti_ai_status
Conditionally registered when configured:
generate_imageask_groqask_cerebrasask_mistralask_openrouterask_glmask_nvidia
multi_ai_status reports provider availability, model names, Claude CLI status, and council seat metadata without exposing secrets.
NVIDIA NIM
NVIDIA NIM is supported as an OpenAI-compatible cloud seat. See docs/providers/nvidia.md.
Default values:
NVIDIA_MODEL=meta/llama-3.3-70b-instruct
NVIDIA_BASE_URL=https://integrate.api.nvidia.com/v1Smoke-test configured cloud seats:
pnpm smoke:cloud-seatsSafety Model
This is a local single-user tool, not a hosted multi-tenant service.
The HTTP server rejects public bind addresses and cross-origin browser requests. It checks loopback peer/Host/Origin, requires JSON and a custom header for chat, limits input size, allows one active request and at most 10 model requests per minute, and hides raw provider exception details. These are local safeguards, not remote-user authentication or billing controls. Do not tunnel, reverse-proxy, or port-forward this server to the internet.
Only the allowlisted static demo is suitable for public hosting. A real shared service would need a separate authenticated backend, authorization, per-user credentials and spend controls, HTTPS, and an explicit privacy/retention design.
Sensitive prompts are blocked from obvious cloud routes, but the classifier is a guardrail, not a legal or security guarantee. Use local/private seats for identity, legal, financial, medical, credential, or proprietary content.
The UI stores no chat in browser storage. Reloading clears the display; provider-side retention still applies. Generated images are saved locally in data/generated/ and are never included in the demo build. The app adds no analytics, external fonts, or remote image embeds.
Local HTTP interface
GET /api/statusreturns configuration flags, model metadata,apiVersion: 1, andmode: "local"; it does not test providers or return keys.POST /api/chatrequiresContent-Type: application/jsonandX-Hub-Request: console, with{ "provider": "ollama", "message": "Explain sorting" }. Browser calls must come from the console's exact origin. Maximum message length: 12,000 characters.Responses contain
text,artifacts, andtrace. Error responses use{ "error": "…" }; 400/413/415 indicate invalid input, 403 a safety rejection, 409 an unconfigured provider, 429 a busy/rate-limited hub, and 502 a provider failure. Provider errors are not retried automatically by the HTTP layer.The console uses same-origin relative API URLs. There is no public API URL or browser key field. See local HTTP tests.
Before publishing, forking, or sharing a modified copy:
pnpm secret:scanDevelopment
pnpm typecheck
pnpm test
pnpm build:demo
pnpm audit --prod
pnpm secret:scanTests use provider stubs and do not require paid model calls. Smoke commands intentionally contact configured providers; run them only when you want those requests.
License
MIT
This server cannot be deployed
Maintenance
Related MCP Connectors
Real-time chat hub for AI agents — Claude Code, Cursor, Cline, Codex over MCP or REST.
One MCP endpoint for Claude, GPT & Gemini: 100+ tools + no-code connectors + agent workers.
AI routing, memory, guardrails, and governance. Routes across Claude, GPT, Gemini.
Shared memory and mail for your AI agents. Verified with Claude Code; other MCP clients in testing.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA local-first MCP server for coordinating parallel AI coding sessions with tools like Claude Code and Codex in a single repository.2MIT
- FlicenseNot gradedqualityDmaintenanceUnified local MCP AI Gateway that routes across Groq, OpenRouter, Mistral, and local Ollama providers, with OpenAI-compatible APIs, MCP tools, fallback/racing router, monitoring, and web dashboard.-
- AlicenseNot gradedqualityAmaintenanceA local MCP server that connects AI coding agents (Claude Code, Codex, Cursor, etc.) on the same machine via a shared message bus, enabling them to chat, delegate tasks, and collaborate privately without cloud or internet.23 npm20MIT
- AlicenseNot gradedqualityBmaintenanceA local-first LLM routing MCP server that keeps sensitive data on your own models, with fail-closed privacy and manager-worker delegation, exposing route and complete tools to any MCP client.MIT