What is Coral (MCP Gateway)?
Coral (MCP Gateway) is a self-hosted MCP gateway where agents write TypeScript programs, Coral checks every call against your policy, and working code becomes a reusable custom tool. It sits in the Gateways & Routing category of the Evaluation & Production Ops tools and is open-source, written in Rust and licensed Apache-2.0 (ee/ directory under the Coral Enterprise license).
Overview
Coral is an open-source, self-hosted gateway that sits between AI agents and the systems they work on — GitHub, Slack, Linear, databases, internal APIs. Instead of exposing hundreds of individual tool schemas to the model, Coral builds on the "code mode" approach: the agent finds tools with `coral.search`, reads their TypeScript signatures, and sends Coral a short TypeScript program through a single `exec` tool. One program can call several tools, filter the results and return only what the task needs, so less raw data passes through the model's context.
Each program runs in a fresh V8 isolate with no network access, no credentials and no imports. Every provider call it makes goes through Coral's policy check: each provider tool and custom tool is set to Allow, Ask or Block, and an Ask pauses the run until a person approves the exact call with its arguments. Only then does Coral add the credentials and forward the call. Runs happen on the Coral server, so they continue if the agent disconnects, and every run is attributed to the person or agent that started it. Providers can be set to act as the caller's own account, so teammates share tools without sharing API tokens.
The distinctive part is custom tools. When a program succeeds, the agent can save it as a private tool and call it next time in one step as `coral.private.<name>(...)`; a workspace owner can publish it to everyone as `coral.shared`. Because a custom tool is code, it can hold rules that a plain allow/block list cannot — the README's example is a `closeStaleTicket` tool that changes one field, and only on tickets with no activity for 30 days — while Coral still checks every provider call inside it. The project reports that across 34 tasks on GitHub, Linear and Slack, custom tools cut tokens by 37%, cost by 31% and time by 29%.

Coral is written in Rust and runs either as a desktop app (macOS on Apple silicon, Windows x64, Linux x86_64) or as a shared team server under Docker Compose or Kubernetes with an OIDC identity provider and SQLite or Postgres. Providers come from a catalog or from any OpenAPI document or MCP server, and any MCP-capable agent can connect. The open-source edition is Apache-2.0 with no limits on users, agents or volume; an `ee/` directory holds Enterprise Edition code (SSO with SAML, SCIM, advanced RBAC, an immutable audit log) under its own licence. Coral v1 replaced the 0.x SQL interface with TypeScript programs.
What it does
- Code mode over MCP: agents search tools, read TypeScript signatures and send one program that chains several calls through a single `exec` tool
- Programs run in fresh V8 isolates with no network, credentials or imports; Coral injects credentials only after the policy check
- Allow, Ask or Block per provider tool and per custom tool, with approvals showing the exact call and arguments
- Custom tools: successful programs saved as private tools and shareable across a workspace, with provider calls inside still policy-checked
- Connects anything with an MCP server or OpenAPI document; providers can act as each caller's own account
- Runs as a desktop app or a self-hosted team server (Docker Compose or Kubernetes, OIDC, SQLite or Postgres)
Getting started
Use the desktop app for yourself, or run a shared server for a team. Either way, you add a provider and then point your MCP client at the workspace's MCP URL.
Install Coral
Download the desktop app from withcoral.com/download (macOS on Apple silicon, Windows x64, Linux x86_64). For a team, run a shared server with Docker Compose or Kubernetes; it needs an OIDC identity provider, a reverse proxy for TLS, and SQLite or Postgres.
Add a provider
Pick a service such as GitHub or Linear from the catalog, or bring your own OpenAPI document or MCP server. By default, tools that read data run right away and everything else needs your approval.
Connect your agent
Copy the workspace's MCP URL from the Coral UI and add it to your MCP client.
claude mcp add --scope user --transport http coral <your-mcp-url> # Claude Code
codex mcp add coral --url <your-mcp-url> # CodexAsk a question
Ask something that uses the provider, such as "What are my open pull requests?". Behind the scenes the agent sends Coral a program like this one, which finds unreviewed pull requests and posts them to Slack (pausing for approval if posting requires it).
const { data: pulls } = await coral.providers.github.pulls.list({
owner: "withcoral",
repo: "coral",
state: "open",
});
const unreviewed = pulls.filter((pull) => pull.requested_reviewers.length === 0);
await coral.providers.slack.chat.postMessage({
channel: "#engineering",
text: unreviewed.map((pull) => `#${pull.number} ${pull.title}`).join("\n"),
});
return unreviewed.map((pull) => pull.number);Commands and code are distilled from the project's own documentation — always check the official repo for the latest.
When to use it
- Giving an AI SRE agent access to telemetry and deploy tools while restricting rollbacks to the services you name
- Letting a support agent issue refunds through a custom tool that escalates to a person in the cases you define
- Sharing vetted, reusable tools across a team without handing out API tokens, since providers can act as each caller
- Cutting tokens and cost on repeated agent tasks by reusing saved custom tools instead of re-deriving the steps each run
How Coral (MCP Gateway) compares
Coral (MCP Gateway) alongside other open-source gateways & routing tools AI/TLDR tracks, ranked by GitHub stars.
| Tool | Stars | What it does |
|---|---|---|
| OmniRoute | ★ 91.4k | A local-first AI gateway that fronts hundreds of model providers with one OpenAI-compatible endpoint, quota-aware auto-fallback, many routing strategies and prompt compression. |
| Free Claude Code | ★ 74.7k | A local proxy that points Claude Code, Codex, Pi, OpenCode, Cline and other agent CLIs at 50 free, paid, subscription or local model providers, with automatic failover and an admin UI. |
| LiteLLM | ★ 64.2k | A Python SDK and proxy server that gives one OpenAI-compatible API to 100+ LLM providers, with cost tracking, budgets, fallbacks, rate limiting, and an admin UI. |
| Kong Gateway | ★ 44.4k | A Lua/NGINX API gateway whose AI Gateway plugins put one universal endpoint in front of OpenAI, Anthropic, Gemini, Bedrock and other providers, with semantic routing, caching and MCP traffic governance. |
| magpie | ★ 43.7k | Menu bar app and local gateway that lets Claude Code, Codex, Gemini CLI and dozens of other coding agents run on any provider's model, with routing groups that fail over across accounts when a quota runs out. |
| 9Router | ★ 33k | Local OpenAI-compatible router for coding CLIs that tracks per-provider quota, falls back from subscription to cheap to free models, and compresses tool results to cut tokens. |
| Experiential | ★ 20.1k | An open-source gateway that puts hosted, BYOK, local and custom models behind one OpenAI-compatible API, with per-identity model and spend limits and routers fitted from your own traces. |
| Coral (MCP Gateway) | ★ 5k | A self-hosted MCP gateway where agents write TypeScript programs, Coral checks every call against your policy, and working code becomes a reusable custom tool |
