Skip to content

MCP server#

The MCP server lets an AI assistant (Claude or another client compatible with the Model Context Protocol) query Empowerment Center data on behalf of a user, with the same permissions and only to read: the only thing it writes is a correction proposal for whoever administers the metadata. The user asks in natural language (“which zone sold the most in 2025?”) and the assistant uses the ECenter tools to search the catalog, build the query, run it and explain the figures.

Before you start#

  • Whoever administers the system has to enable the server: it comes disabled.
  • Each user who will use it needs API and MCP access and Access to Empowerment Center.
  • Each user comes in with a credential with the AI assistants (MCP) scope that they create for themselves or, if the installation configures it, with the company account (see MCP with the company account).

Important

What an assistant queries leaves ECenter towards the AI provider that assistant uses: names of dimensions and members, figures, descriptions. That is why the server comes disabled. Enable it only if the organization has approved it, and limit the connections if needed.

What it is for an assistant#

The MCP server is a thin adapter over the Query API: what applies to it applies here.

  • Read-only, except for a proposal. No tool changes the metadata or the data, sends email or opens addresses. The only one that writes is propose_correction, and it only leaves a pending proposal in the mailbox of the guide for assistants, which whoever administers the metadata reviews.
  • No SQL. No tool accepts or returns SQL. If the user asks “run this SELECT”, the assistant has to rephrase it as a cube query or say it cannot.
  • The user's data. Universes limit the rows and what is hidden does not exist. Asking for it is a COLUMNS_HIDDEN error with identifiers, never with names.
  • ECenter calculates the figures, with the same engine as the cube viewer. The assistant only chooses what to ask for and how to present it.

The server introduces itself with the name ecenter and fixed instructions that tell the assistant how to work: start from an already reviewed document or from the catalog, use only its identifiers, validate before running, ask before confirming a heavy query and cite the universes and the warnings when giving figures, and, if the user says what they wanted after an answer that was not it, offer to send it as a correction.

Enable the server#

  1. Set ECENTER_MCP_ENABLED=true in the backend variables and restart it. Without it, /api/mcp responds 404 MCP_DISABLED.
  2. Check that the proxy sends /api/ to the backend (the frontend image already does).
  3. If an assistant that runs in the browser will use it, add its origin to ecenter.mcp.allowed-origins.
  4. If only some connections should be queried through the MCP, put them in ecenter.mcp.allowed-connections.
  5. Configure ECENTER_PUBLIC_URL with ECenter's public address, so that the screen gives the full address of the server.

Configuration#

