Matih

ai.matih由 matih.ai 发布官方发布者v0.2.1更新于 Oct 24, 2026

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

已验证Streamable HTTP可网页运行数据库知识与记忆数据与分析

概览

AI 生成的概览

将 AI 助手连接到 Matih 数据平台,以运行受治理的 SQL、指标、目录与血缘查询,并构建仪表板。

可以做什么
通过 MCP 暴露 Matih 数据平台,提供 34 个稳定工具和一个 Beta 工具。查询与 SQL 工具包括 ask(自然语言转为有依据的答案并附上所运行的 SQL)、run_sql、run_analysis、get_query_result 和 export_result。目录工具可列出连接、数据库、模式与表,并描述或分析表;语义层工具可检索本体、实体、关系、语义模型、术语表和关系图。受治理的指标与分类工具可读取和起草指标,仪表板工具可创建图表和仪表板,上传工具则处理文件。此外还提供目录与血缘资源以及 explain_metric 提示。
适用场景
当助手需要针对 Matih 工作区开展工作时适用:用受治理的 SQL 回答数据问题、探索表与血缘、读取或起草指标,或生成图表和仪表板。它面向已将 Matih 作为数据层的团队,而非通用数据库访问。
运行要求
需要形如 https:// .app.matih.ai/api/v1/mcp 的 Matih 工作区端点,以及通过 MATIH_MCP_TOKEN 环境变量提供的 Matih 开发者令牌(mat_agt_…)。本地 stdio 桥接通过 npx 运行,需要 Node.js 20 或更高版本。也可用带 PKCE 的 OAuth 替代静态令牌。租户必须已接受数据处理协议,才能向第三方 LLM 传出数据。
安装前请注意
必须提供 MATIH_MCP_TOKEN 持有者凭据,且应通过环境变量而非命令行参数传递。部分工具会写入:draft_metric 会将指标定义草稿提交到需人工审核的流程,create_chart、create_dashboard、publish_dashboard 和上传工具会更改工作区中的数据。每个工具都受令牌范围限制,应只授予所需的连接与能力。向第三方 LLM 传出数据按租户管控,在协议被接受前会返回 EGESS_CONSENT_REQUIRED。

安装

在 SourceWeft 中

  1. 打开 控制台中的 Matih,将其添加到工作区。
  2. 连接 所需的 凭据。它们会被私密存储,绝不会在公开页面上展示。
  3. 为需要使用其工具的对话启用该服务。

Web executable,通过 Streamable HTTP。 远程服务在工作区中配置后即可从网页运行时运行。

交给智能体安装

把这段提示词粘贴到 Claude Code、Codex、Cursor 等智能体,或 SourceWeft 对话中。智能体会读取该服务器的安装指南,先向你展示发布者、端点和登录方式,经你同意后再把它添加到你的客户端。密钥不会写进任何命令。

阅读 https://sourceweft.com/mcp/ai.matih%2Fmcp/install.md,并按其中说明把这个 MCP 服务器接入我的客户端。修改任何配置之前,先告诉我它的发布者、端点和登录方式,等我确认。不要把 API 密钥写进命令或我会提交的文件;问我密钥应从哪里获取。

查看智能体所依据的安装指南

其他 MCP 客户端

把它添加到你客户端的 mcpServers 配置中。 客户端会在首次连接时完成 OAuth 登录。

{
  "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

来源:README.md,提交 8a2ca5d

工具

0
该服务器需要登录,因此 SourceWeft 无法在没有账号的情况下读取其工具,也未收录。已连接账号所能看到的内容可能因账号及其权限而异。

版本历史

1
  1. v0.2.1最新Sep 16, 2026

评分

已满足适用检查项的 75%

该评分衡量此收录条目的完整程度,依据注册中心条目、端点与公开来源计算得出。它不是对服务器本身的评价,也不表示服务器安全或当前可用:可连通性是带日期的检查结果,评分也不包含安装量或用户评价。

  • 近 30 天内可连通必需25 分
  • 已声明认证方式必需10 分
  • 已列出工具15 分

    请让服务器在无凭据时响应 tools/list,或发布可在沙箱中无凭据启动的软件包。

  • 描述必需15 分
  • 图标10 分
  • 文档15 分
  • 许可证10 分

    请在仓库或注册中心条目中声明许可证。