meguro-mcp 0.1.0 → 0.2.0

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/CHANGELOG.md CHANGED
@@ -2,10 +2,27 @@
2
2
 
3
3
  All notable changes to `meguro-mcp` are recorded here. Versions follow Semantic Versioning.
4
4
 
5
+ ## 0.2.0 — 2026-08-01
6
+
7
+ - Publishes the frozen 43-tool control-plane registry already present in the repository, without
8
+ changing any tool name, input schema, resource, or protocol behavior.
9
+ - Includes every registry title and all four MCP behavior annotations, the universal `docs_read`
10
+ tool, and the versioned immutable documentation resources in the public artifact.
11
+ - Generates the complete README tool table from the server's actual `tools/list` response and fails
12
+ publish verification when that generated documentation is stale.
13
+ - Pins Console and customer quickstarts to the exact `meguro-mcp@0.2.0` artifact.
14
+
5
15
  ## 0.1.0 — 2026-07-19
6
16
 
7
17
  - First public distribution of the dependency-free Meguro control-plane MCP server.
8
- - Exposes the 15 documented store, run, receipt, connection, probe, and schema tools.
18
+ - Exposes the documented store, run, receipt, Gate, Shopify Exam, connection, probe, and schema tools.
19
+ - Adds the bounded Shopify Exam lifecycle quartet: `exam_preflight`, `exam_start`, `exam_status`, and `exam_report`.
20
+ - Adds account-scoped workspace list/create/archive/unarchive tools and explicit, server-verified
21
+ non-default workspace selection for store-fleet, share, catalog-slice, and claim tools.
22
+ - Adds the complete evidence-share lifecycle, live and saved catalog-slice tools, and Shopify
23
+ development-store claim-by-code parity. Publish and re-share are explicitly outward-facing;
24
+ direct domain claim remains an honestly exposed operator-only repair lane.
25
+ - Publishes the immutable receipt guide and Gate policy v1 through standard MCP resources and the
26
+ universal read-only `docs_read` tool in both local stdio and hosted OAuth lanes.
9
27
  - Supports account-scoped `meg_sk_…` credentials and the self-hosted operator fallback.
10
28
  - Redacts control credentials and practice-store credentials from protocol and tool errors.
11
-
package/README.md CHANGED
@@ -14,7 +14,7 @@ Dependency-free, no build step: the server is plain Node ≥ 20.
14
14
  Customer MCP clients run the exact public version directly from npm:
15
15
 
16
16
  ```bash
17
- npx -y meguro-mcp@0.1.0
17
+ npx -y meguro-mcp@0.2.0
18
18
  ```
19
19
 
20
20
  Pin the version in client configuration. A pinned quickstart stays reproducible and never changes its
@@ -30,26 +30,85 @@ Console provides fast trusted proof and evidence inspection; the agency agent no
30
30
 
31
31
  ## Tools
32
32
 
33
- | Tool | Does | Auth |
33
+ <!-- BEGIN GENERATED MCP TOOL TABLE -->
34
+ <!-- Run `npm run docs:tools --workspace meguro-mcp` to refresh this section from `tools/list`. -->
35
+ This table is generated from the server's live `tools/list` response (43 tools).
36
+
37
+ | Tool | Title | Behavior annotations |
34
38
  |---|---|---|
