eMondrian includes an MCP server. MCP (Model Context Protocol) is the standard way AI agents — Claude Code, Claude Desktop and other MCP clients — connect to tools and data.

Through MCP an agent can list your catalogs, read the semantic model, run MDX and DAX queries, and draft, validate and save schemas.

Why the semantic model and not the database? The agent works with business definitions — Revenue, On-Time Rate, Region — that are already defined once, instead of guessing joins and formulas from raw tables. Excel, Power BI and the agent get the same numbers.

Requirements

  • eMondrian Community running — see Install with Docker. The MCP module is included.
  • A license key with the MCP module. The 30-day evaluation key covers both DAX and MCP.
  • An MCP client that supports the HTTP + SSE transport.

Endpoint

http://localhost/emondrian/mcp/sse
  • Another machine: http://<server-address>/emondrian/mcp/sse
  • Port changed in .env: http://localhost:8081/emondrian/mcp/sse
  • Keep the /emondrian prefix — without it, calls fail with HTTP 404.

Connect a client

Claude Code

claude mcp add --transport sse emondrian http://localhost/emondrian/mcp/sse

Claude Desktop — Claude Desktop starts local (stdio) servers, so use the mcp-remote bridge. Add to claude_desktop_config.json and restart Claude Desktop:

{
  "mcpServers": {
    "emondrian": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://localhost/emondrian/mcp/sse"]
    }
  }
}

We haven’t tested this Claude Desktop setup ourselves yet — let us know in GitHub issues if it works for you.

Other clients — point any SSE-capable MCP client to the endpoint above.

Try it on the public demo

The public demo server has the MCP module enabled in read-only mode — no installation and no key needed:

claude mcp add --transport sse emondrian-demo https://demo.emondrian.com/emondrian/mcp/sse

On the demo an agent can list catalogs, read schemas and run MDX and DAX queries (list_catalogs, get_schema, execute_query, validate_schema, get_cube_authoring_guide, list-cubes, run-mdx-query). Tools that change schemas or read server internals (save_schema, read_logs, get_properties) are switched off. For the full tool set, run Community locally.

Try it

  • “Which catalogs and cubes are on this server?” → FoodMart, OnTime
  • “In the OnTime catalog, which airline had the highest cancellation rate in January 2022?”
  • “Compare average arrival delay by day of week and explain the pattern.”
  • “Run this MDX on catalog FoodMart: SELECT {[Measures].[Org Salary]} ON 0 FROM [HR]”

The agent reads the schema, writes the query, runs it and explains the result.

Tools

ToolWhat it does
list_catalogsLists the catalogs declared in datasources.xml
get_schemaReturns the schema XML of a catalog
execute_queryRuns MDX or DAX on a catalog. DAX is detected by a leading EVALUATE or DEFINE. Optional cube argument — required for DAX when the catalog has more than one cube
validate_schemaChecks schema XML for problems the engine doesn’t report (misspelled attributes, key mismatches, …)
save_schemaOverwrites the schema of a catalog (validated first)
get_cube_authoring_guideGuide for writing and editing schemas
get_propertiesShows the server’s mondrian.properties settings
read_logsLists log files or shows the end of one (200 lines by default)
list-cubes, run-mdx-queryLegacy tools for one fixed connection (need -Demondrian.mcp.connectString)

DAX through execute_query: qualify measures with their table ('HR'[Org Salary]) and pass cube for multi-cube catalogs — see DAX support.

Build a schema with an agent

An agent can draft a cube for you using get_cube_authoring_guide, validate_schema and save_schema:

  1. Add the catalog to datasources.xml (reference), create a starting schema file, and restart.

  2. Ask, for example:

    “In catalog MySales, create a cube Sales on the ClickHouse table sales (columns: sale_date, region, product, quantity, amount). Add a Time dimension (Year → Month) from sale_date, Region and Product dimensions, measures Amount and Quantity, and a calculated measure Avg Price = Amount / Quantity. Follow the cube authoring guide, validate the schema, then save it.”

  3. Restart to load the saved schema: docker compose restart eMondrian.

  4. Check: “Show total Amount by Region for the last year.”

Review what the agent wrote — especially that dimension keys are unique (Modeling on ClickHouse). The schema is a plain XML file in schema/; keep it in Git.

Security

Unauthenticated, and not read-only

In Community the MCP endpoint has no authentication, and it includes tools that overwrite schemas (save_schema) and read server logs (read_logs). Anyone who can reach the server can use them. Keep eMondrian on localhost or a trusted network — see Security.

Other limits to know:

  • No row limit. Large results are returned in full — ask the agent for aggregated answers rather than raw detail.
  • No request timeout. A misbehaving MCP client can hold a server thread.

Authentication, per-user access (the agent sees only what the user may see), an audit log of agent queries and query limits are planned for eMondrian Enterprise.

Troubleshooting

ProblemWhat to check
Client can’t connectIs the server up (http://localhost)? URL ends in /emondrian/mcp/sse? Right port? Client supports SSE?
Error POSTing to endpoint (HTTP 404)/emondrian prefix missing, or an old module — update Community (git pull, docker compose up -d)
Module 'MCP' not found in license modulesKey issued for DAX only (evaluation keys issued before 30 September 2026). Request a new evaluation key; if another key was active, restart after activating
No .lic files found / License has expiredSee [[licensing/evaluation
DAX query failsPass cube; qualify measures with their table
Agent’s answer looks wrongAsk the agent to show the query it ran and run it in the OLAP Client. Check the measure definitions in the schema