Matih

ai.matihPublished by matih.aiOfficial publisherv0.2.1Updated Oct 24, 2026

The grounded data layer for any LLM: governed SQL, metrics, lineage and catalog over your data.

VerifiedStreamable HTTPWeb executableDatabasesKnowledge & MemoryData & Analytics

Overview

AI-generated overview

Connects an AI assistant to the Matih data platform to run governed SQL, metrics, catalog and lineage queries, and build dashboards.

What you can do
Exposes the Matih data platform over MCP, with 34 stable tools plus one beta tool. Query and SQL tools include ask (natural language to grounded answer with the SQL it ran), run_sql, run_analysis, get_query_result and export_result. Catalog tools list connections, databases, schemas and tables and describe or profile tables; semantic-layer tools search the ontology, entities, relationships, semantic model, glossary and graph. Governed metrics and taxonomy tools read and draft metrics, and dashboard tools create charts and dashboards, while upload tools handle files. Catalog and lineage resources and an explain_metric prompt are also provided.
When to use it
Use it when an assistant needs to work against a Matih workspace: answering data questions with governed SQL, exploring tables and lineage, reading or drafting metrics, or producing charts and dashboards. It is aimed at teams already using Matih as their data layer rather than at general-purpose database access.
Requirements
A Matih workspace endpoint of the form https:// .app.matih.ai/api/v1/mcp, plus a Matih developer token (mat_agt_…) supplied as the MATIH_MCP_TOKEN environment variable. The local stdio bridge runs via npx and needs Node.js 20 or newer. OAuth with PKCE is an alternative to a static token. The tenant must have accepted the data-processing agreement for third-party LLM egress.
Before you install
The MATIH_MCP_TOKEN bearer credential is required and should be passed via the environment, not a CLI flag. Tools can write: draft_metric proposes a draft metric definition into a human-gated review pipeline, and create_chart, create_dashboard, publish_dashboard and the upload tools change data in the workspace. Every tool is bounded by the token's scope, so grant only the connections and capabilities needed. Third-party LLM data egress is gated per tenant and returns EGESS_CONSENT_REQUIRED…

Installation

In SourceWeft

  1. Open Matih in the dashboard and add it to a workspace.
  2. Connect the required credentials. They are stored privately and never shown on public pages.
  3. Enable the server for the chats that should use its tools.

Web executable via Streamable HTTP. Remote servers run from the web runtime once configured in a workspace.

Use with an agent

Paste this prompt into Claude Code, Codex, Cursor or another agent — or into SourceWeft chat. The agent reads this server's install guide, shows you its publisher, endpoint and sign-in, and adds it to your client once you agree. Keys never go into a command.

Read https://sourceweft.com/mcp/ai.matih%2Fmcp/install.md and connect the MCP server it describes to my client. Before changing any config, show me its publisher, endpoint and sign-in method and wait for my OK. Never put an API key in a command or in a file I would commit; ask me where it should come from.

Read the install guide the agent follows

Other MCP clients

Add this to your client's mcpServers config. The client completes OAuth sign-in on first connect.

{
  "mcpServers": {
    "matih": {
      "type": "http",
      "url": "https://mcp.matih.ai/api/v1/mcp"
    }
  }
}

README

@matihlabs/mcp

Connect AI clients (Claude Desktop, ChatGPT, Cursor, …) to the Matih data platform over the Model Context Protocol. Write SQL, profile tables, run analyses + charts, manage dashboards, and upload files — all through MCP tools, with OAuth/PKCE auth and PII-safe egress.

New here? See QUICKSTART.md for a step-by-step customer guide — create a token, connect Claude Desktop / Cursor, and copy-paste curl smoke tests — plus a troubleshooting table.

Use as a stdio MCP server (Claude Desktop / Cursor)

Add to your client's MCP config. The token is delivered via the environment — never as a CLI flag (which leaks into the OS process list):

json
{  "mcpServers": {    "matih": {      "command": "npx",      "args": ["-y", "@matihlabs/mcp", "https://<slug>.app.matih.ai/api/v1/mcp"],      "env": { "MATIH_MCP_TOKEN": "<your Matih bearer token>" }    }  }}

The bridge turns the remote Matih HTTP MCP endpoint into a local stdio MCP server, forwarding every tools/call, resources/read, and prompts/get to Matih.

