Skip to content

MCP server

eodia insights exposes an MCP server (Model Context Protocol): Claude, a coding assistant or your own agent can discover your sources, read your metrics and questions, and write Trino SQL — read-only, with the token’s permissions. Only one tool writes: save_question, which keeps a result as a question.

The MCP server is part of the eodia insights server, on the /mcp path: it holds no secret and never reads the data itself. Each call goes, with the caller’s token, through the REST API, and therefore through Trino and its permissions. It serves several people at once, each with their own token.

From My profile or the API and MCP page, create a token with the MCP surface checked (see tokens). It starts with eoi_ and is displayed only once. A token limited to MCP cannot be used on the REST API.

The server speaks Streamable HTTP, stateless, on POST /mcp:

ContextAddress
Production (behind Caddy)https://bi.example.com/mcp
Image in all mode, without a proxyhttp://host:3100/mcp (the interface relays to the server) or http://host:4100/mcp
Developmenthttp://localhost:4100/mcp (pnpm dev:server)

Each request carries the Authorization: Bearer eoi_… header. For a client that accepts an HTTP configuration (Cursor, VS Code…):

{
"mcpServers": {
"eodia-insights": {
"type": "http",
"url": "https://bi.example.com/mcp",
"headers": { "Authorization": "Bearer eoi_…" }
}
}
}

With Claude Code:

Fenêtre de terminal
claude mcp add --transport http eodia-insights https://bi.example.com/mcp \
--header "Authorization: Bearer $EODIA_TOKEN"

With Claude Desktop, through the mcp-remote bridge (claude_desktop_config.json):

{
"mcpServers": {
"eodia-insights": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://bi.example.com/mcp", "--header", "Authorization:${EODIA_AUTH}"],
"env": { "EODIA_AUTH": "Bearer eoi_…" }
}
}
}

The server accepts calls from any origin (the token travels in a header, never in a cookie), which lets in-browser MCP inspectors reach it. To check that it answers, GET /api/health is enough: /mcp lives in the same process.

For a client that launches the server itself, the eodia-mcp binary takes the --stdio option. It ships in the image (/usr/local/bin/eodia-mcp) and can be compiled from a clone of the repository (cargo build --release -p eodia-mcp in apps/server, which puts it in apps/server/target/release/). The application address and the token are passed through the environment:

{
"mcpServers": {
"eodia-insights": {
"command": "/path/to/eodia-insights/apps/server/target/release/eodia-mcp",
"args": ["--stdio"],
"env": { "EODIA_URL": "https://bi.example.com", "EODIA_TOKEN": "eoi_…" }
}
}
}

Without compiling, the published image does the job:

{
"mcpServers": {
"eodia-insights": {
"command": "docker",
"args": ["run", "--rm", "-i", "-e", "EODIA_URL", "-e", "EODIA_TOKEN",
"--entrypoint", "eodia-mcp", "eodia/insights:0.8.0", "--stdio"],
"env": { "EODIA_URL": "https://bi.example.com", "EODIA_TOKEN": "eoi_…" }
}
}
}
VariableDefaultPurpose
EODIA_URLhttp://localhost:4100the application address (the API is under /api)
EODIA_TOKEN—the token; without it, the server refuses to start

Without --stdio, eodia-mcp serves MCP alone over HTTP, on MCP_HOST:MCP_PORT (default 0.0.0.0:4200, the MCP port of earlier versions), relaying to the API at API_URL (default http://localhost:4100); it then also answers GET /health. This is what the image’s mcp role runs (docker run eodia-insights mcp). This optional layout is only useful to run MCP apart from the server — or to keep a pre-0.7 compose file as it is.

ToolPurpose
whoamiwho the token acts for and in which workspace: its owner, their role, their groups, their other workspaces
list_datasourcesthe readable sources, their engine and their Trino catalog
search_schemasearch tables and columns by keywords (name, label, description)
describe_tablea table: qualified name, columns (type, semantic type, keys, description) and values of category columns
list_metricsthe saved metrics
query_metriccompute a metric, grouped by a column or by period (day, week, month, quarter, year), with additional filters
list_questionssearch questions, models, metrics and dashboards
run_questionrun a saved question; variables are passed in parameters
run_sqlrun read-only Trino SQL: SELECT, WITH, SHOW, DESCRIBE, EXPLAIN, VALUES or TABLE
get_dashboardsummarize a dashboard: tabs, filters, cards and the ID of their question
show_chartdisplay a chart in the conversation: a saved question (with its visualization) or Trino SQL, with the desired chart type, stacking and title
save_questionsave a SQL query and its visualization as a question, in the person’s personal folder (or the one given): to find again, put on a dashboard, share. The query is run once first: a query that fails is not saved

All are annotated as read-only, except save_question. The server advises the agent to prefer an existing metric or question, then to locate the tables before writing SQL. Results reach it as Markdown tables of at most 50 rows; run_sql reads 200 rows by default, 10,000 at most.

show_chart declares an interface, ui://eodia/chart.html, following the MCP Apps extension (io.modelcontextprotocol/ui): clients that support it — Claude, ChatGPT, VS Code… — draw the chart in the conversation, in a sandboxed frame. It is built as in the application: same chart types (radar included), same palettes, same formats, same value colors; it follows the client’s light or dark theme, and Open ↗ leads to the question in eodia insights (PUBLIC_URL).

A client without MCP Apps — Open WebUI, for instance — receives the same result as a Markdown table, and the chart as a PNG image, drawn on the server as in the application: the client shows it, and the model can read it. The page is a single HTML file, with no external resource: the clients’ default security policy is enough.

Show me the orders by month and by status, as stacked bars.
  • It changes nothing: only save_question creates a question, in folders the person can write to; no tool modifies or deletes. Trino, in any case, only accepts reads from people.
  • It never has more permissions than its token’s owner: row rules, masked and hidden columns apply as in the interface.
  • It loses access immediately when the token is revoked.

Its queries appear in the token owner’s history, with the origin “API”: MCP goes through the REST API.

eodia insights is free software by Eodia.