35
- | `run_start` | write `months` of dated history onto the configured store (requires typing the shop domain in `confirm_shop`) | account API key |
36
- | `run_status` | live progress: orders/total, watermark, status, lastError | account API key |
37
- | `run_ledger` | the run's attributed diary | account API key |
38
- | `run_report` | verdict + summary + S3 keys | account API key |
39
- | `run_resume` | resume a failed run after raising budgets | account API key |
40
- | `runs_diff` | twin comparison: shared prefix, fork, deltas | account API key |
41
- | `practice_run_start` | start an `external-agent` practice run; the agent remains in your environment | account API key |
42
- | `practice_run_status` | read the server-authoritative practice-run contract | account API key |
43
- | `practice_run_checkpoint` | capture immutable temporal evidence and return a bounded summary | account API key |
44
- | `practice_run_advance` | advance by days or a closed-set event condition with both concurrency cursors | account API key |
45
- | `practice_run_finish` | explicitly finish without inventing time or evidence | account API key |
46
- | `practice_run_report` | read the run's **receipt** a bounded receipt summary without raw private payloads | account API key |
47
- | `get_connection_details` | fetch the three Shopify Admin values for a practice store | account API key |
48
- | `admin_probe` | run one isolated, ungraded Admin GraphQL read or confirmed mutation and return a durable Console URL | account API key |
49
- | `admin_schema` | look up one exact bounded Admin type, field, mutation, or commerce recipe | account API key |
39
+ | `docs_read` | Read Meguro receipt and Gate documentation | read-only · non-destructive · idempotent · closed-world |
40
+ | `stores_list` | List practice stores | read-only · non-destructive · idempotent · closed-world |
41
+ | `store_create` | Create a practice store | read-write · non-destructive · non-idempotent · closed-world |
42
+ | `store_delete` | Delete a practice store | read-write · destructive · non-idempotent · closed-world |
43
+ | `store_passport` | Read Store Passport | read-only · non-destructive · idempotent · closed-world |
44
+ | `workspaces_list` | List account workspaces | read-only · non-destructive · idempotent · closed-world |
45
+ | `workspace_create` | Create a workspace | read-write · non-destructive · non-idempotent · closed-world |
46
+ | `workspace_archive` | Archive a workspace | read-write · destructive · idempotent · closed-world |
47
+ | `workspace_unarchive` | Restore a workspace | read-write · non-destructive · idempotent · closed-world |
48
+ | `share_create` | Create or update a private share draft | read-write · non-destructive · non-idempotent · closed-world |
49
+ | `shares_list` | List evidence shares | read-only · non-destructive · idempotent · closed-world |
50
+ | `share_status` | Read an evidence share | read-only · non-destructive · idempotent · closed-world |
51
+ | `share_publish` | Publish evidence to client viewers | read-write · non-destructive · non-idempotent · open-world |
52
+ | `share_revoke` | Revoke client-viewer evidence access | read-write · destructive · idempotent · open-world |
53
+ | `catalog_slice_read` | Read a live Shopify catalog slice | read-only · non-destructive · idempotent · open-world |
54
+ | `catalog_slice_snapshot` | Mint a catalog slice snapshot | read-write · non-destructive · non-idempotent · open-world |
55
+ | `catalog_slices_saved` | Manage saved catalog slices | read-write · destructive · non-idempotent · open-world |
56
+ | `store_claim_by_code` | Claim a Shopify dev store by code | read-write · non-destructive · non-idempotent · closed-world |
57
+ | `store_claim` | Admin-claim a Shopify dev store | read-write · destructive · non-idempotent · closed-world |
58
+ | `run_start` | Start a Shopify dev-store history run | read-write · non-destructive · non-idempotent · open-world |
59
+ | `run_status` | Read run status | read-only · non-destructive · idempotent · closed-world |
60
+ | `run_ledger` | Read run ledger | read-only · non-destructive · idempotent · closed-world |
61
+ | `run_report` | Read run receipt | read-only · non-destructive · idempotent · closed-world |
62
+ | `run_resume` | Resume a Shopify dev-store run | read-write · non-destructive · non-idempotent · open-world |
63
+ | `runs_diff` | Compare run receipts | read-only · non-destructive · idempotent · closed-world |
64
+ | `gate_verdict` | Read a Gate verdict | read-only · non-destructive · idempotent · closed-world |
65
+ | `runs_list` | List runs | read-only · non-destructive · idempotent · closed-world |
66
+ | `usage_read` | Read usage headroom | read-only · non-destructive · idempotent · closed-world |
67
+ | `twin_diff` | Read a twin impact receipt | read-only · non-destructive · idempotent · closed-world |
68
+ | `exam_preflight` | Check Shopify Exam readiness | read-only · non-destructive · idempotent · open-world |
69
+ | `exam_start` | Start or continue a Shopify Exam | read-write · non-destructive · idempotent · open-world |
70
+ | `exam_status` | Read Shopify Exam status | read-only · non-destructive · idempotent · closed-world |
71
+ | `exam_report` | Read a Shopify Exam receipt | read-only · non-destructive · idempotent · closed-world |
72
+ | `practice_run_start` | Start a practice run | read-write · non-destructive · non-idempotent · closed-world |
73
+ | `practice_run_status` | Read practice-run status | read-only · non-destructive · idempotent · closed-world |
74
+ | `practice_run_checkpoint` | Capture a practice-run checkpoint | read-write · non-destructive · non-idempotent · closed-world |
75
+ | `practice_run_advance` | Advance store time | read-write · non-destructive · non-idempotent · closed-world |
76
+ | `practice_run_finish` | Finish a practice run | read-write · non-destructive · non-idempotent · closed-world |
77
+ | `practice_run_report` | Read a compatibility receipt | read-only · non-destructive · idempotent · closed-world |
78
+ | `practice_run_impact` | Read a practice-run impact receipt | read-only · non-destructive · idempotent · closed-world |
79
+ | `get_connection_details` | Get practice-store connection details | read-only · non-destructive · idempotent · closed-world |
80
+ | `admin_probe` | Run an Admin API probe | read-write · non-destructive · non-idempotent · closed-world |
81
+ | `admin_schema` | Look up the Admin API schema | read-only · non-destructive · idempotent · closed-world |
82
+ <!-- END GENERATED MCP TOOL TABLE -->
83
+
84
+ ## Documentation resources
85
+
86
+ The same versioned customer documentation is available through standard MCP resources in both the
87
+ local stdio server and the hosted OAuth resource server:
88
+
89
+ - `meguro://docs/receipt-guide/v1`
90
+ - `meguro://docs/receipt-guide/v2`
91
+ - `meguro://docs/gate-policy/v1`
92
+
93
+ Use `resources/list` and `resources/read` when the client supports MCP resources. Use
94
+ `docs_read({ topic, version })` in every client, including clients without a resource browser.
95
+ Published versions are immutable and carry a SHA-256 digest; later versions are appended under a
96
+ new URI instead of replacing an existing document.
50
97
 
