Skip to main content
Coral ships with a built-in MCP server that presents Coral to agents as a read-only SQL database with catalog discovery.
Before setting up a client, make sure you have connected at least one source.

Client setup

Coral uses stdio transport. If a client supports a command-based install flow, point it at coral mcp-stdio.
Use add-mcp to add the Coral MCP server to all your favorite coding agents with a single command.
(To install only in the current project, omit the -g flag.)

Verify the connection

Once your client is connected, ask the agent to list available Coral tables or run a small query.
“Use Coral to show what sources and tables you can query.”
“Run a small Coral query against coral.tables.”
If it works, the agent should return installed schemas and tables. You do not need to know the MCP tool names; the agent gets discovery helpers and a read-only SQL interface to the same sources you use from coral sql.

What your agent can do

Coral gives your agent a read-only SQL view over the sources you have installed locally. That means your agent can:
  • inspect the available sources, tables, columns, filters, and table functions
  • query connected sources without configuring a separate MCP server for each provider
  • join and aggregate across sources when the question needs more than one API call
  • use the same local credentials and workspace state as the Coral CLI
Set up and update sources with the CLI. The MCP server is the agent-facing query surface, not a source installer. Only connect Coral to agents you trust. A connected agent can query any source installed in that Coral workspace. See Security for more detail.

How to ask for Coral

When your agent has many tools available, name Coral explicitly:
“Use Coral to find the latest open GitHub issues assigned to me.”
“Use Coral to compare recent deploy errors in Datadog with related Slack messages.”
“Use Coral. First inspect the catalog, then query the right tables.”
Good agents will inspect Coral’s catalog before writing SQL, then answer from query results. If an answer needs data from multiple connected sources, ask the agent to combine the data in Coral when possible.

Workspaces

By default, coral mcp-stdio uses your default Coral workspace. If you use a named workspace, add --workspace <name> to the server args in your MCP config. For JSON-style clients, that looks like:

Troubleshooting

  • coral not found: Make sure coral is on your PATH, or use the full path from which coral on macOS or Linux or (Get-Command coral).Source in PowerShell.
  • No tables visible: Run coral source list in your terminal to confirm you have sources installed. If empty, add one with coral source add. See the CLI reference.
  • The agent ignores Coral: Ask it to use Coral by name. For stronger routing, install the Coral agent skills from Installation.