Skip to content

Menu

Materialize MCP Server logo

Materialize MCP Server

Published

At a glance

Category
Databases
Hosted by the vendor
https://materialize.com/docs/integrations/mcp-server/
Watch out for
Every tool is read-only and accepts one statement per call; INSERT, UPDATE and CREATE are rejected.

Materialize used to ship a separate MCP server as its own GitHub project, but that repository is now archived and its README sends readers to the docs. The current server is built into the database itself. Materialize serves MCP directly from the engine, so there is no sidecar process or extra service to deploy.

There are two endpoints. The agent endpoint at /api/mcp/agent (from v26.24) lets an agent discover and read the real-time data products you publish as materialized views or indexed views. The developer endpoint at /api/mcp/developer (from v26.20) is aimed at people running Materialize: it reads the mz_* system catalog for troubleshooting and can run read-only queries on your own objects.

Both speak JSON-RPC 2.0 over HTTP POST, on port 6876 by default for self-managed installs. Auth is either a Basic token built from a login role and app password or, from v26.30, OAuth where the client opens a browser to sign in. The local emulator exposes the endpoints with no authentication at all.

How it connects

Your AI app

An assistant or agent that supports MCP

Materialize MCP Server

Runs as

  • npx (Node.js)
  • Remote (HTTP)

Gives the agent

  • Data product discovery
  • Reading data products
  • Ad hoc SQL on the agent endpoint
  • System catalog inspection
  • Read-only queries for operators

Materialize

Signs in with

  • OAuth / browser sign-in
Your AI app talks to Materialize MCP Server over the Model Context Protocol, and the server carries out the work. Built from the setup and capability sections on this page.

What it can do

Data product discovery
get_data_products lists the materialized views and indexed views the role can see, and get_data_product_details returns a JSON schema with column names, types and descriptions for one of them.
Reading data products
read_data_product pulls rows from a named data product, with an optional limit and an optional cluster override.
Ad hoc SQL on the agent endpoint
The agent endpoint's query tool runs PostgreSQL-compatible SELECT statements against any object the role has SELECT on, not only published data products.
System catalog inspection
On the developer endpoint, query_system_catalog runs a read-only query restricted to mz_* tables, pg_catalog and information_schema, on the mz_catalog_server cluster.
Read-only queries for operators
The developer endpoint's query tool (v26.30 and later) runs SELECT, SHOW or EXPLAIN against user objects, and needs a cluster argument for those and for EXPLAIN ANALYZE.

Setting it up

Get the endpoint URL from the Materialize Console: open the Connect modal, choose the MCP Server tab, then Agent or Developer. On self-managed without TLS it is http://<host>:6876/api/mcp/developer, and the emulator uses http://localhost:6876/api/mcp/developer. For token auth, create a dedicated login role with an app password and encode it with printf 'my_dev_agent:<your_app_password>' | base64. In Claude Code, run claude mcp add --transport http materialize-developer <baseURL>/api/mcp/developer --header "Authorization: Basic <mcp-token>", then restart Claude Code. In Cursor, add a materialize-developer entry to ~/.cursor/mcp.json with "url" set to the endpoint and a "headers" object holding "Authorization": "Basic <mcp-token>", then restart Cursor. Claude Desktop style configs go through the community mcp-remote bridge (npx -y [email protected] with the URL and an Authorization header), and from v26.30 you can skip the token and use OAuth by adding a custom connector with the remote URL.

Where each client keeps its MCP config file, and the JSON it expects (cheat sheet)

Where it helps

  • Ask an agent which data products exist, then read the schema of one before writing a report query against it.
  • Pull the latest few hundred rows from a materialized view of live orders or inventory to answer a question in chat.
  • Query the mz_* catalog to find which clusters, sources or indexes are behind a slow or stale view.
  • Run EXPLAIN on a user query from inside the editor to see how Materialize plans it.

Limitations and things to watch

  • Every tool is read-only and accepts one statement per call; INSERT, UPDATE and CREATE are rejected.
  • read_data_product returns 500 rows by default and caps at 1000, and responses larger than mcp_max_response_size (1,000,000 bytes by default) fail.
  • The agent query tool is on by default from v26.27, and Materialize warns it can affect performance and expose operational metadata; enable_mcp_agent_query_tool turns it off.
  • The Basic token is only base64-encoded, not encrypted, so the docs recommend a dedicated role and keeping config files out of version control.
  • Features depend on version: the developer endpoint needs v26.20, the agent endpoint v26.24, and OAuth v26.30.

Sources

Written from the project's own documentation, checked November 2026.

How we research: where our facts come from, how often we re-check them, and why no one can pay for a review or a verdict.

Reviews and commentsShow

Reviews

Sign in to leave a review.

Loading reviews…

Comments

Sign in to leave a comment.

Loading comments…