51
98
  ## Identity model
52
99
 
100
+ Hosted OAuth grants are issued only to an active account owner and are **account-bound**, not pinned to
101
+ one workspace. Account-scoped tools such as `workspaces_list` and `workspace_create` need no selector.
102
+ Store-fleet, share, catalog-slice, and claim tools accept an optional `workspaceId`: omit it for the
103
+ default workspace, or pass an exact id from `workspaces_list` for a non-default workspace. The hosted
104
+ resource server verifies that selection against the token account before dispatch.
105
+
106
+ Local `meg_sk_…` API keys remain **workspace-bound**. A key may omit `workspaceId` or repeat its own
107
+ binding, but cannot switch workspaces; use a key issued from the intended workspace instead. Tier
108
+ capacity and workspace ownership are always server-derived. Workspace-bound keys may list account
109
+ workspaces through the existing read route, but account-level create/archive/unarchive requires the
110
+ owner-only OAuth lane.
111
+
53
112
  The whole assistant workflow uses exactly two identifiers:
54
113
 
55
114
  * **`storeId`** — the canonical public practice-store id. `get_connection_details` takes it and returns it, and `practice_run_start` consumes it verbatim, so connection-discovery output passes directly into run start. `worldId` is a **legacy alias for the same id** (both tools still accept it and connection results still include it); prefer `storeId` in new integrations.