Property Default What it is
ecenter.mcp.enabled (ECENTER_MCP_ENABLED) false Enables the server
ecenter.mcp.wait 20s How long run_query waits before answering that the query is still in progress
ecenter.mcp.rows-per-call 200 Rows of a result per call
ecenter.mcp.max-rows-per-call 1000 The most the assistant can request in one call
ecenter.mcp.rate 120 Calls per minute of each credential, per instance
ecenter.mcp.allowed-origins empty Origins accepted in the Origin header (https://asistente.example.org, http://localhost:*). A request with another origin, 403 ORIGIN_NOT_ALLOWED. Without an Origin header (a client that is not a browser) it is not checked.
ecenter.mcp.allowed-connections empty The connections (their UUID) that can be queried through MCP; empty, the holder's
ecenter.mcp.max-payload 1MB The largest body of a request; above it, 413 CONTENT_TOO_LARGE

The query API's limits (2 queries at once per user, 50,000 rows per result, 30 minutes of life) apply equally. See Results, limits and errors.

Connect an assistant#

The user does it themselves from Service credentials, in the account menu.

  1. Open the account menu and choose Service credentials.
  2. In the Connect an assistant (MCP) card, copy the MCP server address with Copy.
  3. Click New credential…, check the AI assistants (MCP) scope and create it (see Service credentials). Copy the secret.
  4. In Configuration, click Copy to take a generic configuration snippet and replace the secret placeholder with the secret.
  5. Paste that configuration into your assistant.

The card only appears if the server is enabled. If the installation has OAuth configured, it also offers With the company account, without a credential.

The Connect an assistant (MCP) card with the server address and the configuration snippetThe Connect an assistant (MCP) card with the server address and the configuration snippet
The Connect an assistant (MCP) card with the server address and the configuration snippet

The snippet has the mcpServers format that most clients understand:

{
  "mcpServers": {
    "ecenter": {
      "type": "http",
      "url": "https://ecenter.example.org/api/mcp",
      "headers": {
        "Authorization": "Bearer <credential secret>"
      }
    }
  }
}

The format may vary a little from one assistant to another. The transport is stateless HTTP (Streamable HTTP); the server responds 405 to GET requests.

claude mcp add --transport http ecenter https://ecenter.example.org/api/mcp \
  --header "Authorization: Bearer $ECENTER_MCP_TOKEN"

Use the card's mcpServers snippet, or configure by hand a remote HTTP server with the address and the Authorization: Bearer <secret> header.

To test the server: npx @modelcontextprotocol/inspector, Streamable HTTP transport, the server address and the Authorization: Bearer <secret> header. Connect in Via Proxy mode: Direct mode calls from the browser with an Origin header that the server rejects if it is not in allowed-origins.

A client that only accepts OAuth needs the configuration with the company account; one that connects from its provider's cloud also needs ECenter to be reachable from the internet.

Tools#

There are twelve tools, with fixed descriptions and in a fixed order. All are read-only except propose_correction, which leaves a proposal in the mailbox:

Tool What it does
list_connections The connections the user can query. If there is one, the assistant uses it without asking. Each connection with a guide for assistants that the user can read brings its resource in guide, so that the assistant reads it before anything else, also if it then goes straight to a workbook.
get_catalog The visible catalog: tables, dimensions (with the groupings), metrics with their business description, and lists. In pages of 200, with search and factTable. If the connection has a guide for assistants that the user can read, it also gives its resource in guide.
search_members The members of a dimension, to write a condition with real codes.
validate_query Validates a query without running it and estimates its rows; proposes the correct identifier if one does not exist.
run_query Runs the query and returns the first 200 rows, the cursor of the next ones and the links to the CSV and the Excel. If it takes longer than 20 s, it returns {id, status: RUNNING}.
get_query_result The status of a query or one more page of its result.
explain_result The explanation in words: the sentence, the segmentation, the tables, the universes and the warnings.
list_workbooks The workbooks the user can open, with their cube documents and their bookmarks. Its first page also brings guide, like get_catalog.
get_document_query The query of a document (and of a bookmark), restricted to what the user sees.
get_preparation_dossier The dossier of a connection to prepare its metadata with the company's AI (see Prepare the guide with the company's AI). Only for whoever has Metadata administration: to everyone else it responds NOT_ALLOWED.
propose_correction Propose a correction. When the user says what they wanted after an answer that was not it and agrees to send it, it leaves a pending proposal with their question, what they wanted, the dimensions and metrics it names and, if there is one, their query that finally answered it correctly (without its figures). It changes nothing: whoever administers the metadata reviews it (see Users' corrections). Its own errors: TOO_MANY_PROPOSALS (10 pending per user and connection, 200 per connection), RESULT_NOT_FOUND (the query is not the user's, has expired or belongs to another connection) and INVALID_PROPOSAL (it does not follow the rules, or names an element that does not exist).
list_my_proposals My corrections. What became of the corrections the user left in a connection: the pending ones and those resolved in the last 90 days, with their status (pending, accepted with its destination or discarded) and the note of whoever reviewed it. Only theirs, without who reviewed them. If the note names something the user does not see, it is not given to them (noteWithheld).

It also offers:

  • Resources: the guide ecenter://guide (how a query is built, the displays, the universes, the limits), the catalog of a connection, the guide for assistants of a connection (ecenter://connections/{id}/guide: the company's definitions and verified examples that the user can read, which the assistant reads before calculating), a workbook, the instructions for preparing the metadata (ecenter://preparation, for the assistant that does not use prompts), and the result of a query in CSV (ecenter://results/{id}.csv), in Excel (ecenter://results/{id}.xlsx), this one for the assistant to offer it to the user, and in Markdown (ecenter://results/{id}.md): the explanation, the table (up to 500 rows) and a footer with the segmentation, the filters, whether it carries totals, the date of the calculation and what is hidden in counts, so that the assistant cites it or pastes it as is.
  • Three prompts in Spanish: analizar_metrica (analyze a metric: one metric, with its breakdown, its period and its connection optional), comparar_periodos (compare periods: one metric, the current period and, optionally, the previous one, which by default is the same one of the previous year) and preparar_metadata (Preparar el metadata para los asistentes, prepare the metadata for the assistants, with the connection optional: the instructions for the AI to prepare the guide and the descriptions of a connection and deliver a file that is uploaded in the metadata editor).

