@nyuchi/mzizi-mcp 0.5.0-beta.1 → 0.5.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -40,7 +40,8 @@ connect. After that, reads are free and unlimited.
40
40
  ### stdio (local / offline)
41
41
 
42
42
  Run the stdio bin via npx — useful for Claude Code, Cursor, or any assistant that
43
- speaks stdio MCP:
43
+ speaks stdio MCP. **It is zero-config** — the public mzizi registry URL + its
44
+ publishable (anon, RLS read-only) key are baked in, so no `env` is needed:
44
45
 
45
46
  ```json
46
47
  {
@@ -48,18 +49,21 @@ speaks stdio MCP:
48
49
  "mzizi": {
49
50
  "type": "stdio",
50
51
  "command": "npx",
51
- "args": ["-y", "@nyuchi/mzizi-mcp"],
52
- "env": {
53
- "SUPABASE_URL": "https://grjsboqkaywpwatvrzmy.supabase.co",
54
- "SUPABASE_PUBLISHABLE_KEY": "<anon-key>"
55
- }
52
+ "args": ["-y", "@nyuchi/mzizi-mcp"]
56
53
  }
57
54
  }
58
55
  }
59
56
  ```
60
57
 
61
- `SUPABASE_URL` defaults to the canonical mzizi project if omitted. Only
62
- `SUPABASE_PUBLISHABLE_KEY` is required for the stdio path.
58
+ This is the **sanctioned headless path**: the hosted `mcp.mzizi.dev` endpoint
59
+ sits behind an interactive, browser-only WorkOS signup gate that a headless agent
60
+ (Claude Code, CI, an offline client) can't complete, whereas the stdio bin reads
61
+ the same public registry directly with no login.
62
+
63
+ To point the bin at a fork or a self-hosted mirror, override the defaults with
64
+ `SUPABASE_URL` and `SUPABASE_PUBLISHABLE_KEY` (their `NEXT_PUBLIC_` equivalents
65
+ are also accepted). Neither value is a secret — the publishable key only grants
66
+ the anon role, which RLS restricts to read-only reads of the public registry.
63
67
 
64
68
  ---
65
69
 
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Public connection defaults for the stdio bin.
3
+ *
4
+ * mzizi-mcp is a FREE, PUBLIC tool. The registry it serves
5
+ * (`component_documents` on the Mzizi Supabase project) is public,
6
+ * read-only, RLS-enforced anon access — exactly the audience Supabase's
7
+ * publishable/anon keys are designed for ("safe to ship in client apps").
8
+ *
9
+ * Baking the project URL + publishable key in as DEFAULTS makes
10
+ * `npx mzizi-mcp` work with zero configuration — which is what a headless
11
+ * agent (Claude Code, a CI job, a local MCP client) needs, since the hosted
12
+ * `mcp.mzizi.dev` endpoint sits behind an interactive, browser-only WorkOS
13
+ * signup gate that a headless session cannot complete.
14
+ *
15
+ * These are NOT secrets:
16
+ * - the URL is a public project endpoint;
17
+ * - the publishable key only grants the anon role, which RLS restricts to
18
+ * read-only SELECT on the public registry tables.
19
+ * There is no service-role key here and no write path.
20
+ *
21
+ * Both are overridable via env (`SUPABASE_URL` / `SUPABASE_PUBLISHABLE_KEY`,
22
+ * or their `NEXT_PUBLIC_` equivalents) for anyone pointing the bin at a
23
+ * fork or a self-hosted mirror. If the publishable key is ever rotated,
24
+ * ship a new release (or set the env var) — the env override always wins.
25
+ */
26
+ export declare const DEFAULT_SUPABASE_URL = "https://grjsboqkaywpwatvrzmy.supabase.co";
27
+ /** Modern publishable key (sb_publishable_…) — anon role, RLS read-only. */
28
+ export declare const DEFAULT_SUPABASE_PUBLISHABLE_KEY = "sb_publishable_90MsojNH3bKYBWIJFb3VpA_O_hbz-wQ";
29
+ //# sourceMappingURL=defaults.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.d.ts","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,eAAO,MAAM,oBAAoB,6CAA6C,CAAA;AAE9E,4EAA4E;AAC5E,eAAO,MAAM,gCAAgC,mDAAmD,CAAA"}
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Public connection defaults for the stdio bin.
3
+ *
4
+ * mzizi-mcp is a FREE, PUBLIC tool. The registry it serves
5
+ * (`component_documents` on the Mzizi Supabase project) is public,
6
+ * read-only, RLS-enforced anon access — exactly the audience Supabase's
7
+ * publishable/anon keys are designed for ("safe to ship in client apps").
8
+ *
9
+ * Baking the project URL + publishable key in as DEFAULTS makes
10
+ * `npx mzizi-mcp` work with zero configuration — which is what a headless
11
+ * agent (Claude Code, a CI job, a local MCP client) needs, since the hosted
12
+ * `mcp.mzizi.dev` endpoint sits behind an interactive, browser-only WorkOS
13
+ * signup gate that a headless session cannot complete.
14
+ *
15
+ * These are NOT secrets:
16
+ * - the URL is a public project endpoint;
17
+ * - the publishable key only grants the anon role, which RLS restricts to
18
+ * read-only SELECT on the public registry tables.
19
+ * There is no service-role key here and no write path.
20
+ *
21
+ * Both are overridable via env (`SUPABASE_URL` / `SUPABASE_PUBLISHABLE_KEY`,
22
+ * or their `NEXT_PUBLIC_` equivalents) for anyone pointing the bin at a
23
+ * fork or a self-hosted mirror. If the publishable key is ever rotated,
24
+ * ship a new release (or set the env var) — the env override always wins.
25
+ */
26
+ export const DEFAULT_SUPABASE_URL = "https://grjsboqkaywpwatvrzmy.supabase.co";
27
+ /** Modern publishable key (sb_publishable_…) — anon role, RLS read-only. */
28
+ export const DEFAULT_SUPABASE_PUBLISHABLE_KEY = "sb_publishable_90MsojNH3bKYBWIJFb3VpA_O_hbz-wQ";
29
+ //# sourceMappingURL=defaults.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"defaults.js","sourceRoot":"","sources":["../src/defaults.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AAEH,MAAM,CAAC,MAAM,oBAAoB,GAAG,0CAA0C,CAAA;AAE9E,4EAA4E;AAC5E,MAAM,CAAC,MAAM,gCAAgC,GAAG,gDAAgD,CAAA"}
package/dist/server.d.ts CHANGED
@@ -23,7 +23,7 @@
23
23
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
24
24
  import type { SupabaseClient } from "@supabase/supabase-js";
