{"_id":"@matihlabs/mcp","_rev":"5-8287faddd7147dddcdcce15de7f163d9","name":"@matihlabs/mcp","dist-tags":{"latest":"0.2.1"},"versions":{"0.0.1":{"name":"@matihlabs/mcp","version":"0.0.1","keywords":["matih","mcp","model-context-protocol","sql","data-platform"],"license":"Apache-2.0","_id":"@matihlabs/mcp@0.0.1","maintainers":[{"name":"sushrut-matih","email":"sushrut@matih.ai"}],"homepage":"https://matih.ai","bugs":{"url":"https://github.com/matih-ai/matih-mcp/issues"},"dist":{"shasum":"6dd30bd67c83cc91d18f567a3a278a34ea46c3eb","tarball":"https://registry.npmjs.org/@matihlabs/mcp/-/mcp-0.0.1.tgz","fileCount":3,"integrity":"sha512-E07m0zbWl4NlULfyhPyWnSkfFeuG6ipX4D2wtH9RTk5bvohk4Lt1IAY36KvBL4g8v7wiIs3Fkt0A1beOeD7J0A==","signatures":[{"sig":"MEYCIQDSnvBHAUZjmVMUlvmXXtKiYTlFWaKMkMohB/IjzF+12wIhAKaJyzAmbeiAmVuGYWJ71+Jtbn0upYoc9Q1cUUFb+l+D","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":1836},"main":"index.js","type":"module","engines":{"node":">=20"},"exports":{".":"./index.js"},"gitHead":"1c5b1fa15496ec4d2d2db795b579ecce1e5c7078","_npmUser":{"name":"sushrut-matih","email":"sushrut@matih.ai"},"repository":{"url":"git+https://github.com/matih-ai/matih-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Matih MCP client toolkit — placeholder reserving the @matihlabs npm scope and the @matihlabs/mcp name. The real SDK ships in matih-mcp Phase 2.","directories":{},"_nodeVersion":"25.6.0","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp_0.0.1_1782296760317_0.49830777445173324","host":"s3://npm-registry-packages-npm-production"}},"0.1.0":{"name":"@matihlabs/mcp","version":"0.1.0","keywords":["matih","mcp","model-context-protocol","sql","data-platform","claude","stdio"],"license":"Apache-2.0","_id":"@matihlabs/mcp@0.1.0","maintainers":[{"name":"sushrut-matih","email":"sushrut@matih.ai"}],"homepage":"https://matih.ai","bugs":{"url":"https://github.com/matih-labs/matih-mcp/issues"},"bin":{"matih-mcp":"dist/cli.js"},"dist":{"shasum":"f198f64cd780d1a52ae734f228bdaebf4504239f","tarball":"https://registry.npmjs.org/@matihlabs/mcp/-/mcp-0.1.0.tgz","fileCount":59,"integrity":"sha512-MNa+ftydZGNinAkbBehLftHXgTBe4xTtb2pH6d9a5D3MODO5CKdexS+mmrju8JsDkjfp4+OLzNKwXTT3KK0eLg==","signatures":[{"sig":"MEQCIFoyr+gmDBWko8TFxn30w/1VUx/CQMAnlRjoyIcGGSnzAiB2IhICt0Yqqlrl1blPY4HDlEdfKU2/d3J7ZEfhSBsBwg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@matihlabs%2fmcp@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":111059},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"689beb7cca6322958fab2e52599f1526cf7fb963","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ca0b684-de6a-4a0b-9349-58debf551bbc"}},"repository":{"url":"git+https://github.com/matih-labs/matih-mcp.git","type":"git"},"_npmVersion":"11.17.0","description":"Matih MCP client toolkit — connect AI clients (Claude Desktop, ChatGPT, Cursor) to the Matih data platform over the Model Context Protocol.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.6","typescript":"5.8.3","@types/node":"20.19.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp_0.1.0_1782483282058_0.3636780464960536","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@matihlabs/mcp","version":"0.1.1","keywords":["matih","mcp","model-context-protocol","sql","data-platform","claude","stdio"],"license":"Apache-2.0","_id":"@matihlabs/mcp@0.1.1","maintainers":[{"name":"sushrut-matih","email":"sushrut@matih.ai"}],"homepage":"https://matih.ai","bugs":{"url":"https://github.com/matih-labs/matih-mcp/issues"},"bin":{"matih-mcp":"dist/cli.js"},"dist":{"shasum":"012f95261eda2c694dbf553fceb224969680b908","tarball":"https://registry.npmjs.org/@matihlabs/mcp/-/mcp-0.1.1.tgz","fileCount":59,"integrity":"sha512-kow18K1wwMTEX+V5GIvwX61qx32w3Fy+JzHyBVM0oMSkElC2bNUsO/nUAh2Dab0i2U9aG3gY2tsUPEVcEHgJXA==","signatures":[{"sig":"MEYCIQDLM9+gFcwdg529/Y8zx9/Y7bnXnLsiLgk4MJbSayHAewIhAML9AOeE0UmORiHqRZ68eaklkJoTzn/s3WbxcnP0s2xO","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@matihlabs%2fmcp@0.1.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":111598},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"dfcc2ede1b2897e2e47821f88a1b8fd98cce2790","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ca0b684-de6a-4a0b-9349-58debf551bbc"}},"repository":{"url":"git+https://github.com/matih-labs/matih-mcp.git","type":"git"},"_npmVersion":"11.17.0","description":"Matih MCP client toolkit — connect AI clients (Claude Desktop, ChatGPT, Cursor) to the Matih data platform over the Model Context Protocol.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.6","typescript":"5.8.3","@types/node":"20.19.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp_0.1.1_1782484171257_0.40836020404737705","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@matihlabs/mcp","version":"0.2.0","keywords":["matih","mcp","model-context-protocol","sql","data-platform","claude","stdio"],"license":"Apache-2.0","_id":"@matihlabs/mcp@0.2.0","maintainers":[{"name":"sushrut-matih","email":"sushrut@matih.ai"}],"homepage":"https://matih.ai","bugs":{"url":"https://github.com/matih-labs/matih-mcp/issues"},"bin":{"matih-mcp":"dist/cli.js"},"dist":{"shasum":"9154d7769ee539de3d58c25154276a5188015bec","tarball":"https://registry.npmjs.org/@matihlabs/mcp/-/mcp-0.2.0.tgz","fileCount":59,"integrity":"sha512-WZdcPkeMexHPI1/4fEgIBMeGMaAggSaG0poZe8gfGuPH+q0yQkQDviY9UU8J/Xvu+RUYgtriDlz/6uNOj17ErA==","signatures":[{"sig":"MEQCIEIVjiES8e8yh7yi1vhzDHwQYxoBObWhhLuMu5PzjlkeAiA9KBv3w3y94RP699PYiqcPLbDMDyEnfxbkVn28i7C2lg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@matihlabs%2fmcp@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":141106},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=20"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"99833106e166925323b55d7d4d60e44ef2beea66","scripts":{"test":"vitest run","build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test:watch":"vitest"},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ca0b684-de6a-4a0b-9349-58debf551bbc"}},"repository":{"url":"git+https://github.com/matih-labs/matih-mcp.git","type":"git"},"_npmVersion":"11.18.0","description":"Matih MCP client toolkit — connect AI clients (Claude Desktop, ChatGPT, Cursor) to the Matih data platform over the Model Context Protocol.","directories":{},"_nodeVersion":"20.20.2","publishConfig":{"access":"public","provenance":true},"_hasShrinkwrap":false,"devDependencies":{"vitest":"^3.2.6","typescript":"5.8.3","@types/node":"20.19.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp_0.2.0_1783352710438_0.32382671238992233","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@matihlabs/mcp","version":"0.2.1","description":"Matih MCP client toolkit — connect AI clients (Claude Desktop, ChatGPT, Cursor) to the Matih data platform over the Model Context Protocol.","keywords":["matih","mcp","model-context-protocol","sql","data-platform","claude","stdio"],"license":"Apache-2.0","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"bin":{"matih-mcp":"dist/cli.js"},"scripts":{"build":"tsc -p tsconfig.json","typecheck":"tsc -p tsconfig.json --noEmit","test":"vitest run","test:watch":"vitest"},"repository":{"type":"git","url":"git+https://github.com/matih-labs/matih-mcp.git"},"homepage":"https://matih.ai","publishConfig":{"access":"public","provenance":true},"engines":{"node":">=20"},"devDependencies":{"@types/node":"20.19.0","typescript":"5.8.3","vitest":"^3.2.6"},"mcpName":"ai.matih/mcp","gitHead":"8a2ca5d799bdaf3ca7053d81348ac9b10c120a9b","_id":"@matihlabs/mcp@0.2.1","bugs":{"url":"https://github.com/matih-labs/matih-mcp/issues"},"_nodeVersion":"20.20.2","_npmVersion":"11.18.0","dist":{"integrity":"sha512-osTdw35hCBMGCTz87u4ozwqwCCa6iN0PIvVZhm9Om5b4wswQTMWQ/sQTdYpZspVpUVrkLzhMojjCoPotddTeRA==","shasum":"49d9155d50152f91eba8b7eeff356ed6f8668059","tarball":"https://registry.npmjs.org/@matihlabs/mcp/-/mcp-0.2.1.tgz","fileCount":59,"unpackedSize":141135,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@matihlabs%2fmcp@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIHwr5yzbYVcqS2TwVx3w1dGWMyk2Xf82WwS2x8boRVveAiBti6HLZsoSpwvY5T3dMMybJhPDE0tB17fpVmJ/+Wlr2A=="}]},"_npmUser":{"name":"GitHub Actions","email":"npm-oidc-no-reply@github.com","trustedPublisher":{"id":"github","oidcConfigId":"oidc:4ca0b684-de6a-4a0b-9349-58debf551bbc"}},"directories":{},"maintainers":[{"name":"sushrut-matih","email":"sushrut@matih.ai"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_0.2.1_1783363175154_0.6680864793170505"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T10:26:00.130Z","modified":"2026-07-06T18:39:35.633Z","0.0.1":"2026-06-24T10:26:00.445Z","0.1.0":"2026-06-26T14:14:42.193Z","0.1.1":"2026-06-26T14:29:31.425Z","0.2.0":"2026-07-06T15:45:10.570Z","0.2.1":"2026-07-06T18:39:35.298Z"},"bugs":{"url":"https://github.com/matih-labs/matih-mcp/issues"},"license":"Apache-2.0","homepage":"https://matih.ai","keywords":["matih","mcp","model-context-protocol","sql","data-platform","claude","stdio"],"repository":{"type":"git","url":"git+https://github.com/matih-labs/matih-mcp.git"},"description":"Matih MCP client toolkit — connect AI clients (Claude Desktop, ChatGPT, Cursor) to the Matih data platform over the Model Context Protocol.","maintainers":[{"name":"sushrut-matih","email":"sushrut@matih.ai"}],"readme":"# @matihlabs/mcp\n\nConnect AI clients (Claude Desktop, ChatGPT, Cursor, …) to the **Matih** data\nplatform over the [Model Context Protocol](https://modelcontextprotocol.io). Write\nSQL, profile tables, run analyses + charts, manage dashboards, and upload files —\nall through MCP tools, with OAuth/PKCE auth and PII-safe egress.\n\n> **New here?** See **[QUICKSTART.md](./QUICKSTART.md)** for a step-by-step customer\n> guide — create a token, connect Claude Desktop / Cursor, and copy-paste `curl`\n> smoke tests — plus a troubleshooting table.\n\n## Use as a stdio MCP server (Claude Desktop / Cursor)\n\nAdd to your client's MCP config. The token is delivered via the environment — never\nas a CLI flag (which leaks into the OS process list):\n\n```json\n{\n  \"mcpServers\": {\n    \"matih\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@matihlabs/mcp\", \"https://<slug>.app.matih.ai/api/v1/mcp\"],\n      \"env\": { \"MATIH_MCP_TOKEN\": \"<your Matih bearer token>\" }\n    }\n  }\n}\n```\n\nThe bridge turns the remote Matih HTTP MCP endpoint into a local stdio MCP server,\nforwarding every `tools/call`, `resources/read`, and `prompts/get` to Matih.\n\n> **Endpoint:** replace `<slug>` with your workspace slug — your Matih app lives at\n> `https://<slug>.app.matih.ai` (the bare `app.matih.ai` host does not resolve).\n> Get a `mat_agt_…` token from **Settings → Developer Tokens**. See\n> [QUICKSTART.md](./QUICKSTART.md) for the full walkthrough.\n\n## Use as a library\n\n```ts\nimport { McpClient, MatihTools, StaticTokenProvider } from \"@matihlabs/mcp\";\n\nconst client = new McpClient({\n  endpoint: \"https://<slug>.app.matih.ai/api/v1/mcp\",\n  tokenProvider: new StaticTokenProvider(process.env.MATIH_MCP_TOKEN!),\n});\n\n// discovery-first: fetch the LIVE tool surface (auto-initializes + caches)\nconst live = await client.tools();\nconsole.log(live.map((t) => t.name));\n\n// call ANY tool generically — including Beta tools with no typed wrapper\nconst hot = await client.callTool(\"get_hot_context\", {});\n\n// typed convenience wrappers for the 34 STABLE tools\nconst graph = await new MatihTools(client).exploreGraph({ query: \"orders\", depth: 2 });\nconst matih = new MatihTools(client);\nconst result = await matih.runSql({ connection_id: \"<id>\", sql: \"select 1\" });\n```\n\n### OAuth (PKCE) instead of a static token\n\n```ts\nimport { McpClient, OAuthTokenProvider } from \"@matihlabs/mcp\";\n\nconst tokenProvider = new OAuthTokenProvider({\n  resourceMetadataUrl: \"https://<slug>.app.matih.ai/.well-known/oauth-protected-resource/api/v1/mcp\",\n  clientId: \"<registered client id>\",\n  acquire: async ({ metadata, clientId, resource }) => {\n    // open metadata.authorization_endpoint (PKCE S256, resource=<resource>),\n    // capture the code at your redirect_uri, return { code, verifier, redirectUri }.\n  },\n});\n```\n\nThe provider runs RFC 9728 → RFC 8414 discovery, PKCE S256, RFC 8707 resource-bound\ntokens, caches, and refreshes; a `401 invalid_token` triggers one re-auth.\n\n## Tools\n\nDiscovery is the primary API — `await client.tools()` returns the live tool\ndescriptors and `client.callTool(name, args)` reaches every advertised tool.\nThe typed facade (`MatihTools`) covers the **34 stable tools**\n(`STABLE_TOOL_NAMES`):\n\n- **Query & SQL:** `ask` (natural-language → grounded answer + the SQL it ran),\n  `run_sql`, `run_analysis`, `get_query_result`, `export_result`\n- **Catalog & discovery:** `list_connections`, `list_databases`, `list_schemas`,\n  `list_tables`, `describe_table`, `profile_table`\n- **Ontology & semantic layer:** `search_ontology`, `get_entity`,\n  `get_relationships`, `get_semantic_model`, `get_glossary`, `explore_graph`\n- **Governed metrics & taxonomy:** `get_metric`, `run_metric`, `draft_metric`\n  (write-class — proposes a DRAFT `metric_def` into the human-gated\n  DRAFT → REVIEW → APPROVED → SHIP pipeline), `list_metric_drafts`,\n  `export_semantic_model` (OSI), `get_taxonomy`, `export_taxonomy` (SKOS)\n- **Dashboards & charts:** `create_chart`, `create_dashboard`, `get_dashboard`,\n  `publish_dashboard`\n- **Uploads:** `upload_file`, `upload_status`, `create_upload_url`, `finalize_upload`\n- **Identity & scope:** `whoami`, `get_scope`\n\nThe **1 Beta tool** (`BETA_TOOL_NAMES`: `get_hot_context`) is deliberately\nnot hard-typed while its shape may evolve — call it via\n`client.callTool(name, args)`. The governed metrics & taxonomy group and\n`explore_graph` were promoted from Beta to stable in July 2026 (PDR W3-1).\n\nPlus catalog / lineage **resources** and the `explain_metric` **prompt**. Every\ntool is bounded by the developer token's scope (connections + capabilities you\ngrant in Settings) and never exceeds your own permissions — `get_scope` shows\nexactly what a token allows.\n\n## Notes\n\n- **Egress consent.** Matih gates third-party-LLM data egress per tenant. If your\n  tenant hasn't accepted the data-processing agreement, calls return a clear\n  `EGRESS_CONSENT_REQUIRED` error with a link to accept it.\n- **Node ≥ 20** (uses native `fetch` + `node:crypto`; zero runtime dependencies).\n\nLicense: Apache-2.0 · https://matih.ai\n","readmeFilename":"README.md"}