Endpoint: replace <slug> with your workspace slug — your Matih app lives at https://<slug>.app.matih.ai (the bare app.matih.ai host does not resolve). Get a mat_agt_… token from Settings → Developer Tokens. See QUICKSTART.md for the full walkthrough.

Use as a library

ts
import { McpClient, MatihTools, StaticTokenProvider } from "@matihlabs/mcp";
const client = new McpClient({  endpoint: "https://<slug>.app.matih.ai/api/v1/mcp",  tokenProvider: new StaticTokenProvider(process.env.MATIH_MCP_TOKEN!),});
// discovery-first: fetch the LIVE tool surface (auto-initializes + caches)const live = await client.tools();console.log(live.map((t) => t.name));
// call ANY tool generically — including Beta tools with no typed wrapperconst hot = await client.callTool("get_hot_context", {});
// typed convenience wrappers for the 34 STABLE toolsconst graph = await new MatihTools(client).exploreGraph({ query: "orders", depth: 2 });const matih = new MatihTools(client);const result = await matih.runSql({ connection_id: "<id>", sql: "select 1" });

OAuth (PKCE) instead of a static token

ts
import { McpClient, OAuthTokenProvider } from "@matihlabs/mcp";
const tokenProvider = new OAuthTokenProvider({  resourceMetadataUrl: "https://<slug>.app.matih.ai/.well-known/oauth-protected-resource/api/v1/mcp",  clientId: "<registered client id>",  acquire: async ({ metadata, clientId, resource }) => {    // open metadata.authorization_endpoint (PKCE S256, resource=<resource>),    // capture the code at your redirect_uri, return { code, verifier, redirectUri }.  },});

The provider runs RFC 9728 → RFC 8414 discovery, PKCE S256, RFC 8707 resource-bound tokens, caches, and refreshes; a 401 invalid_token triggers one re-auth.

Tools

Discovery is the primary API — await client.tools() returns the live tool descriptors and client.callTool(name, args) reaches every advertised tool. The typed facade (MatihTools) covers the 34 stable tools (STABLE_TOOL_NAMES):

  • Query & SQL: ask (natural-language → grounded answer + the SQL it ran), run_sql, run_analysis, get_query_result, export_result
  • Catalog & discovery: list_connections, list_databases, list_schemas, list_tables, describe_table, profile_table
  • Ontology & semantic layer: search_ontology, get_entity, get_relationships, get_semantic_model, get_glossary, explore_graph
  • Governed metrics & taxonomy: get_metric, run_metric, draft_metric (write-class — proposes a DRAFT metric_def into the human-gated DRAFT → REVIEW → APPROVED → SHIP pipeline), list_metric_drafts, export_semantic_model (OSI), get_taxonomy, export_taxonomy (SKOS)
  • Dashboards & charts: create_chart, create_dashboard, get_dashboard, publish_dashboard
  • Uploads: upload_file, upload_status, create_upload_url, finalize_upload
  • Identity & scope: whoami, get_scope

The 1 Beta tool (BETA_TOOL_NAMES: get_hot_context) is deliberately not hard-typed while its shape may evolve — call it via client.callTool(name, args). The governed metrics & taxonomy group and explore_graph were promoted from Beta to stable in July 2026 (PDR W3-1).

Plus catalog / lineage resources and the explain_metric prompt. Every tool is bounded by the developer token's scope (connections + capabilities you grant in Settings) and never exceeds your own permissions — get_scope shows exactly what a token allows.

Notes

  • Egress consent. Matih gates third-party-LLM data egress per tenant. If your tenant hasn't accepted the data-processing agreement, calls return a clear EGRESS_CONSENT_REQUIRED error with a link to accept it.
  • Node ≥ 20 (uses native fetch + node:crypto; zero runtime dependencies).

License: Apache-2.0 · https://matih.ai

Source: README.md at commit 8a2ca5d

Tools

0
This server asks you to sign in, so SourceWeft could not read its tools without an account and has not indexed them. What a connected account sees can depend on that account and its permissions.

Version history

1
  1. v0.2.1LatestSep 16, 2026

Score

75% of the applicable checks met

How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.

  • Reached in the last 30 daysRequired25 pts
  • Auth declaredRequired10 pts
  • Tools listed15 pts

    Answer tools/list without a credential, or ship a package that starts in a sandbox without one.

  • DescriptionRequired15 pts
  • Logo10 pts
  • Documentation15 pts
  • License10 pts

    Declare a license in the repository or the registry entry.