25
25
  import type { FundiToolContext } from "./fundi-client.js";
26
- export declare const MZIZI_MCP_VERSION = "0.5.0-beta.1";
26
+ export declare const MZIZI_MCP_VERSION = "0.5.0-beta.2";
27
27
  /**
28
28
  * Build the Mzizi MCP server bound to a Supabase client with public read on
29
29
  * `mcp_tool_registry` / `component_documents` and EXECUTE on the backing RPCs.
package/dist/server.js CHANGED
@@ -22,7 +22,7 @@
22
22
  */
23
23
  import { McpServer } from "@modelcontextprotocol/sdk/server/mcp.js";
24
24
  import { CallToolRequestSchema, ListToolsRequestSchema, } from "@modelcontextprotocol/sdk/types.js";
25
- export const MZIZI_MCP_VERSION = "0.5.0-beta.1";
25
+ export const MZIZI_MCP_VERSION = "0.5.0-beta.2";
26
26
  const str = (description) => ({ type: ["string", "null"], description });
27
27
  const reqStr = (description) => ({ type: "string", description });
28
28
  const int = (description) => ({ type: ["integer", "null"], description });
package/dist/stdio.d.ts CHANGED
@@ -1,11 +1,20 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * stdio entry — for the MCP registry (`npx mzizi-mcp`).
3
+ * stdio entry — for the MCP registry (`npx mzizi-mcp`) and local MCP clients
4
+ * (Claude Code, etc.).
4
5
  *
5
6
  * Spawns the server over the stdio transport, using a long-lived Supabase
6
7
  * anon client. RLS on `component_documents` enforces read-only.
7
8
  *
8
- * Env:
9
+ * Zero-config: the public Mzizi registry URL + publishable key are baked in
10
+ * as defaults (see defaults.ts — they are not secrets), so `npx mzizi-mcp`
11
+ * works with no environment set. This is the sanctioned headless path: the
12
+ * hosted mcp.mzizi.dev endpoint sits behind an interactive, browser-only
13
+ * WorkOS signup gate that a headless agent cannot complete, whereas this bin
14
+ * reads the same public registry directly.
15
+ *
16
+ * Env (optional — override the defaults to point at a fork / self-hosted
17
+ * mirror):
9
18
  * SUPABASE_URL (or NEXT_PUBLIC_SUPABASE_URL)
