meguro-mcp 0.2.4 → 0.2.5

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,6 +2,17 @@
2
2
 
3
3
  All notable changes to `meguro-mcp` are recorded here. Versions follow Semantic Versioning.
4
4
 
5
+ ## 0.2.5 — 2026-08-02
6
+
7
+ - Adds the immutable `meguro://docs/product-guide/v1` resource and matching `product-guide`
8
+ `docs_read` topic for stable product concepts, evidence boundaries, and question routing.
9
+ - Expands `docs_read` metadata from receipt-and-Gate-only wording to general Meguro documentation
10
+ while retaining the existing tool identity and behavior annotations.
11
+ - Directs new evaluators to Getting Started and general Meguro questions to Product Guide through
12
+ byte-identical public and hosted initialize instructions.
13
+ - Keeps the public registry at exactly 44 tools, the hosted registry at exactly 42 remote-safe tools,
14
+ and all four previously published documentation byte streams and digests unchanged.
15
+
5
16
  ## 0.2.4 — 2026-08-02
6
17
 
7
18
  - Adds the immutable `meguro://docs/getting-started/v1` resource and matching `getting-started`
package/README.md CHANGED
@@ -9,20 +9,31 @@ This is the **control plane** (world/run management, for the developer's tools).
9
9
 
10
10
  Dependency-free, no build step: the server is plain Node ≥ 20.
11
11
 
12
- ## Install and run
12
+ ## Recommended: hosted Streamable HTTP + OAuth
13
13
 
14
- Customer MCP clients run the exact public version directly from npm:
14
+ For an interactive client that supports Streamable HTTP and browser OAuth, open Meguro Console → Settings →
15
+ Connection and copy the hosted MCP URL for that environment. Add it as a Streamable HTTP MCP server,
16
+ save or restart if the client asks, then choose Authenticate. Your browser opens so you can sign in to
17
+ Meguro and authorize the requested access. The default path needs no API key, environment variable,
18
+ package command, or pasted token.
15
19
 
16
- ```bash
17
- npx -y meguro-mcp@0.2.4
18
- ```
20
+ The configured hosted endpoints are environment-specific: dev uses
21
+ `https://mcp-dev.meguro.io/mcp`, stage uses `https://mcp-stage.meguro.io/mcp`, and production uses
22
+ `https://mcp.meguro.io/mcp`. Use the URL shown by the Console for the environment you intend to access.
19
23
 
20
- Pin the version in client configuration. A pinned quickstart stays reproducible and never changes its
21
- tool contract because npm published a newer release.
24
+ After connecting, new evaluators should read `meguro://docs/getting-started/v1`; agents answering
25
+ general Meguro questions should read `meguro://docs/product-guide/v1`. Both are available through
26
+ `resources/read` and the matching `docs_read` topic.
22
27
 
23
- ## Transport and entry point
28
+ The hosted server exposes 42 customer-safe tools and deliberately excludes `admin_probe` and
29
+ `admin_schema`. Active grants are visible and revocable under Console → Settings → Connection → MCP
30
+ authorizations.
24
31
 
25
- The public control-plane MCP server is the local stdio command shown below. It speaks newline-delimited JSON-RPC over stdin/stdout and uses `MEGURO_API_BASE_URL` plus `MEGURO_API_TOKEN` for its authenticated HTTP calls. There is no control-plane `POST ${MEGURO_API_BASE_URL}/mcp` endpoint.
32
+ ## Transport boundaries
33
+
34
+ The public package speaks newline-delimited JSON-RPC over stdin/stdout and uses
35
+ `MEGURO_API_BASE_URL` plus `MEGURO_API_TOKEN` for its authenticated HTTP calls. It is the local/CI
36
+ fallback, separate from the hosted Streamable HTTP OAuth endpoint.
26
37
 
27
38
  Practice stores separately expose a Storefront shopper/data-plane MCP endpoint at `https://<worldId>.meguro.io/api/mcp`. That endpoint is not this server and cannot start runs, reveal Admin connection details, inspect schemas, or collect receipts.
28
39
 
@@ -36,7 +47,7 @@ This table is generated from the server's live `tools/list` response (44 tools).
36
47
 
37
48
  | Tool | Title | Behavior annotations |
38
49
  |---|---|---|
39
- | `docs_read` | Read Meguro receipt and Gate documentation | read-only · non-destructive · idempotent · closed-world |
50
+ | `docs_read` | Read Meguro product and evidence documentation | read-only · non-destructive · idempotent · closed-world |
40
51
  | `templates_list` | List practice-store templates | read-only · non-destructive · idempotent · closed-world |
41
52
  | `stores_list` | List practice stores | read-only · non-destructive · idempotent · closed-world |
42
53
  | `store_create` | Create a practice store | read-write · non-destructive · non-idempotent · closed-world |
@@ -87,10 +98,13 @@ This table is generated from the server's live `tools/list` response (44 tools).
87
98
  The same versioned customer documentation is available through standard MCP resources in both the
88
99
  local stdio server and the hosted OAuth resource server:
89
100
 
90
- - `meguro://docs/receipt-guide/v1`
91
- - `meguro://docs/receipt-guide/v2`
92
- - `meguro://docs/gate-policy/v1`
93
- - `meguro://docs/getting-started/v1`
101
+ | Resource | SHA-256 |
102
+ |---|---|
103
+ | `meguro://docs/gate-policy/v1` | `6d647b3c78fd4e2d93f59a85b90a853096cc73e9cdfd6ba5e3ea505dc07b4aaf` |
104
+ | `meguro://docs/getting-started/v1` | `afd19ca6576ae2a8fb03c2e143d25d47fb739682f44180541dd13f779a5f29df` |
105
+ | `meguro://docs/product-guide/v1` | `e5450c1b4181cec4d6ed0a498dbff1cb25d2e223ff2228928aecbbce9674f074` |
106
+ | `meguro://docs/receipt-guide/v1` | `9d8150258765d252cb7cc3bad307acdc429b0435ca22f0362b69cf7471e3a333` |
107
+ | `meguro://docs/receipt-guide/v2` | `7df261021b48ce732e6043a8917f8a2673b1f83ff1d8790927abc18f34fb3f6f` |
94
108
 
95
109
  Use `resources/list` and `resources/read` when the client supports MCP resources. Use
96
110
  `docs_read({ topic, version })` in every client, including clients without a resource browser.
@@ -150,7 +164,17 @@ node byo-ci-test/phase7-snippets.mjs mcp
150
164
 
151
165
  See [the agency quickstart](../../docs/agency-practice-run-quickstart.md) and [HTTP reference](../../docs/practice-run-http-api.md).
152
166
 
153
- ## Environment
167
+ ## Advanced: CI or local STDIO
168
+
169
+ Use the public STDIO package for CI, local automation, or clients without hosted Streamable HTTP and
170
+ OAuth support. It requires a workspace-bound `meg_sk_…` API key and exposes the full 44-tool local
171
+ surface. Pin the exact public version in client configuration so a quickstart stays reproducible:
172
+
173
+ ```bash
174
+ npx -y meguro-mcp@0.2.5
175
+ ```
176
+
177
+ ### Environment
154
178
 
155
179
  ```
156
180
  MEGURO_API_BASE_URL=https://api-dev.meguro.io
@@ -158,24 +182,24 @@ MEGURO_API_TOKEN=<meg_sk account key from Console → Settings>
158
182
  MEGURO_DASHBOARD_URL=https://<dashboard-distribution>.cloudfront.net # optional, enables dashboard links
159
183
  ```
160
184
 
161
- ## Register — Claude Code
185
+ ### Register — Claude Code
162
186
 
163
187
  ```bash
164
188
  claude mcp add meguro \
165
189
  -e MEGURO_API_BASE_URL=https://api-dev.meguro.io \
166
190
  -e MEGURO_API_TOKEN=meg_sk_... \
167
191
  -e MEGURO_DASHBOARD_URL=https://... \
168
- -- npx -y meguro-mcp@0.2.4
192
+ -- npx -y meguro-mcp@0.2.5
169
193
  ```
170
194
 
171
- ## Register — Cursor (`.cursor/mcp.json`)
195
+ ### Register — Cursor (`.cursor/mcp.json`)
172
196
 
173
197
  ```json
174
198
  {
175
199
  "mcpServers": {
176
200
  "meguro": {
177
201
  "command": "npx",
178
- "args": ["-y", "meguro-mcp@0.2.4"],
202
+ "args": ["-y", "meguro-mcp@0.2.5"],
179
203
  "env": {
180
204
  "MEGURO_API_BASE_URL": "https://api-dev.meguro.io",
181
205
  "MEGURO_API_TOKEN": "meg_sk_...",
package/RELEASING.md CHANGED
@@ -29,6 +29,10 @@ available from the public npm registry.
29
29
  integrity, and negative credential-leak result. The clean-room distribution test is the
30
30
  authoritative expected tool count before publication; do not duplicate that count here.
31
31
 
32
+ For the `0.2.5` candidate, also record the five-resource `resources/list` result, the pinned
33
+ product-guide SHA-256 digest, and proof that the four earlier resource bytes and digests remain
34
+ unchanged.
35
+
32
36
  5. Stop at the worker handoff. The authenticated publisher confirms npm authentication and the
33
37
  intended identity:
34
38
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "meguro-mcp",
3
- "version": "0.2.4",
3
+ "version": "0.2.5",
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.",
package/src/docs.mjs CHANGED
@@ -4,12 +4,15 @@ const RECEIPT_GUIDE_VERSION = 1;
4
4
  const RECEIPT_GUIDE_LATEST_VERSION = 2;
5
5
  const GATE_POLICY_VERSION = 1;
6
6
  const GETTING_STARTED_VERSION = 1;
7
+ const PRODUCT_GUIDE_VERSION = 1;
7
8
  const RECEIPT_GUIDE_URI = `meguro://docs/receipt-guide/v${RECEIPT_GUIDE_VERSION}`;
8
9
  const RECEIPT_GUIDE_LATEST_URI = `meguro://docs/receipt-guide/v${RECEIPT_GUIDE_LATEST_VERSION}`;
9
10
  const GATE_POLICY_URI = `meguro://docs/gate-policy/v${GATE_POLICY_VERSION}`;
10
11
  const GETTING_STARTED_URI = `meguro://docs/getting-started/v${GETTING_STARTED_VERSION}`;
12
+ const PRODUCT_GUIDE_URI = `meguro://docs/product-guide/v${PRODUCT_GUIDE_VERSION}`;
11
13
 
12
- export const GETTING_STARTED_INSTRUCTIONS = 'New to Meguro? Read `meguro://docs/getting-started/v1` with `resources/read`, or call `docs_read({ topic: "getting-started", version: 1 })`, before starting for the exact tool sequence from template discovery to receipt.';
14
+ export const MCP_INITIALIZE_INSTRUCTIONS = 'New evaluators: read `meguro://docs/getting-started/v1`; general Meguro questions: read `meguro://docs/product-guide/v1`.';
15
+ export const PRODUCT_GUIDE_SHA256 = 'e5450c1b4181cec4d6ed0a498dbff1cb25d2e223ff2228928aecbbce9674f074';
13
16
 
14
17
  function deepFreeze(value) {
15
18
  if (!value || typeof value !== 'object' || Object.isFrozen(value)) return value;
@@ -810,8 +813,94 @@ All published documentation resources are immutable. Cite the exact URI, version
810
813
  digest returned by Meguro.
811
814
  `;
812
815
 
816
+ const PRODUCT_GUIDE_TEXT = `# Meguro product guide v1
817
+
818
+ Published URI: \`${PRODUCT_GUIDE_URI}\`
819
+
820
+ ## What Meguro is—and is not
821
+
822
+ Meguro is a technical evaluation environment for commerce agents. Its core product primitives are
823
+ practice stores, deterministic Store time, recorded API behavior, immutable receipts, and Gate
824
+ evidence.
825
+
826
+ Practice results do not prove live-market demand, future revenue, production performance, or live
827
+ Shopify acceptance. Live-platform claims are established only by the relevant real-platform or
828
+ Shopify Exam evidence; never infer them from practice compatibility or modeled outcomes.
829
+
830
+ ## Core nouns
831
+
832
+ - **Template:** a supported, versioned starting scenario used to create a practice store.
833
+ - **Practice store / \`storeId\`:** an owned synthetic commerce environment and its canonical public
834
+ identifier. It is not a merchant's production store.
835
+ - **Store time:** the deterministic scenario clock advanced through the run lifecycle. It is distinct
836
+ from wall-clock request time.
837
+ - **Run / \`attemptId\`:** one bounded evaluation window and the identifier used by its lifecycle,
838
+ status, and evidence tools.
839
+ - **Receipt:** the immutable record of what the agent called, what was accepted or rejected, and what
840
+ the declared evidence establishes. For field-level interpretation, read
841
+ \`meguro://docs/receipt-guide/v1\` or \`meguro://docs/receipt-guide/v2\`.
842
+ - **Modeled outcome / Impact context:** scenario-derived context that compares recorded behavior with
843
+ a declared model. It is not a merchant forecast, causal claim, or production result.
844
+ - **Gate:** a release signal computed from named receipt facts, thresholds, and precedence. For the
845
+ exact policy, read \`meguro://docs/gate-policy/v1\`.
846
+ - **Shopify Exam:** a captured API-shape fidelity exam against an eligible Shopify development store.
847
+ Its evidence establishes only the bounded live-platform facts recorded by that exam, not blanket
848
+ Shopify acceptance or merchant outcomes.
849
+
850
+ ## Product surfaces and boundaries
851
+
852
+ - **Console** provides visual setup, receipt inspection, account administration, client revocation,
853
+ plans, billing, and payment actions.
854
+ - **Hosted OAuth MCP** is the recommended control plane for interactive agents.
855
+ - **Public STDIO MCP** is the local and CI fallback.
856
+ - **Practice-store Admin endpoint** is the Shopify-shaped data plane used by the commerce agent under
857
+ evaluation; it is separate from the MCP control plane.
858
+ - **MCP does not perform money actions:** it does not check out, buy or change a subscription, manage
859
+ payment methods, or make another payment.
860
+
861
+ ## Question-to-source routing
862
+
863
+ | User asks | Agent must do |
864
+ |---|---|
865
+ | What is Meguro or what does it prove? | Answer from this product guide and preserve its evidence boundary. |
866
+ | How do I start an evaluation? | Read \`meguro://docs/getting-started/v1\`. |
867
+ | What does this receipt or verdict mean? | Read the appropriate receipt guide and \`meguro://docs/gate-policy/v1\`. |
868
+ | What stores exist? | Call \`stores_list\`. |
869
+ | What runs exist or what happened? | Call \`runs_list\` and the relevant status, report, or impact tool. |
870
+ | What workspaces exist? | Call \`workspaces_list\`. |
871
+ | What is my current usage or cap? | Call \`usage_read\`; do not answer from static values. |
872
+ | Which templates are available? | Call \`templates_list\`. |
873
+ | How much does a plan cost, or how do I subscribe or change plans? | Direct the user to Console → Plans & Billing. Do not quote immutable pricing or attempt payment through MCP. |
874
+ | How do I manage or revoke an MCP connection? | Direct the user to Console → Connection → MCP authorizations. |
875
+ | How do I delete my account? | Direct the user to the Console-only account-deletion flow and [Meguro Help](https://meguro.io/help.html). |
876
+ | Where can I learn more or get support? | Use [Meguro Help](https://meguro.io/help.html) or [hello@meguro.io](mailto:hello@meguro.io); do not invent another location. |
877
+
878
+ ## Answering discipline
879
+
880
+ - Use live MCP tools for user-, workspace-, store-, run-, usage-, and template-specific facts.
881
+ - Use immutable guides for stable concepts and evidence interpretation.
882
+ - Use Console for money actions and explicitly Console-only account actions.
883
+ - Never infer an undocumented capability, price, limit, legal conclusion, Shopify acceptance, or
884
+ merchant outcome.
885
+ - If neither an in-band document nor a tool result establishes the answer, say that it is not
886
+ established and direct the user to Meguro Help or support.
887
+
888
+ ## Stable concepts versus changing facts
889
+
890
+ Do not hardcode plan prices, current tier allowances, trial length, supported-country lists, current
891
+ account state, or current fleet state. Read changing values from the appropriate live tool or the
892
+ canonical Console surface.
893
+
894
+ Do not reproduce or interpret legal terms. Link to the canonical [Terms](https://meguro.io/terms) and
895
+ [Privacy Notice](https://meguro.io/privacy).
896
+ `;
897
+
813
898
  function entry(input) {
814
899
  const text = String(input.text);
900
+ const digest = sha256(text);
901
+ if (input.expectedSha256 && input.expectedSha256 !== digest) {
902
+ throw new Error(`Documentation digest drift for ${input.uri}: expected ${input.expectedSha256}, received ${digest}`);
903
+ }
815
904
  return deepFreeze({
816
905
  topic: input.topic,
817
906
  version: input.version,
@@ -821,7 +910,7 @@ function entry(input) {
821
910
  description: input.description,
822
911
  mimeType: 'text/markdown',
823
912
  text,
824
- sha256: sha256(text),
913
+ sha256: digest,
825
914
  });
826
915
  }
827
916
 
@@ -875,6 +964,16 @@ const CATALOG = buildDocumentationCatalog([
875
964
  description: 'Discovery-first technical-evaluator sequence from template selection through an immutable practice receipt.',
876
965
  text: GETTING_STARTED_TEXT,
877
966
  },
967
+ {
968
+ topic: 'product-guide',
969
+ version: PRODUCT_GUIDE_VERSION,
970
+ uri: PRODUCT_GUIDE_URI,
971
+ name: 'Meguro product guide v1',
972
+ title: 'Meguro product guide v1',
973
+ description: 'Stable product concepts, evidence boundaries, surface responsibilities, and question-to-source routing.',
974
+ text: PRODUCT_GUIDE_TEXT,
975
+ expectedSha256: PRODUCT_GUIDE_SHA256,
976
+ },
878
977
  {
879
978
  topic: 'receipt-guide',
880
979
  version: RECEIPT_GUIDE_VERSION,
package/src/server.mjs CHANGED
@@ -4,10 +4,10 @@
4
4
  // tools/call, resources/list, resources/read, ping) is small and stable; no lockfile churn, no build step.
5
5
 
6
6
  import { createInterface } from 'node:readline';
7
- import { GETTING_STARTED_INSTRUCTIONS, documentationResource, documentationResources } from './docs.mjs';
7
+ import { MCP_INITIALIZE_INSTRUCTIONS, documentationResource, documentationResources } from './docs.mjs';
8
8
  import { createTools, redactSecrets } from './tools.mjs';
9
9
 
10
- const SERVER_INFO = { name: 'meguro', version: '0.2.4' };
10
+ const SERVER_INFO = { name: 'meguro', version: '0.2.5' };
11
11
  const PROTOCOL_VERSION = '2025-03-26';
12
12
 
13
13
  const tools = createTools({
@@ -38,7 +38,7 @@ async function handle(message) {
38
38
  protocolVersion: typeof params?.protocolVersion === 'string' ? params.protocolVersion : PROTOCOL_VERSION,
39
39
  capabilities: { tools: {}, resources: { listChanged: false } },
40
40
  serverInfo: SERVER_INFO,
41
- instructions: GETTING_STARTED_INSTRUCTIONS,
41
+ instructions: MCP_INITIALIZE_INSTRUCTIONS,
42
42
  });
43
43
  case 'notifications/initialized':
44
44
  case 'notifications/cancelled':
package/src/tools.mjs CHANGED
@@ -53,7 +53,7 @@ const TOOL_PRESENTATION = Object.freeze({
53
53
  runs_list: { title: 'List runs', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
54
54
  usage_read: { title: 'Read usage headroom', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
55
55
  twin_diff: { title: 'Read a twin impact receipt', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
56
- docs_read: { title: 'Read Meguro receipt and Gate documentation', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
56
+ docs_read: { title: 'Read Meguro product and evidence documentation', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
57
57
  exam_preflight: { title: 'Check Shopify Exam readiness', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: true },
58
58
  exam_start: { title: 'Start or continue a Shopify Exam', readOnlyHint: false, destructiveHint: false, idempotentHint: true, openWorldHint: true },
59
59
  exam_status: { title: 'Read Shopify Exam status', readOnlyHint: true, destructiveHint: false, idempotentHint: true, openWorldHint: false },
@@ -1037,20 +1037,20 @@ export function createTools(config) {
1037
1037
  const rawDefinitions = [
1038
1038
  {
1039
1039
  name: 'docs_read',
1040
- description: 'Read Meguro customer documentation in-band. Topics: getting-started version 1 (the exact discovery-first evaluator sequence), receipt-guide versions 1 and 2 (immutable receipt interpretation), and gate-policy version 1 (immutable named checks, receipt facts, thresholds, precedence, flip conditions, and self-gating). Account deletion is deliberately not an MCP tool. Pass the exact published version so cited documentation never resolves to mutable latest content.',
1040
+ description: 'Read immutable Meguro product and evidence documentation in-band. Topics: getting-started version 1 (discovery-first evaluator sequence), product-guide version 1 (stable concepts, evidence boundaries, surfaces, and question routing), receipt-guide versions 1 and 2 (receipt interpretation), and gate-policy version 1 (named checks, thresholds, precedence, and self-gating). Account deletion is deliberately not an MCP tool. Pass the exact published version so cited documentation never resolves to mutable latest content.',
1041
1041
  inputSchema: {
1042
1042
  type: 'object',
1043
1043
  additionalProperties: false,
1044
1044
  properties: {
1045
1045
  topic: {
1046
1046
  type: 'string',
1047
- enum: ['getting-started', 'receipt-guide', 'gate-policy'],
1048
- description: 'getting-started, receipt-guide, or gate-policy.',
1047
+ enum: ['getting-started', 'product-guide', 'receipt-guide', 'gate-policy'],
1048
+ description: 'getting-started, product-guide, receipt-guide, or gate-policy.',
1049
1049
  },
1050
1050
  version: {
1051
1051
  type: 'integer',
1052
1052
  enum: [1, 2],
1053
- description: 'Published immutable document version. Getting started and Gate policy have version 1; Receipt guide has versions 1 and 2.',
1053
+ description: 'Published immutable document version. Getting started, Product guide, and Gate policy have version 1; Receipt guide has versions 1 and 2.',
1054
1054
  },
1055
1055
  },
1056
1056
  required: ['topic', 'version'],
@@ -1620,8 +1620,8 @@ export function createTools(config) {
1620
1620
  switch (name) {
1621
1621
  case 'docs_read': {
1622
1622
  const topic = requiredString(args, 'topic');
1623
- if (!['getting-started', 'receipt-guide', 'gate-policy'].includes(topic)) {
1624
- throw new Error('topic must be getting-started, receipt-guide, or gate-policy');
1623
+ if (!['getting-started', 'product-guide', 'receipt-guide', 'gate-policy'].includes(topic)) {
1624
+ throw new Error('topic must be getting-started, product-guide, receipt-guide, or gate-policy');
1625
1625
  }
1626
1626
  if (!Number.isSafeInteger(args.version) || args.version < 1) {
1627
1627
  throw new Error('version must be the exact published positive integer');