meguro-mcp 0.2.3 → 0.2.4
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 +7 -0
- package/README.md +14 -11
- package/package.json +1 -1
- package/src/docs.mjs +74 -0
- package/src/server.mjs +3 -2
- package/src/tools.mjs +6 -6
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to `meguro-mcp` are recorded here. Versions follow Semantic Versioning.
|
|
4
4
|
|
|
5
|
+
## 0.2.4 — 2026-08-02
|
|
6
|
+
|
|
7
|
+
- Adds the immutable `meguro://docs/getting-started/v1` resource and matching `getting-started`
|
|
8
|
+
`docs_read` topic with the exact discovery-first evaluator workflow.
|
|
9
|
+
- Adds concise MCP `initialize.instructions` that directs new clients to the same in-band guide.
|
|
10
|
+
- Keeps the public registry at exactly 44 tools and preserves every non-documentation tool contract.
|
|
11
|
+
|
|
5
12
|
## 0.2.3 — 2026-08-01
|
|
6
13
|
|
|
7
14
|
- Adds `templates_list`, a read-only closed-world projection of the ordered practice-store template
|
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.2.
|
|
17
|
+
npx -y meguro-mcp@0.2.4
|
|
18
18
|
```
|
|
19
19
|
|
|
20
20
|
Pin the version in client configuration. A pinned quickstart stays reproducible and never changes its
|
|
@@ -90,6 +90,7 @@ local stdio server and the hosted OAuth resource server:
|
|
|
90
90
|
- `meguro://docs/receipt-guide/v1`
|
|
91
91
|
- `meguro://docs/receipt-guide/v2`
|
|
92
92
|
- `meguro://docs/gate-policy/v1`
|
|
93
|
+
- `meguro://docs/getting-started/v1`
|
|
93
94
|
|
|
94
95
|
Use `resources/list` and `resources/read` when the client supports MCP resources. Use
|
|
95
96
|
`docs_read({ topic, version })` in every client, including clients without a resource browser.
|
|
@@ -121,14 +122,16 @@ Receipt retrieval is `practice_run_report`: **receipt** is the user-facing noun;
|
|
|
121
122
|
|
|
122
123
|
Use these tool names in order:
|
|
123
124
|
|
|
124
|
-
1. `
|
|
125
|
-
2. `
|
|
126
|
-
3.
|
|
127
|
-
4. `
|
|
128
|
-
5.
|
|
129
|
-
6.
|
|
130
|
-
7. `
|
|
131
|
-
8.
|
|
125
|
+
1. `templates_list()` to discover the supported template keys.
|
|
126
|
+
2. `stores_list()`, then reuse an owned store or call `store_create({ templateKey })`.
|
|
127
|
+
3. `get_connection_details({ storeId })` through the explicit secure flow (`worldId` remains a legacy alias). Keep the returned values out of model/chat logs.
|
|
128
|
+
4. `practice_run_start({ storeId, clock: { mode: "harness", simulationDays: 14, stepDays: 1 } })` — the same `storeId` the previous step took and returned.
|
|
129
|
+
5. Launch the agency agent in its own environment with the stable returned `SHOPIFY_*` values.
|
|
130
|
+
6. `practice_run_status({ attemptId })`, then `practice_run_checkpoint({ attemptId })`.
|
|
131
|
+
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.
|
|
132
|
+
8. Inspect the aligned checkpoint evidence in Console or the run APIs.
|
|
133
|
+
9. `practice_run_finish({ attemptId })`, then `practice_run_report({ attemptId })` for the run's receipt.
|
|
134
|
+
10. Optionally execute an immutable temporal probe-set revision through the HTTP surface and inspect/export it in Gate.
|
|
132
135
|
|
|
133
136
|
`get_connection_details` deliberately returns `SHOPIFY_ADMIN_ACCESS_TOKEN`: it is the store-scoped
|
|
134
137
|
data-plane credential your commerce agent needs for the exact returned `*.meguro.io` Admin URL. Treat
|
|
@@ -162,7 +165,7 @@ claude mcp add meguro \
|
|
|
162
165
|
-e MEGURO_API_BASE_URL=https://api-dev.meguro.io \
|
|
163
166
|
-e MEGURO_API_TOKEN=meg_sk_... \
|
|
164
167
|
-e MEGURO_DASHBOARD_URL=https://... \
|
|
165
|
-
-- npx -y meguro-mcp@0.2.
|
|
168
|
+
-- npx -y meguro-mcp@0.2.4
|
|
166
169
|
```
|
|
167
170
|
|
|
168
171
|
## Register — Cursor (`.cursor/mcp.json`)
|
|
@@ -172,7 +175,7 @@ claude mcp add meguro \
|
|
|
172
175
|
"mcpServers": {
|
|
173
176
|
"meguro": {
|
|
174
177
|
"command": "npx",
|
|
175
|
-
"args": ["-y", "meguro-mcp@0.2.
|
|
178
|
+
"args": ["-y", "meguro-mcp@0.2.4"],
|
|
176
179
|
"env": {
|
|
177
180
|
"MEGURO_API_BASE_URL": "https://api-dev.meguro.io",
|
|
178
181
|
"MEGURO_API_TOKEN": "meg_sk_...",
|
package/package.json
CHANGED
package/src/docs.mjs
CHANGED
|
@@ -3,9 +3,13 @@ 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;
|
|
6
7
|
const RECEIPT_GUIDE_URI = `meguro://docs/receipt-guide/v${RECEIPT_GUIDE_VERSION}`;
|
|
7
8
|
const RECEIPT_GUIDE_LATEST_URI = `meguro://docs/receipt-guide/v${RECEIPT_GUIDE_LATEST_VERSION}`;
|
|
8
9
|
const GATE_POLICY_URI = `meguro://docs/gate-policy/v${GATE_POLICY_VERSION}`;
|
|
10
|
+
const GETTING_STARTED_URI = `meguro://docs/getting-started/v${GETTING_STARTED_VERSION}`;
|
|
11
|
+
|
|
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.';
|
|
9
13
|
|
|
10
14
|
function deepFreeze(value) {
|
|
11
15
|
if (!value || typeof value !== 'object' || Object.isFrozen(value)) return value;
|
|
@@ -745,6 +749,67 @@ do not change. A future policy receives a new id, version, URI, and digest; it i
|
|
|
745
749
|
instead of replacing it.
|
|
746
750
|
`;
|
|
747
751
|
|
|
752
|
+
const GETTING_STARTED_TEXT = `# Getting started with Meguro v1
|
|
753
|
+
|
|
754
|
+
Published URI: \`${GETTING_STARTED_URI}\`
|
|
755
|
+
|
|
756
|
+
## What Meguro is
|
|
757
|
+
|
|
758
|
+
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.
|
|
759
|
+
|
|
760
|
+
## Identities
|
|
761
|
+
|
|
762
|
+
- \`storeId\` is the canonical public id of a practice store. \`worldId\` is the legacy alias for the
|
|
763
|
+
same id; prefer \`storeId\` in new integrations.
|
|
764
|
+
- \`attemptId\` is the run identity returned by \`practice_run_start\`. Pass it to every later
|
|
765
|
+
\`practice_run_*\` tool; it is not a store id.
|
|
766
|
+
|
|
767
|
+
## Canonical discovery-first sequence
|
|
768
|
+
|
|
769
|
+
1. Call \`templates_list()\` to discover the exact supported template keys.
|
|
770
|
+
2. Call \`stores_list()\`; reuse an owned practice store or call
|
|
771
|
+
\`store_create({ templateKey })\` with a key returned by \`templates_list\`.
|
|
772
|
+
3. Call \`get_connection_details({ storeId })\` for the selected store.
|
|
773
|
+
|
|
774
|
+
\`get_connection_details\` deliberately returns \`SHOPIFY_ADMIN_ACCESS_TOKEN\`: it is the store-scoped
|
|
775
|
+
data-plane credential your commerce agent needs for the exact returned \`*.meguro.io\` Admin URL. Treat
|
|
776
|
+
it as a secret, provide it only to that agent process, and keep it out of model/chat logs. It is not the
|
|
777
|
+
account-scoped \`MEGURO_API_TOKEN\` and cannot control other stores or account resources.
|
|
778
|
+
4. Call \`practice_run_start({ storeId, clock })\`. The fully typed clock shape is
|
|
779
|
+
\`{ mode: "manual" | "harness" | "scheduled", simulationDays: integer, stepDays: integer }\`;
|
|
780
|
+
for example,
|
|
781
|
+
\`practice_run_start({ storeId, clock: { mode: "harness", simulationDays: 14, stepDays: 1 } })\`.
|
|
782
|
+
Both day fields are positive whole Store-day counts.
|
|
783
|
+
5. Run the commerce agent in its own environment against the Shopify-shaped Admin endpoint and
|
|
784
|
+
store-scoped credential returned by \`get_connection_details\`.
|
|
785
|
+
6. Call \`practice_run_status({ attemptId })\`, then
|
|
786
|
+
\`practice_run_checkpoint({ attemptId })\`, to inspect and persist progress.
|
|
787
|
+
7. Call \`practice_run_advance({ attemptId, days, expectedDay, expectedCallSeq })\` with the exact
|
|
788
|
+
current cursors, or replace \`days\` with a supported \`until\` condition. Never send both.
|
|
789
|
+
8. Call \`practice_run_finish({ attemptId })\` when the evaluation window is complete.
|
|
790
|
+
9. Call \`practice_run_report({ attemptId })\` to retrieve the receipt. **Receipt** is the customer
|
|
791
|
+
noun; **report** is the compatibility name retained by the tool and HTTP route.
|
|
792
|
+
|
|
793
|
+
## Control and data planes
|
|
794
|
+
|
|
795
|
+
The local \`meguro-mcp\` server is the Meguro control plane: it discovers stores and drives run
|
|
796
|
+
lifecycle. The practice store's returned Shopify-shaped Admin endpoint is the data plane used by the
|
|
797
|
+
commerce agent under evaluation. A practice store's storefront MCP endpoint is neither of those and
|
|
798
|
+
cannot replace the local control plane or the Shopify-shaped Admin endpoint.
|
|
799
|
+
|
|
800
|
+
## Deeper in-band documentation
|
|
801
|
+
|
|
802
|
+
- Receipt interpretation: read \`meguro://docs/receipt-guide/v1\` or
|
|
803
|
+
\`meguro://docs/receipt-guide/v2\`, or call
|
|
804
|
+
\`docs_read({ topic: "receipt-guide", version: 1 })\` or
|
|
805
|
+
\`docs_read({ topic: "receipt-guide", version: 2 })\`.
|
|
806
|
+
- Gate policy: read \`meguro://docs/gate-policy/v1\`, or call
|
|
807
|
+
\`docs_read({ topic: "gate-policy", version: 1 })\`.
|
|
808
|
+
|
|
809
|
+
All published documentation resources are immutable. Cite the exact URI, version, and SHA-256
|
|
810
|
+
digest returned by Meguro.
|
|
811
|
+
`;
|
|
812
|
+
|
|
748
813
|
function entry(input) {
|
|
749
814
|
const text = String(input.text);
|
|
750
815
|
return deepFreeze({
|
|
@@ -801,6 +866,15 @@ export function buildDocumentationCatalog(inputs) {
|
|
|
801
866
|
}
|
|
802
867
|
|
|
803
868
|
const CATALOG = buildDocumentationCatalog([
|
|
869
|
+
{
|
|
870
|
+
topic: 'getting-started',
|
|
871
|
+
version: GETTING_STARTED_VERSION,
|
|
872
|
+
uri: GETTING_STARTED_URI,
|
|
873
|
+
name: 'Getting started with Meguro v1',
|
|
874
|
+
title: 'Getting started with Meguro v1',
|
|
875
|
+
description: 'Discovery-first technical-evaluator sequence from template selection through an immutable practice receipt.',
|
|
876
|
+
text: GETTING_STARTED_TEXT,
|
|
877
|
+
},
|
|
804
878
|
{
|
|
805
879
|
topic: 'receipt-guide',
|
|
806
880
|
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 { GETTING_STARTED_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.4' };
|
|
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: GETTING_STARTED_INSTRUCTIONS,
|
|
41
42
|
});
|
|
42
43
|
case 'notifications/initialized':
|
|
43
44
|
case 'notifications/cancelled':
|
package/src/tools.mjs
CHANGED
|
@@ -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:
|
|
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.',
|
|
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', 'receipt-guide', 'gate-policy'],
|
|
1048
|
+
description: 'getting-started, 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 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', 'receipt-guide', 'gate-policy'].includes(topic)) {
|
|
1624
|
+
throw new Error('topic must be getting-started, 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');
|