10
19
  * SUPABASE_PUBLISHABLE_KEY (or NEXT_PUBLIC_SUPABASE_ANON_KEY)
11
20
  */
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../src/stdio.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG"}
1
+ {"version":3,"file":"stdio.d.ts","sourceRoot":"","sources":["../src/stdio.ts"],"names":[],"mappings":";AACA;;;;;;;;;;;;;;;;;;GAkBG"}
package/dist/stdio.js CHANGED
@@ -1,22 +1,37 @@
1
1
  #!/usr/bin/env node
2
2
  /**
3
- * stdio entry — for the MCP registry (`npx mzizi-mcp`).
3
+ * stdio entry — for the MCP registry (`npx mzizi-mcp`) and local MCP clients
4
+ * (Claude Code, etc.).
4
5
  *
5
6
  * Spawns the server over the stdio transport, using a long-lived Supabase
6
7
  * anon client. RLS on `component_documents` enforces read-only.
7
8
  *
8
- * Env:
9
+ * Zero-config: the public Mzizi registry URL + publishable key are baked in
10
+ * as defaults (see defaults.ts — they are not secrets), so `npx mzizi-mcp`
11
+ * works with no environment set. This is the sanctioned headless path: the
12
+ * hosted mcp.mzizi.dev endpoint sits behind an interactive, browser-only
13
+ * WorkOS signup gate that a headless agent cannot complete, whereas this bin
14
+ * reads the same public registry directly.
15
+ *
16
+ * Env (optional — override the defaults to point at a fork / self-hosted
17
+ * mirror):
9
18
  * SUPABASE_URL (or NEXT_PUBLIC_SUPABASE_URL)
10
19
  * SUPABASE_PUBLISHABLE_KEY (or NEXT_PUBLIC_SUPABASE_ANON_KEY)
11
20
  */
12
21
  import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
13
22
  import { createClient } from "@supabase/supabase-js";
14
23
  import { createMziziMcpServer } from "./server.js";
24
+ import { DEFAULT_SUPABASE_URL, DEFAULT_SUPABASE_PUBLISHABLE_KEY } from "./defaults.js";
15
25
  async function main() {
16
- const url = process.env.SUPABASE_URL ?? process.env.NEXT_PUBLIC_SUPABASE_URL ?? "";
17
- const key = process.env.SUPABASE_PUBLISHABLE_KEY ?? process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ?? "";
26
+ const url = process.env.SUPABASE_URL ?? process.env.NEXT_PUBLIC_SUPABASE_URL ?? DEFAULT_SUPABASE_URL;
27
+ const key = process.env.SUPABASE_PUBLISHABLE_KEY ??
28
+ process.env.NEXT_PUBLIC_SUPABASE_ANON_KEY ??
29
+ DEFAULT_SUPABASE_PUBLISHABLE_KEY;
18
30
  if (!url || !key) {
19
- process.stderr.write("mzizi-mcp: missing SUPABASE_URL or SUPABASE_PUBLISHABLE_KEY (NEXT_PUBLIC_ equivalents are accepted)\n");
31
+ // Unreachable with the baked defaults, but keep an actionable message in
32
+ // case someone explicitly sets one var to an empty string.
33
+ process.stderr.write("mzizi-mcp: missing SUPABASE_URL or SUPABASE_PUBLISHABLE_KEY. Leave both unset to use " +
34
+ "the public Mzizi registry defaults, or set them to point at a fork / self-hosted mirror.\n");
20
35
  process.exit(1);
21
36
  }
22
37
  const supabase = createClient(url, key, {
package/dist/stdio.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"stdio.js","sourceRoot":"","sources":["../src/stdio.ts"],"names":[],"mappings":";AACA;;;;;;;;;GASG;AAEH,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAA;AAChF,OAAO,EAAE,YAAY,EAAE,MAAM,uBAAuB,CAAA;AACpD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAA;AAElD,KAAK,UAAU,IAAI;IACjB,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,CAAC,YAAY,IAAI,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,EAAE,CAAA;IAClF,MAAM,GAAG,GACP,OAAO,CAAC,GAAG,CAAC,wBAAwB,IAAI,OAAO,CAAC,GAAG,CAAC,6BAA6B,IAAI,EAAE,CAAA;IACzF,IAAI,CAAC,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;QACjB,OAAO,CAAC,MAAM,CAAC,KAAK,CAClB,uGAAuG,CACxG,CAAA;QACD,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;IACjB,CAAC;IACD,MAAM,QAAQ,GAAG,YAAY,CAAC,GAAG,EAAE,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