Before setting up a client, create a workspace with
coral workspace create <name> — a fresh install has none — and connect at least one source in it.Client setup
Coral uses stdio transport. If a client supports a command-based install flow, point it atcoral mcp-stdio.
Create a workspace first — a fresh install has none, and coral mcp-stdio cannot
serve one that does not exist:
--workspace in the server args of every client below.
The examples show one workspace called analytics; substitute your own.
- npx add-mcp
- Claude Code
- Codex
- OpenCode
- Cursor
- VS Code
- Claude Desktop
- Other
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
- macOS / Linux
- Windows PowerShell
-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.
Catalog-qualified table names
Thecoral://tables resource exposes catalog_name, schema_name, and
table_name separately for every table. It also provides name for display and
sql_reference for use in FROM and JOIN clauses.
Tables with an empty catalog_name use two-part schema.table names. Database
tables have a catalog and use three-part catalog.schema.table names. Use the
provided sql_reference, which quotes each identifier when required. When
calling list_catalog, describe, or list_columns for a database
table, pass its catalog separately from its schema; omit the catalog for
two-part tables.
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
- search values Coral observed during earlier queries to find the right table and column
- 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
catalog_name, schema_name, and sql_reference
separately. Ordinary Coral sources use schema.table; database sources use
catalog.schema.table. Pass catalog alongside schema to catalog tools when
addressing a database table.
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. Search the catalog for the relevant table or table function, then query the best match.”
“Use Coral to find where payments-api appeared, then query the matching data.”
When the right table or table function is not obvious, ask the agent to search with Coral. The search tool returns catalog metadata and optionally locally observed values.
If an answer needs data from multiple connected sources, ask the agent to combine the data in Coral when possible.
Workspaces
Coral has no default workspace and creates none for you. Create one before connecting a client:analytics, work, default — they are all ordinary names. Naming a workspace
default gives it no special standing and does not make it the one Coral
reaches for when a client names none.
Local stdio servers
coral mcp-stdio picks its workspace in this order: the --workspace NAME
argument, then CORAL_WORKSPACE in the environment the client launched it with,
then your only workspace if you have exactly one.
You need to configure a workspace as soon as you have more than one. With
two or more and nothing selected, the server refuses to start rather than
guessing, and your client reports it as a connection failure. Add
--workspace <name> to the server args:
Loopback MCP over HTTP
coral server can also expose MCP Streamable HTTP on loopback for clients that
speak HTTP rather than stdio:
http://127.0.0.1:14556/mcp/workspace/analytics.
No configuration selects a workspace: the URL does, a workspace is reachable
as soon as it exists, and creating another workspace later just adds another
URL. An unknown name answers not-found until a workspace by that name exists.
Troubleshooting
coralnot found: Make surecoralis on yourPATH, or use the full path fromwhich coralon macOS or Linux or(Get-Command coral).Sourcein PowerShell.- The server exits immediately after your client launches it: Run
coral workspace list. With no workspaces, create one withcoral workspace create <name>. With several and no--workspacein the client’s args, Coral refuses to choose — add the flag naming the one you want. - A stdio server used to start and now does not: Check whether you created another workspace since it last worked. A stdio server needs
--workspacefrom that point on. The HTTP listener is unaffected — each workspace has its own URL. - A workspace URL answers 404: The path must be exactly
/mcp/workspace/<name>and the workspace must exist — check the name withcoral workspace list. The retired/mcppath no longer serves MCP. - No tables visible: Confirm the client is pointed at the workspace your sources are in, then run
coral source list --workspace <name>in your terminal. If empty, add one withcoral source add --workspace <name>. 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.