@@ -93,9 +152,6 @@ See [the agency quickstart](../../docs/agency-practice-run-quickstart.md) and [H
93
152
  MEGURO_API_BASE_URL=https://api-dev.meguro.io
94
153
  MEGURO_API_TOKEN=<meg_sk account key from Console → Settings>
95
154
  MEGURO_DASHBOARD_URL=https://<dashboard-distribution>.cloudfront.net # optional, enables dashboard links
96
-
97
- # Self-hosted/operator fallback only; customer MCP clients should omit it.
98
- MEGURO_CONTROL_API_KEY=<from infra/params.env or deployment secrets>
99
155
  ```
100
156
 
101
157
  ## Register — Claude Code
@@ -105,7 +161,7 @@ claude mcp add meguro \
105
161
  -e MEGURO_API_BASE_URL=https://api-dev.meguro.io \
106
162
  -e MEGURO_API_TOKEN=meg_sk_... \
107
163
  -e MEGURO_DASHBOARD_URL=https://... \
108
- -- npx -y meguro-mcp@0.1.0
164
+ -- npx -y meguro-mcp@0.2.0
109
165
  ```
110
166
 
111
167
  ## Register — Cursor (`.cursor/mcp.json`)
@@ -115,7 +171,7 @@ claude mcp add meguro \
115
171
  "mcpServers": {
116
172
  "meguro": {
117
173
  "command": "npx",
118
- "args": ["-y", "meguro-mcp@0.1.0"],
174
+ "args": ["-y", "meguro-mcp@0.2.0"],
119
175
  "env": {
120
176
  "MEGURO_API_BASE_URL": "https://api-dev.meguro.io",
121
177
  "MEGURO_API_TOKEN": "meg_sk_...",
@@ -136,6 +192,6 @@ npm test --workspace meguro-mcp
136
192
  ```
137
193
 
138
194
  The test suite packs the public artifact, installs it into a temporary clean-room project, starts the
139
- installed binary, and requires `tools/list` to return exactly 15 tools without leaking supplied
195
+ installed binary, and requires `tools/list` to return exactly 43 tools without leaking supplied
140
196
  credentials to stdout or stderr. Maintainers should follow [RELEASING.md](./RELEASING.md) for every
141
197
  version; release notes are in [CHANGELOG.md](./CHANGELOG.md).
package/RELEASING.md CHANGED
@@ -8,29 +8,42 @@ available from the public npm registry.
8
8
 
9
9
  1. Choose the next Semantic Versioning number.
10
10
  2. Update `version` in `package.json`, `SERVER_INFO.version` in `src/server.mjs`, the pinned
11
- `MEGURO_MCP_PACKAGE` value in `packages/dashboard/src/console.js`, and `CHANGELOG.md` in one commit.
12
- 3. From the repository root, run:
11
+ `MEGURO_MCP_PACKAGE` value in `packages/dashboard/src/console.js`, pinned README examples,
12
+ Console expectations, and `CHANGELOG.md` in one commit.
13
+ 3. Regenerate the README table from the server's actual `tools/list` response. Never add, remove,
14
+ summarize, or reorder tool rows by hand:
15
+
16
+ ```bash
17
+ npm run docs:tools --workspace meguro-mcp
18
+ ```
19
+
20
+ 4. From the exact commit intended for publication, run:
13
21
 
14
22
  ```bash
15
23
  npm test --workspace meguro-mcp
16
24
  npm run verify:publish --workspace meguro-mcp
17
- npm pack --workspace meguro-mcp --dry-run
25
+ npm pack --workspace meguro-mcp --json
18
26
  ```
19
27
 
20
- 4. Confirm npm authentication and the intended identity:
28
+ Record the commit SHA plus the pack result's filename, file count, unpacked size, SHA-512
29
+ integrity, and negative credential-leak result. The clean-room distribution test is the
30
+ authoritative expected tool count before publication; do not duplicate that count here.
31
+
32
+ 5. Stop at the worker handoff. The authenticated publisher confirms npm authentication and the
33
+ intended identity:
21
34
 
22
35
  ```bash
23
36
  npm whoami
24
37
  ```
25
38
 
26
- 5. From `packages/meguro-mcp`, publish the exact version. npm will run the complete test suite and
39
+ 6. From `packages/meguro-mcp` at that exact commit, publish the exact version. npm will run the complete test suite and
27
40
  package validator through the package lifecycle before it uploads anything:
28
41
 
29
42
  ```bash
30
43
  npm publish --access public
31
44
  ```
32
45
 
33
- 6. Verify the public artifact from a directory outside this repository:
46
+ 7. Verify the public artifact from a clean directory outside this repository:
34
47
 
35
48
  ```bash
36
49
  npm view meguro-mcp@<version> version dist.integrity
@@ -38,12 +51,13 @@ available from the public npm registry.
38
51
  ```
39
52
 
40
53
  For the protocol smoke, use the copy-ready Console configuration with a disposable workspace key
41
- and confirm `tools/list` returns exactly 15 tools. Never put the key in shell history, logs, tickets,
42
- or chat.
54
+ and confirm `tools/list` matches the authoritative expected count in the distribution test, every
55
+ tool carries a title and all four behavior annotations, `docs_read` is present, and
56
+ `resources/list` returns the versioned documentation resources. Never put the key in shell history,
57
+ logs, tickets, or chat.
43
58
 
44
- 7. Only after the registry and clean-room checks pass, deploy the Console quickstart, tag the commit as
59
+ 8. Only after the registry and clean-room checks pass, deploy the Console quickstart, tag the commit as
45
60
  `meguro-mcp-v<version>`, and publish MCP directory listings.
46
61
 
47
62
  If any step fails, do not bump the Console pin, deploy the quickstart, tag the release, or publish a
48
63
  directory listing.
49
-
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meguro-mcp",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "description": "Meguro control-plane MCP server: drive worlds, runs, and verdicts from your own AI tools.",
@@ -22,6 +22,7 @@
22
22
  },
23
23
  "files": [
24
24
  "src/",
25
+ "scripts/generate-readme-tools.mjs",
25
26
  "scripts/verify-package.mjs",
26
27
  "README.md",
27
28
  "CHANGELOG.md",
@@ -36,6 +37,8 @@
36
37
  "scripts": {
37
38
  "pretest": "npm run build -w @meguro/core",
38
39
  "test": "node --test test/*.test.mjs",
40
+ "docs:tools": "node scripts/generate-readme-tools.mjs",
41
+ "docs:tools:check": "node scripts/generate-readme-tools.mjs --check",
39
42
  "verify:publish": "node scripts/verify-package.mjs",
40
43
  "prepack": "npm run verify:publish",
41
44
  "prepublishOnly": "npm test"
@@ -0,0 +1,86 @@
1
+ import assert from 'node:assert/strict';
2
+ import { spawn } from 'node:child_process';
3
+ import { readFileSync, writeFileSync } from 'node:fs';
4
+ import { dirname, join } from 'node:path';
5
+ import { fileURLToPath } from 'node:url';
6
+
7
+ const root = join(dirname(fileURLToPath(import.meta.url)), '..');
8
+ const readmePath = join(root, 'README.md');
9
+ const startMarker = '<!-- BEGIN GENERATED MCP TOOL TABLE -->';
10
+ const endMarker = '<!-- END GENERATED MCP TOOL TABLE -->';
11
+
12
+ function escapeCell(value) {
13
+ return String(value).replaceAll('|', '\\|').replaceAll('\n', ' ');
14
+ }
15
+
16
+ function behaviorLabel(annotations) {
17
+ return [
18
+ annotations.readOnlyHint ? 'read-only' : 'read-write',
19
+ annotations.destructiveHint ? 'destructive' : 'non-destructive',
20
+ annotations.idempotentHint ? 'idempotent' : 'non-idempotent',
21
+ annotations.openWorldHint ? 'open-world' : 'closed-world',
22
+ ].join(' · ');
23
+ }
24
+
25
+ async function toolsList() {
26
+ const child = spawn(process.execPath, [join(root, 'src/server.mjs')], {
27
+ cwd: root,
28
+ env: {
29
+ ...process.env,
30
+ MEGURO_API_BASE_URL: 'https://api.example.invalid',
31
+ MEGURO_API_TOKEN: '',
32
+ MEGURO_DASHBOARD_URL: '',
33
+ },
34
+ stdio: ['pipe', 'pipe', 'pipe'],
35
+ });
36
+ let stdout = '';
37
+ let stderr = '';
38
+ child.stdout.setEncoding('utf8');
39
+ child.stderr.setEncoding('utf8');
40
+ child.stdout.on('data', (chunk) => { stdout += chunk; });
41
+ child.stderr.on('data', (chunk) => { stderr += chunk; });
42
+ child.stdin.end(`${JSON.stringify({ jsonrpc: '2.0', id: 1, method: 'tools/list' })}\n`);
43
+ const exitCode = await new Promise((resolve, reject) => {
44
+ child.once('error', reject);
45
+ child.once('close', resolve);
46
+ });
47
+ assert.equal(exitCode, 0, `tools/list server exited ${exitCode}: ${stderr}`);
48
+ assert.equal(stderr, '', `tools/list server wrote to stderr: ${stderr}`);
49
+ const response = stdout.trim().split('\n').map((line) => JSON.parse(line)).find((message) => message.id === 1);
50
+ assert.ok(Array.isArray(response?.result?.tools), 'tools/list did not return a tools array');
51
+ return response.result.tools;
52
+ }
53
+
54
+ const tools = await toolsList();
55
+ const rows = tools.map((tool) => {
56
+ assert.equal(typeof tool.name, 'string');
57
+ assert.equal(typeof tool.title, 'string', `${tool.name} is missing its title`);
58
+ assert.deepEqual(Object.keys(tool.annotations ?? {}).sort(), [
59
+ 'destructiveHint', 'idempotentHint', 'openWorldHint', 'readOnlyHint',
60
+ ], `${tool.name} is missing behavior annotations`);
61
+ return `| \`${escapeCell(tool.name)}\` | ${escapeCell(tool.title)} | ${behaviorLabel(tool.annotations)} |`;
62
+ });
63
+ const generated = [
64
+ startMarker,
65
+ '<!-- Run `npm run docs:tools --workspace meguro-mcp` to refresh this section from `tools/list`. -->',
66
+ `This table is generated from the server's live \`tools/list\` response (${tools.length} tools).`,
67
+ '',
68
+ '| Tool | Title | Behavior annotations |',
69
+ '|---|---|---|',
70
+ ...rows,
71
+ endMarker,
72
+ ].join('\n');
73
+
74
+ const readme = readFileSync(readmePath, 'utf8');
75
+ const start = readme.indexOf(startMarker);
76
+ const end = readme.indexOf(endMarker);
77
+ assert.ok(start >= 0 && end > start, 'README generated tool-table markers are missing or out of order');
78
+ const nextReadme = `${readme.slice(0, start)}${generated}${readme.slice(end + endMarker.length)}`;
79
+
80
+ if (process.argv.includes('--check')) {
81
+ assert.equal(readme, nextReadme, 'README tool table is stale; run npm run docs:tools --workspace meguro-mcp');
82
+ console.log(`README tools/list table is current (${tools.length} tools)`);
83
+ } else {
84
+ writeFileSync(readmePath, nextReadme);
85
+ console.log(`README tools/list table generated (${tools.length} tools)`);
86
+ }
@@ -1,4 +1,5 @@
1
1
  import assert from 'node:assert/strict';
2
+ import { execFileSync } from 'node:child_process';
2
3
  import { readFileSync, statSync } from 'node:fs';
3
4
  import { dirname, join } from 'node:path';
4
5
  import { fileURLToPath } from 'node:url';
@@ -23,5 +24,7 @@ assert.match(readme, /SHOPIFY_ADMIN_ACCESS_TOKEN/);
23
24
  assert.match(readme, /store-scoped\s+data-plane credential/);
24
25
  assert.match(changelog, new RegExp(`## ${pkg.version.replaceAll('.', '\\.')}`));
25
26
  assert.match(releasing, /npm publish --access public/);
27
+ assert.doesNotMatch(releasing, /exactly\s+\d+\s+tools/i, 'RELEASING must defer to the distribution test for the expected tool count');
28
+ execFileSync(process.execPath, [join(root, 'scripts/generate-readme-tools.mjs'), '--check'], { stdio: 'inherit' });
26
29
 
27
30
  console.log(`meguro-mcp@${pkg.version} publish contract verified`);