The query the assistant builds is the same as the API's, with all its extensions: comparing periods, calculated metrics, the week, compound queries, “no records”, cumulative %, moving average and aggregation of a dimension. See The cube query.

Verified content only#

A connection can be limited to verified content through the MCP: in Administration › Connections, choose the connection and check Verified content only in the Assistants (MCP) block (with System administration). Then, through the MCP:

  • list_workbooks and a workbook's resource only offer the documents marked Verified (see Verified and obsolete); a workbook without any does not appear.
  • get_document_query of a document that is not verified responds NOT_VERIFIED.
  • validate_query and run_query only calculate what starts from a verified document (from), with its bookmark if wanted and with more segmentation, which only restricts. Other rows, columns or metrics, comparing periods, a compound query or a listing respond NOT_VERIFIED.

The catalog, the members and the guide stay as always: they give no figures. The query API and the application do not change. Removing the mark allows everything again, and the audit records both changes (MCP limited to verified content).

How it is protected#

Risk Defense
Instructions hidden in the data (a workbook name or a description that says “ignore the above…”) Nothing changes the metadata or the data; all text that goes out has no control or invisible characters and is trimmed to 500 characters; the guide tells the assistant that names and values are data, not instructions
A wrong correction, or one written by a deceived assistant, reaching others propose_correction only leaves a pending proposal, with caps per user and per connection; nobody else sees it until whoever administers the metadata reviews it with their own data and turns it into an example or takes it to the guide
Tools changing without notice Fixed descriptions versioned with the product, in a fixed order
Theft of the secret Expiry, revocation, the secret never in the URL, and each result is only seen by the credential that requested it
Excessive use of the database The API's limits, and the assistant has to ask the user before confirming a heavy query
Requests from a malicious website (DNS rebinding) The Origin header, if present, has to be in allowed-origins
Data going to the AI provider Disabled by default, allowed-connections, the notice on the credentials screen and the audit with the MCP channel

Errors#

A tool's errors reach the assistant as a result with isError, the text CODE: message and the same fields as in the API. For example, with something hidden: “COLUMNS_HIDDEN: La consulta usa 1 métrica a la que usted no tiene acceso (1203): quítelo de la consulta” (the query uses 1 metric you have no access to: remove it from the query; the server writes it in Spanish). This way the assistant corrects itself.

Before reaching the tools, the surface responds in HTTP:

HTTP code When
401 CREDENTIAL_REQUIRED, INVALID_CREDENTIAL No credential, or the credential is not valid
403 ORIGIN_NOT_ALLOWED The Origin header is not in allowed-origins
403 NOT_ALLOWED The user does not have API and MCP access and Access to Empowerment Center
403 LICENSE_INVALID No valid license
404 MCP_DISABLED The server is disabled
405 — A GET to /api/mcp
413 CONTENT_TOO_LARGE The body exceeds max-payload
429 RATE_LIMITED More than 120 calls per minute

Check that it works#

A quick test, with the user who will use it:

  1. Connect MCP Inspector or your assistant.
  2. Check that the ecenter server appears with its twelve tools.
  3. Request list_connections and get_catalog: the connections and what that user sees in the application must appear, and nothing of what they do not see.
  4. Ask a question whose answer you know (“total amount by zone”) and compare it with that of the cube viewer of the same user.
  5. Ask about something the user does not see: the assistant must say it has no access, without naming it or making up figures.
  6. In Administration › Audit, check that the queries appear with the MCP channel.

Audit#

The assistant's queries reach the audit like the API's, with the MCP channel and the cred:<id> reference (or oauth:<client> with the company account). The first use of each credential in each hour is recorded as an access; validating, reading the catalog and listing workbooks are not audited. Each propose_correction proposal is recorded as Guide correction proposal, with its question and without what the user wanted or their query.

See also#