meguro-mcp 0.2.3 → 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 +18 -0
- package/README.md +53 -26
- package/RELEASING.md +4 -0
- package/package.json +1 -1
- package/src/docs.mjs +174 -1
- package/src/server.mjs +3 -2
- package/src/tools.mjs +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,24 @@
|
|
|
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
|
+
|
|
16
|
+
## 0.2.4 — 2026-08-02
|
|
17
|
+
|
|
18
|
+
- Adds the immutable `meguro://docs/getting-started/v1` resource and matching `getting-started`
|
|
19
|
+
`docs_read` topic with the exact discovery-first evaluator workflow.
|
|
20
|
+
- Adds concise MCP `initialize.instructions` that directs new clients to the same in-band guide.
|
|
21
|
+
- Keeps the public registry at exactly 44 tools and preserves every non-documentation tool contract.
|
|
22
|
+
|
|
5
23
|
## 0.2.3 — 2026-08-01
|
|
6
24
|
|
|
7
25
|
- Adds `templates_list`, a read-only closed-world projection of the ordered practice-store template
|
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
|
-
##
|
|
12
|
+
## Recommended: hosted Streamable HTTP + OAuth
|
|
13
13
|
|
|
14
|
-
|
|
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
|
-
|
|
17
|
-
|
|
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
|
-
|
|
21
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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,9 +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
|
-
-
|
|
91
|
-
|
|
92
|
-
|
|
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` |
|
|
93
108
|
|
|
94
109
|
Use `resources/list` and `resources/read` when the client supports MCP resources. Use
|
|
95
110
|
`docs_read({ topic, version })` in every client, including clients without a resource browser.
|
|
@@ -121,14 +136,16 @@ Receipt retrieval is `practice_run_report`: **receipt** is the user-facing noun;
|
|
|
121
136
|
|
|
122
137
|
Use these tool names in order:
|
|
123
138
|
|
|
124
|
-
1. `
|
|
125
|
-
2. `
|
|
126
|
-
3.
|
|
127
|
-
4. `
|
|
128
|
-
5.
|
|
129
|
-
6.
|
|
130
|
-
7. `
|
|
131
|
-
8.
|
|
139
|
+
1. `templates_list()` to discover the supported template keys.
|
|
140
|
+
2. `stores_list()`, then reuse an owned store or call `store_create({ templateKey })`.
|
|
141
|
+
3. `get_connection_details({ storeId })` through the explicit secure flow (`worldId` remains a legacy alias). Keep the returned values out of model/chat logs.
|
|
142
|
+
4. `practice_run_start({ storeId, clock: { mode: "harness", simulationDays: 14, stepDays: 1 } })` — the same `storeId` the previous step took and returned.
|
|
143
|
+
5. Launch the agency agent in its own environment with the stable returned `SHOPIFY_*` values.
|
|
144
|
+
6. `practice_run_status({ attemptId })`, then `practice_run_checkpoint({ attemptId })`.
|
|
145
|
+
7. `practice_run_advance({ attemptId, days: 1, expectedDay, expectedCallSeq })`, using the exact current state cursors. Supply `until` instead of `days` for a supported event stop.
|
|
146
|
+
8. Inspect the aligned checkpoint evidence in Console or the run APIs.
|
|
147
|
+
9. `practice_run_finish({ attemptId })`, then `practice_run_report({ attemptId })` for the run's receipt.
|
|
148
|
+
10. Optionally execute an immutable temporal probe-set revision through the HTTP surface and inspect/export it in Gate.
|
|
132
149
|
|
|
133
150
|
`get_connection_details` deliberately returns `SHOPIFY_ADMIN_ACCESS_TOKEN`: it is the store-scoped
|
|
134
151
|
data-plane credential your commerce agent needs for the exact returned `*.meguro.io` Admin URL. Treat
|
|
@@ -147,7 +164,17 @@ node byo-ci-test/phase7-snippets.mjs mcp
|
|
|
147
164
|
|
|
148
165
|
See [the agency quickstart](../../docs/agency-practice-run-quickstart.md) and [HTTP reference](../../docs/practice-run-http-api.md).
|
|
149
166
|
|
|
150
|
-
##
|
|
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
|
|
151
178
|
|
|
152
179
|
```
|
|
153
180
|
MEGURO_API_BASE_URL=https://api-dev.meguro.io
|
|
@@ -155,24 +182,24 @@ MEGURO_API_TOKEN=<meg_sk account key from Console → Settings>
|
|
|
155
182
|
MEGURO_DASHBOARD_URL=https://<dashboard-distribution>.cloudfront.net # optional, enables dashboard links
|
|
156
183
|
```
|
|
157
184
|
|
|
158
|
-
|
|
185
|
+
### Register — Claude Code
|
|
159
186
|
|
|
160
187
|
```bash
|
|
161
188
|
claude mcp add meguro \
|
|
162
189
|
-e MEGURO_API_BASE_URL=https://api-dev.meguro.io \
|
|
163
190
|
-e MEGURO_API_TOKEN=meg_sk_... \
|
|
164
191
|
-e MEGURO_DASHBOARD_URL=https://... \
|
|
165
|
-
-- npx -y meguro-mcp@0.2.
|
|
192
|
+
-- npx -y meguro-mcp@0.2.5
|
|
166
193
|
```
|
|
167
194
|
|
|
168
|
-
|
|
195
|
+
### Register — Cursor (`.cursor/mcp.json`)
|
|
169
196
|
|
|
170
197
|
```json
|
|
171
198
|
{
|
|
172
199
|
"mcpServers": {
|
|
173
200
|
"meguro": {
|
|
174
201
|
"command": "npx",
|
|
175
|
-
"args": ["-y", "meguro-mcp@0.2.
|
|
202
|
+
"args": ["-y", "meguro-mcp@0.2.5"],
|
|
176
203
|
"env": {
|
|
177
204
|
"MEGURO_API_BASE_URL": "https://api-dev.meguro.io",
|
|
178
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
package/src/docs.mjs
CHANGED
|
@@ -3,9 +3,16 @@ import { createHash } from 'node:crypto';
|
|
|
3
3
|
const RECEIPT_GUIDE_VERSION = 1;
|
|
4
4
|
const RECEIPT_GUIDE_LATEST_VERSION = 2;
|
|
5
5
|
const GATE_POLICY_VERSION = 1;
|
|
6
|
+
const GETTING_STARTED_VERSION = 1;
|
|
7
|
+
const PRODUCT_GUIDE_VERSION = 1;
|
|
6
8
|
const RECEIPT_GUIDE_URI = `meguro://docs/receipt-guide/v${RECEIPT_GUIDE_VERSION}`;
|
|
7
9
|
const RECEIPT_GUIDE_LATEST_URI = `meguro://docs/receipt-guide/v${RECEIPT_GUIDE_LATEST_VERSION}`;
|
|
8
10
|
const GATE_POLICY_URI = `meguro://docs/gate-policy/v${GATE_POLICY_VERSION}`;
|
|
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}`;
|
|
13
|
+
|
|
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';
|
|
9
16
|
|
|
10
17
|
function deepFreeze(value) {
|
|
11
18
|
if (!value || typeof value !== 'object' || Object.isFrozen(value)) return value;
|
|
@@ -745,8 +752,155 @@ do not change. A future policy receives a new id, version, URI, and digest; it i
|
|
|
745
752
|
instead of replacing it.
|
|
746
753
|
`;
|
|
747
754
|
|
|
755
|
+
const GETTING_STARTED_TEXT = `# Getting started with Meguro v1
|
|
756
|
+
|
|
757
|
+
Published URI: \`${GETTING_STARTED_URI}\`
|
|
758
|
+
|
|
759
|
+
## What Meguro is
|
|
760
|
+
|
|
761
|
+
Meguro is a technical evaluation environment for commerce agents, with deterministic practice stores and Shopify-shaped interfaces that let you observe API behavior before production. Its receipts record what an agent called and changed inside the declared practice scenario; they do not predict merchant outcomes or certify production performance.
|
|
762
|
+
|
|
763
|
+
## Identities
|
|
764
|
+
|
|
765
|
+
- \`storeId\` is the canonical public id of a practice store. \`worldId\` is the legacy alias for the
|
|
766
|
+
same id; prefer \`storeId\` in new integrations.
|
|
767
|
+
- \`attemptId\` is the run identity returned by \`practice_run_start\`. Pass it to every later
|
|
768
|
+
\`practice_run_*\` tool; it is not a store id.
|
|
769
|
+
|
|
770
|
+
## Canonical discovery-first sequence
|
|
771
|
+
|
|
772
|
+
1. Call \`templates_list()\` to discover the exact supported template keys.
|
|
773
|
+
2. Call \`stores_list()\`; reuse an owned practice store or call
|
|
774
|
+
\`store_create({ templateKey })\` with a key returned by \`templates_list\`.
|
|
775
|
+
3. Call \`get_connection_details({ storeId })\` for the selected store.
|
|
776
|
+
|
|
777
|
+
\`get_connection_details\` deliberately returns \`SHOPIFY_ADMIN_ACCESS_TOKEN\`: it is the store-scoped
|
|
778
|
+
data-plane credential your commerce agent needs for the exact returned \`*.meguro.io\` Admin URL. Treat
|
|
779
|
+
it as a secret, provide it only to that agent process, and keep it out of model/chat logs. It is not the
|
|
780
|
+
account-scoped \`MEGURO_API_TOKEN\` and cannot control other stores or account resources.
|
|
781
|
+
4. Call \`practice_run_start({ storeId, clock })\`. The fully typed clock shape is
|
|
782
|
+
\`{ mode: "manual" | "harness" | "scheduled", simulationDays: integer, stepDays: integer }\`;
|
|
783
|
+
for example,
|
|
784
|
+
\`practice_run_start({ storeId, clock: { mode: "harness", simulationDays: 14, stepDays: 1 } })\`.
|
|
785
|
+
Both day fields are positive whole Store-day counts.
|
|
786
|
+
5. Run the commerce agent in its own environment against the Shopify-shaped Admin endpoint and
|
|
787
|
+
store-scoped credential returned by \`get_connection_details\`.
|
|
788
|
+
6. Call \`practice_run_status({ attemptId })\`, then
|
|
789
|
+
\`practice_run_checkpoint({ attemptId })\`, to inspect and persist progress.
|
|
790
|
+
7. Call \`practice_run_advance({ attemptId, days, expectedDay, expectedCallSeq })\` with the exact
|
|
791
|
+
current cursors, or replace \`days\` with a supported \`until\` condition. Never send both.
|
|
792
|
+
8. Call \`practice_run_finish({ attemptId })\` when the evaluation window is complete.
|
|
793
|
+
9. Call \`practice_run_report({ attemptId })\` to retrieve the receipt. **Receipt** is the customer
|
|
794
|
+
noun; **report** is the compatibility name retained by the tool and HTTP route.
|
|
795
|
+
|
|
796
|
+
## Control and data planes
|
|
797
|
+
|
|
798
|
+
The local \`meguro-mcp\` server is the Meguro control plane: it discovers stores and drives run
|
|
799
|
+
lifecycle. The practice store's returned Shopify-shaped Admin endpoint is the data plane used by the
|
|
800
|
+
commerce agent under evaluation. A practice store's storefront MCP endpoint is neither of those and
|
|
801
|
+
cannot replace the local control plane or the Shopify-shaped Admin endpoint.
|
|
802
|
+
|
|
803
|
+
## Deeper in-band documentation
|
|
804
|
+
|
|
805
|
+
- Receipt interpretation: read \`meguro://docs/receipt-guide/v1\` or
|
|
806
|
+
\`meguro://docs/receipt-guide/v2\`, or call
|
|
807
|
+
\`docs_read({ topic: "receipt-guide", version: 1 })\` or
|
|
808
|
+
\`docs_read({ topic: "receipt-guide", version: 2 })\`.
|
|
809
|
+
- Gate policy: read \`meguro://docs/gate-policy/v1\`, or call
|
|
810
|
+
\`docs_read({ topic: "gate-policy", version: 1 })\`.
|
|
811
|
+
|
|
812
|
+
All published documentation resources are immutable. Cite the exact URI, version, and SHA-256
|
|
813
|
+
digest returned by Meguro.
|
|
814
|
+
`;
|
|
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
|
+
|
|
748
898
|
function entry(input) {
|
|
749
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
|
+
}
|
|
750
904
|
return deepFreeze({
|
|
751
905
|
topic: input.topic,
|
|
752
906
|
version: input.version,
|
|
@@ -756,7 +910,7 @@ function entry(input) {
|
|
|
756
910
|
description: input.description,
|
|
757
911
|
mimeType: 'text/markdown',
|
|
758
912
|
text,
|
|
759
|
-
sha256:
|
|
913
|
+
sha256: digest,
|
|
760
914
|
});
|
|
761
915
|
}
|
|
762
916
|
|
|
@@ -801,6 +955,25 @@ export function buildDocumentationCatalog(inputs) {
|
|
|
801
955
|
}
|
|
802
956
|
|
|
803
957
|
const CATALOG = buildDocumentationCatalog([
|
|
958
|
+
{
|
|
959
|
+
topic: 'getting-started',
|
|
960
|
+
version: GETTING_STARTED_VERSION,
|
|
961
|
+
uri: GETTING_STARTED_URI,
|
|
962
|
+
name: 'Getting started with Meguro v1',
|
|
963
|
+
title: 'Getting started with Meguro v1',
|
|
964
|
+
description: 'Discovery-first technical-evaluator sequence from template selection through an immutable practice receipt.',
|
|
965
|
+
text: GETTING_STARTED_TEXT,
|
|
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
|
+
},
|
|
804
977
|
{
|
|
805
978
|
topic: 'receipt-guide',
|
|
806
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 { 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.
|
|
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,6 +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: MCP_INITIALIZE_INSTRUCTIONS,
|
|
41
42
|
});
|
|
42
43
|
case 'notifications/initialized':
|
|
43
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
|
|
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
|
|
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: ['receipt-guide', 'gate-policy'],
|
|
1048
|
-
description: '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.
|
|
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 (!['receipt-guide', 'gate-policy'].includes(topic)) {
|
|
1624
|
-
throw new Error('topic must be 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');
|