Meili CDC Docs

AI agents (MCP)

meilisearch-cdc includes a Model Context Protocol server, so AI assistants and IDE agents can inspect and operate your pipelines with tokens you control, limited to what each role may do.

Settings MCP tab with the enable switch, the endpoint URL, MCP tokens with roles and expiry, and the role-by-tool access policy
The MCP settings: endpoint, tokens and the access policy.

Enable the endpoint

In Settings → MCP (admin), turn the server on. It speaks MCP's Streamable HTTP transport at /mcp on the service's address, for example https://cdc.example.com/mcp. While disabled, /mcp answers 404. Disabling keeps tokens and the policy; meilisearch-cdc admin mcp disable does the same from the server.

Tokens

Every client authenticates with its own bearer token: Authorization: Bearer cdcmcp_….

  • Generate token: a name (where it is used, such as "Claude Desktop (ops)"), a role (viewer, moderator or admin) and an expiry (never, 7, 30 or 90 days in the dashboard; any duration such as "720h" through the API).
  • The token is shown once, together with a ready-to-paste client configuration. Only a hash is stored; the list shows its prefix (cdcmcp_ab12), creator, last use and expiry.
  • Rotate issues a new token with the same name, role and lifetime; the old one stops working at once.
  • Revoke deletes it. Revocation, expiry and policy changes apply to the very next call, even in an open session.
  • meilisearch-cdc admin mcp revoke-tokens revokes them all from the server.

Client configuration

Generic Streamable HTTP clients

This is the snippet the dashboard shows when a token is created; most MCP clients that support remote HTTP servers accept this shape:

{
  "mcpServers": {
    "meilisearch-cdc": {
      "type": "http",
      "url": "https://cdc.example.com/mcp",
      "headers": {
        "Authorization": "Bearer cdcmcp_…"
      }
    }
  }
}

Claude Code

claude mcp add --transport http meilisearch-cdc https://cdc.example.com/mcp \
  --header "Authorization: Bearer cdcmcp_…"

Claude Desktop

Claude Desktop's configuration file starts local (stdio) servers. Bridge to the remote endpoint with the mcp-remote package (needs Node.js), in claude_desktop_config.json:

{
  "mcpServers": {
    "meilisearch-cdc": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://cdc.example.com/mcp",
               "--header", "Authorization: Bearer ${CDC_MCP_TOKEN}"],
      "env": { "CDC_MCP_TOKEN": "cdcmcp_…" }
    }
  }
}

Clients must reach the endpoint over HTTPS in production; see Reverse proxy and TLS (the /mcp path should not be buffered).

Tools

The minimum role is the default grant; the policy can change it. Mutating tools are marked as such to clients (destructive hint) and every successful mutating call is written to the audit log as mcp.<tool> with its arguments.

ToolMin. roleMutatingWhat it does
overviewviewernoSummary of all tasks, throughput and the Meilisearch instance.
list_tasksviewernoCDC tasks with their live status (secrets redacted).
get_taskviewernoA task definition and its live status, counters, lag and checkpoint.
get_task_logsviewernoRecent activity log of a task, newest last.
schema_checkviewernoCompare source columns, index fields and index settings; lists issues.
get_diffviewernoThe last document diff between source and index.
list_dlqviewernoDocuments Meilisearch rejected for a task.
list_destinationsviewernoMeilisearch instances with health, last sync and the tasks writing to them.
list_indexesviewernoIndexes with document counts and the tasks writing them.
get_indexviewernoIndex primary key, stats and field distribution.
search_indexviewernoRun a Meilisearch search to verify synced data.
get_index_settingsviewernoCurrent Meilisearch settings of an index.
preview_index_settingsviewernoWhich settings would change, without applying them.
list_meili_tasksviewernoRecent Meilisearch tasks (custom metadata cdc:<task> marks CDC writes).
list_alert_rulesviewernoAlert rules and their channels.
list_alert_eventsviewernoRecent alert events, newest first.
task_actionmoderatoryesStart, stop, pause, resume, restart, resync or reset the checkpoint of a task.
batch_task_actionmoderatoryesApply a lifecycle action to several tasks.
test_connectionmoderatornoConnect with a task definition, read its schema and sample documents.
run_diffmoderatoryesStart a document diff (and optional repair); poll get_diff.
replay_dlqmoderatoryesResend rejected documents to Meilisearch.
create_taskadminyesCreate a task from a definition (see the cdc://docs/api resource).
update_taskadminyesReplace a task definition; running tasks restart.
delete_taskadminyesDelete a task, optionally with its source resources and index.
update_index_settingsadminyesApply Meilisearch settings to an index and wait for the task.
create_alert_ruleadminyesCreate an alert rule with email, Telegram or webhook channels.
delete_alert_ruleadminyesDelete an alert rule.

Index tools accept an optional destination argument (the default destination when omitted).

Resources

URIContent
cdc://overviewTasks by state, throughput and Meilisearch health.
cdc://tasksEvery task with its status.
cdc://tasks/{id}One task with its status.
cdc://tasks/{id}/logsRecent activity of a task.
cdc://indexesIndexes of the default Meilisearch destination.
cdc://destinationsDestinations with health and synced tasks.
cdc://alerts/activeAlerts currently firing.
cdc://docs/apiThe REST API and the task and rule JSON formats, for agents that create tasks.

Access policy

The policy grants each role a list of tools and resources. By default every role gets the tools whose minimum role it meets and every resource. Admins can tick or untick tools and resources per role in the MCP tab, and Reset to defaults restores the default grants. A session sees only the tools and resources its token's role is granted, and every call is checked again against the current policy.

Grant carefully

The policy is the check MCP calls go through: granting an admin tool such as delete_task to the viewer role lets viewer tokens use it. Keep mutating tools on roles whose tokens you would trust with them.

Audit

Mutating calls appear in Settings → Audit log as mcp.task_action, mcp.create_task, … with the token's name (mcp:<name>) and up to 500 characters of the arguments. Token creation, rotation, revocation and policy changes are recorded like any other admin write.

Meili CDC user guide · last updated 2026-10-26 · Edit this page on GitHub

meilisearch-cdc is open source. Meilisearch is a trademark of Meili SAS; this project is not affiliated with it.