@yugabytedb/meko-mcp 1.0.8 → 1.1.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/README.md +181 -32
- package/assets/hooks-handlers/lib/capture.js +176 -77
- package/assets/hooks-handlers/lib/package.json +1 -0
- package/assets/hooks-handlers/test_single_conversation.sh +1 -1
- package/assets/skills/meko-mcp-tools/SKILL.md +167 -53
- package/assets/skills/meko-mcp-tools/references/_sections.md +1 -1
- package/assets/skills/meko-mcp-tools/references/tools-agent-id-conventions.md +84 -22
- package/assets/skills/meko-mcp-tools/references/tools-cookbook.md +89 -56
- package/assets/skills/meko-mcp-tools/references/tools-datapack-workflow.md +15 -7
- package/assets/skills/meko-mcp-tools/references/tools-known-limitations.md +17 -9
- package/assets/skills/meko-mcp-tools/references/tools-memory-vs-conversation.md +94 -5
- package/assets/skills/meko-mcp-tools/references/tools-overview.md +52 -37
- package/assets/skills/meko-mcp-tools/references/tools-rag-workflow.md +108 -37
- package/assets/skills/meko-mcp-tools/references/tools-scope-permissions.md +6 -10
- package/assets/skills/meko-mcp-tools/references/tools-troubleshooting.md +30 -18
- package/assets/skills/meko-mcp-tools/references/tools-user-id-conventions.md +55 -69
- package/bin/create-meko-setup.mjs +147 -18
- package/lib/clients/claude-code.mjs +378 -68
- package/lib/clients/claude-desktop.mjs +35 -1
- package/lib/clients/codex.mjs +977 -0
- package/lib/clients/common.mjs +142 -1
- package/lib/clients/cursor.mjs +71 -3
- package/lib/clients/index.mjs +2 -0
- package/lib/config.mjs +30 -0
- package/lib/detect.mjs +52 -44
- package/lib/installer.mjs +9 -2
- package/lib/mcp-transport.mjs +61 -2
- package/lib/migrate/adapters/memory-md.mjs +13 -6
- package/lib/migrate/datapack.mjs +167 -0
- package/lib/migrate/id.mjs +127 -9
- package/lib/migrate/orchestrator.mjs +68 -10
- package/lib/migrate.mjs +346 -3
- package/lib/prompt.mjs +22 -4
- package/lib/validate.mjs +313 -9
- package/lib/version-check.mjs +178 -0
- package/package.json +2 -1
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Meko Setup Installer
|
|
2
2
|
|
|
3
|
-
A zero-dependency Node.js CLI that configures [Meko MCP Server](https://mekodata.netlify.app/) for Claude Code, Claude Desktop, and
|
|
3
|
+
A zero-dependency Node.js CLI that configures [Meko MCP Server](https://mekodata.netlify.app/) for Claude Code, Claude Desktop, Cursor, and OpenAI Codex (CLI + Desktop App) in one command. It registers MCP server settings, configures hook/runtime environment where supported, installs skills support, and validates the setup.
|
|
4
4
|
|
|
5
5
|
Reduces manual setup to a single command.
|
|
6
6
|
|
|
@@ -82,10 +82,18 @@ The installer performs up to 5 steps (some are skippable via flags):
|
|
|
82
82
|
| Step | Action | Command / File Modified |
|
|
83
83
|
|------|--------|------------------------|
|
|
84
84
|
| 1 | Register MCP server | `claude mcp add meko <url> --transport http --scope user` (with `-H "Authorization: Bearer <key>"` for cloud) |
|
|
85
|
-
| 2 | Set hook environment vars | Writes `MEKO_MCP_URL` and `MEKO_API_KEY` into `~/.claude/settings.json` under the `env` key |
|
|
85
|
+
| 2 | Set hook environment vars | Writes `MEKO_MCP_URL` and `MEKO_API_KEY` into `~/.claude/settings.json` under the `env` key. Also prunes any stale Meko hook entries in `settings.json.hooks` that point at a prior install path (e.g. a previous `npx` cache or homebrew-global copy) so only the current install's hooks fire. |
|
|
86
86
|
| 3 | Register plugin marketplace | `claude plugin marketplace add yugabyte/meko-mcp-server --scope user` |
|
|
87
87
|
| 4 | Install skills plugin | `claude plugin install meko-agent-skills --scope user` |
|
|
88
|
-
| 5 | Validate setup | Config check via `claude mcp list`, MCP `initialize` handshake, `tools/list` verification |
|
|
88
|
+
| 5 | Validate setup | Config check via `claude mcp list`, MCP `initialize` handshake, `tools/list` verification, and a canary `datapack_list` call |
|
|
89
|
+
|
|
90
|
+
### Post-install validation (canary)
|
|
91
|
+
|
|
92
|
+
Step 5 includes a **canary call** that invokes the read-only `datapack_list` tool and asserts the response is a non-empty JSON array of datapack records. This proves the part of the stack that connectivity + `tools/list` don't cover: the API token authenticated as a real Meko identity, the tenant resolver found an account for it, and datapack routing wired up the user's actual workspace. A successful `tools/list` only proves the server speaks MCP — it says nothing about whether a Meko tool call would actually find the user's data.
|
|
93
|
+
|
|
94
|
+
The canary used to do a `memory_add` → `memory_get_by_id` → `memory_delete_by_id` round-trip, but mem0's LLM fact-extractor is non-deterministic for synthetic test text — for the same input it sometimes returned `results: []` (no facts extracted) while still adding graph relations, which the installer reported as "no memory id" and surfaced as a validation failure even when the server was healthy. `datapack_list` is a single SQL read with no LLM in the path and returns deterministically.
|
|
95
|
+
|
|
96
|
+
`--no-canary` skips the canary entirely. The `initialize` and `tools/list` checks still run. Use this when you've already proved the round-trip in a prior step (CI, pre-flight smoke).
|
|
89
97
|
|
|
90
98
|
**Files modified (depends on `--client`):**
|
|
91
99
|
|
|
@@ -100,6 +108,14 @@ The installer performs up to 5 steps (some are skippable via flags):
|
|
|
100
108
|
- MCP config: `~/.cursor/mcp.json` or `.cursor/mcp.json`
|
|
101
109
|
- Hooks config: `~/.cursor/hooks.json` or `.cursor/hooks.json` (native mode)
|
|
102
110
|
- Skills path: `~/.cursor/skills` or `.cursor/skills`
|
|
111
|
+
- **OpenAI Codex (CLI + Desktop App)** — one install configures both surfaces (they share `~/.codex/`).
|
|
112
|
+
- MCP config: `~/.codex/config.toml` (TOML; `[mcp_servers.<name>]` block).
|
|
113
|
+
- Skills path: `~/.agents/skills/meko-mcp-tools/` (the shared agent-skills convention).
|
|
114
|
+
- System prompt: `~/.codex/AGENTS.md` (a Meko-managed sentinel block is upserted; user content outside the fence is preserved).
|
|
115
|
+
- **Cloud auth**: Codex's TOML stores `bearer_token_env_var = "MEKO_API_KEY"` rather than the key itself. You must export `MEKO_API_KEY` in your shell before launching Codex. The installer offers (interactively, never with `--yes`) to append the export line to your shell rc (`~/.zshrc` / `~/.bashrc` / `~/.config/fish/config.fish`). On macOS, when the desktop app is detected the installer also offers to run `launchctl setenv MEKO_API_KEY ...` since macOS apps launched from Finder/Dock do not inherit shell-rc env vars.
|
|
116
|
+
- **No project scope**: Codex has no per-project config. `--scope project --client codex` warns and degrades to user scope.
|
|
117
|
+
- **No auto-capture**: Codex does not expose user-installable session lifecycle hooks, so `session-start` / `session-end` capture is not available. Memory persistence still works via the model proactively calling `memory_search` / `memory_add` (the AGENTS.md block prompts this).
|
|
118
|
+
- **Restart Codex.app** after install so it picks up the new MCP server registration.
|
|
103
119
|
|
|
104
120
|
## CLI Reference
|
|
105
121
|
|
|
@@ -110,15 +126,16 @@ Usage:
|
|
|
110
126
|
|
|
111
127
|
| Flag | Description | Default |
|
|
112
128
|
|------|-------------|---------|
|
|
113
|
-
| `--client <list>` | Target client(s): one or more of `claude-code`, `claude-desktop`, `cursor`. Comma-separated, or `all` | `claude-code` |
|
|
129
|
+
| `--client <list>` | Target client(s): one or more of `claude-code`, `claude-desktop`, `cursor`, `codex`. Comma-separated, or `all`. `codex` covers both the OpenAI Codex CLI and the Codex Desktop App (they share `~/.codex/config.toml`). | `claude-code` |
|
|
114
130
|
| `--url <url>` | MCP server URL (from app.mekodev.com > Datapacks > Connect) | _(interactive prompt)_ |
|
|
115
|
-
| `--api-key <key>` | API key for Cloud Meko authentication | _(interactive prompt or `$MEKO_API_KEY` env)_ |
|
|
131
|
+
| `--api-key <key>` | API key for Cloud Meko authentication. If a Cloud `--url` is supplied without this flag, the installer falls back to `$MEKO_API_KEY`, then to an interactive prompt on a TTY. Only fails hard when running under `--yes` or with no TTY attached. | _(interactive prompt or `$MEKO_API_KEY` env)_ |
|
|
116
132
|
| `--local` | Use local Meko at `http://localhost:8000/mcp` (no API key needed) | `false` |
|
|
117
133
|
| `--scope <scope>` | Config scope: `user` or `project` (`claude-desktop` uses user scope config) | `user` |
|
|
118
134
|
| `--name <name>` | MCP server name in config | `meko` |
|
|
119
135
|
| `--cursor-hook-mode <mode>` | Cursor hook strategy: `native`, `claude-compat`, `hybrid` | `hybrid` |
|
|
120
136
|
| `--skip-skills` | Skip plugin marketplace and skills installation (steps 3-4) | `false` |
|
|
121
137
|
| `--skip-validation` | Skip post-install validation (step 5) | `false` |
|
|
138
|
+
| `--no-canary` | Skip the canary `datapack_list` call. Basic connectivity + tools/list still run. | `false` |
|
|
122
139
|
| `--dry-run` | Show what would be done without making changes | `false` |
|
|
123
140
|
| `--uninstall` | Remove Meko MCP server, skills, env vars, and marketplace entry | `false` |
|
|
124
141
|
| `--verbose` | Show detailed output (API keys are always redacted) | `false` |
|
|
@@ -149,9 +166,9 @@ After installing Meko, `--migrate` seeds your new datapack with the conversation
|
|
|
149
166
|
|---|---|---|
|
|
150
167
|
| Claude Code transcripts | `~/.claude/projects/<slug>/<uuid>.jsonl` | One Meko conversation (one Langfuse trace) per session; one paired user↔assistant turn per message pair. |
|
|
151
168
|
| Cursor transcripts | `~/.cursor/projects/<name>/agent-transcripts/<uuid>/*.jsonl` | Same — one conversation per session, one paired turn per user↔assistant round. |
|
|
152
|
-
| User-scope CLAUDE.md | `~/.claude/CLAUDE.md` | One memory per top-level `# ` section (
|
|
153
|
-
| Project-scope CLAUDE.md | `<projectCwd>/.claude/CLAUDE.md` | One memory per top-level `# ` section (
|
|
154
|
-
| Indexed project memories | `~/.claude/projects/<slug>/memory/*.md` | One memory per file; YAML frontmatter (`name`, `description`, `type`) is preserved in metadata. |
|
|
169
|
+
| User-scope CLAUDE.md | `~/.claude/CLAUDE.md` | One memory per top-level `# ` section (`agent_id = "meko_agent"` — the cross-project common bucket — with `metadata.scope = "user"`). |
|
|
170
|
+
| Project-scope CLAUDE.md | `<projectCwd>/.claude/CLAUDE.md` | One memory per top-level `# ` section (`agent_id = "claude_code:<repo-basename>"`, `metadata.scope = "project"`, `metadata.cwd = <project path>`). |
|
|
171
|
+
| Indexed project memories | `~/.claude/projects/<slug>/memory/*.md` | One memory per file (`agent_id = "claude_code:<repo-basename>"`); YAML frontmatter (`name`, `description`, `type`) is preserved in metadata. |
|
|
155
172
|
|
|
156
173
|
Project `cwd` is derived by reading the `cwd` field from a real session file in each slug directory — never by reverse-slugging the directory name, which loses `.` and `-` in component names.
|
|
157
174
|
|
|
@@ -227,7 +244,7 @@ status: running (pending → running → done | failed | stopped)
|
|
|
227
244
|
scope: user
|
|
228
245
|
started: 2026-04-29T00:09:12.673Z
|
|
229
246
|
finished: (in progress)
|
|
230
|
-
current:
|
|
247
|
+
current: agent / a2f6a1d6-... (agent_id / source-session-uuid)
|
|
231
248
|
sessions: 76 / 111 (processed / discovered)
|
|
232
249
|
messages: 674
|
|
233
250
|
memory pairs: 674 (memory_add from Mem0 extractor)
|
|
@@ -260,31 +277,35 @@ memory errs: 0 (failed memory_add calls; re-run with --force to
|
|
|
260
277
|
|
|
261
278
|
- Per-run logs: `~/.meko/migrate/<run-id>/log.ndjson` (one JSON object per line). `tail -f | jq .` is a reasonable debug loop.
|
|
262
279
|
- Per-run progress snapshot: `~/.meko/migrate/<run-id>/progress.json` (what `--migrate-status` reads).
|
|
263
|
-
- Durable state: `~/.meko/migrate/state
|
|
280
|
+
- Durable state: `~/.meko/migrate/state/<datapack-key>.json` tracks per-session checkpoints (`conversationId`, `messagesSent`, `lastUuid`, `status`) and per-memory content hashes, **scoped per destination datapack**. A re-run skips sessions marked `done` and memories whose body hash is unchanged. A partial session resumes from `lastUuid + 1`.
|
|
281
|
+
- **Per-datapack scoping**: the datapack key is the UUID segment of the MCP URL (`https://<uuid>.mcp.mekodev.com/mcp` → `<uuid>`), or a stable 16-char sha256 prefix for non-UUID URLs (e.g. `http://localhost:8000/mcp`). Switching datapacks produces completely independent state — migrating into a fresh datapack never falsely treats sessions as already-done just because an earlier run populated a different one. `--migrate-status` prints the `datapack:` key of the latest run so you can tell at a glance which state it belongs to.
|
|
282
|
+
- Back-compat for the legacy layout: migrations created before this change wrote to a single `~/.meko/migrate/state.json`. On the first run after upgrading, if `state/` is empty and `state.json` exists, the installer asks (or, under `--yes` / CI, silently accepts) "treat the legacy state as belonging to the current datapack" and copies `state.json` → `state/<current-key>.json`. The legacy file is kept on disk in case you roll back the installer.
|
|
264
283
|
- Server-side dedup: `conversation_add_message` gets a deterministic `seed = sha256(agentId + ":" + sessionUuid + ":" + messageUuid)` so partial-run overlap doesn't create duplicate messages.
|
|
265
|
-
- `--force` wipes resume state and re-issues every MCP call
|
|
284
|
+
- `--force` wipes the **current datapack's** resume state and re-issues every MCP call for it. Other datapacks' state files are untouched. If you only want to re-migrate into a new datapack, just point `--url` at the new one — no `--force` needed.
|
|
266
285
|
|
|
267
286
|
### What does NOT get migrated (v1)
|
|
268
287
|
|
|
269
288
|
- Slash-command skills, hooks, and `.claude/settings.json` — those remain in Claude Code's own config; Meko has no equivalent tool.
|
|
270
289
|
- Knowledge-base documents — would need an S3 upload path and `knowledgebase_trigger_index_creation` wiring.
|
|
271
|
-
- Transcripts from other coding agents (Aider, Continue.dev, Windsurf, Codex
|
|
290
|
+
- Transcripts from other coding agents (Aider, Continue.dev, Windsurf, Codex). Claude Code + Cursor only.
|
|
272
291
|
- `user_id` is left null on every call (the server fills it from the API key). Multi-user routing is a follow-up.
|
|
273
292
|
|
|
274
293
|
## Client Compatibility Matrix
|
|
275
294
|
|
|
276
|
-
| Capability | Claude Code | Claude Desktop | Cursor |
|
|
277
|
-
|
|
278
|
-
| One-command install | Yes | Yes | Yes |
|
|
279
|
-
| MCP server registration | via `claude mcp add` | via `claude_desktop_config.json` merge using `mcp-remote` stdio bridge | via `.cursor/mcp.json` merge |
|
|
280
|
-
| Backup before config write | `.bak` on `~/.claude/settings.json` | `.bak` on `claude_desktop_config.json` | `.bak` on Cursor config |
|
|
281
|
-
| Automatic conversation capture | Yes (hooks) | **No** — see [issue #8](https://github.com/amiramm/meko-mcp-server/issues/8) | Yes (hybrid hook mode) |
|
|
282
|
-
| Automatic memory persistence | Yes (hooks + skill) | Skill only (proactive `memory_add`) | Yes (hooks + skill) |
|
|
283
|
-
| Skill install | Plugin marketplace (automatic) | `.skill` bundle auto-built, user drags into app | Copy into `.cursor/skills` |
|
|
284
|
-
| Uninstall | Full automatic | MCP entry removed; skill must be removed manually from app | MCP + hooks + skills cleaned up |
|
|
285
|
-
| `agent_id` used by skill | `claude_code` | `claude_desktop` | `
|
|
286
|
-
| Transport | HTTP only | HTTP (or stdio via hand-edited config) | HTTP only |
|
|
287
|
-
|
|
|
295
|
+
| Capability | Claude Code | Claude Desktop | Cursor | Codex (CLI + App) |
|
|
296
|
+
|---|---|---|---|---|
|
|
297
|
+
| One-command install | Yes | Yes | Yes | Yes |
|
|
298
|
+
| MCP server registration | via `claude mcp add` | via `claude_desktop_config.json` merge using `mcp-remote` stdio bridge | via `.cursor/mcp.json` merge | via `codex mcp add` (CLI) or direct TOML write (App-only) |
|
|
299
|
+
| Backup before config write | `.bak` on `~/.claude/settings.json` | `.bak` on `claude_desktop_config.json` | `.bak` on Cursor config | `.bak` on `~/.codex/config.toml` and `~/.codex/AGENTS.md` |
|
|
300
|
+
| Automatic conversation capture | Yes (hooks) | **No** — see [issue #8](https://github.com/amiramm/meko-mcp-server/issues/8) | Yes (hybrid hook mode) | **No** — Codex has no user-installable hooks; AGENTS.md prompts proactive memory tool calls instead |
|
|
301
|
+
| Automatic memory persistence | Yes (hooks + skill) | Skill only (proactive `memory_add`) | Yes (hooks + skill) | Skill + AGENTS.md (proactive `memory_add`) |
|
|
302
|
+
| Skill install | Plugin marketplace (automatic) | `.skill` bundle auto-built, user drags into app | Copy into `.cursor/skills` | Copy into `~/.agents/skills/meko-mcp-tools/` |
|
|
303
|
+
| Uninstall | Full automatic | MCP entry removed; skill must be removed manually from app | MCP + hooks + skills cleaned up | MCP entry, skill dir, and AGENTS.md block all cleaned up |
|
|
304
|
+
| `agent_id` used by skill | `claude_code:<repo>` per project (via SessionStart hook); cross-project facts go to `meko_agent` | `claude_desktop` | `cursor:<repo>` per project (via Cursor hook); cross-project facts go to `meko_agent` | Whatever the agent derives by following the meko-mcp-tools skill (no hook injects an agent_id; the AGENTS.md block defers to the skill) |
|
|
305
|
+
| Transport | HTTP only | HTTP (or stdio via hand-edited config) | HTTP only | HTTP (Codex's `bearer_token_env_var` model) |
|
|
306
|
+
| Auth model | inline `Authorization: Bearer ...` header | inline header via `mcp-remote` | inline header | env-var name reference (`MEKO_API_KEY` exported in shell or via `launchctl setenv`) |
|
|
307
|
+
| Project scope | Yes (`--scope project`) | No | Yes (`--scope project`) | No (warns and degrades to user scope) |
|
|
308
|
+
| Deferred to a follow-up | — | `.mcpb` Desktop Extension packaging — see [issue #7](https://github.com/amiramm/meko-mcp-server/issues/7) | — | Auto-capture (blocked on upstream Codex exposing user-installable hooks) |
|
|
288
309
|
|
|
289
310
|
## Cloud vs Local
|
|
290
311
|
|
|
@@ -319,6 +340,97 @@ The installer auto-detects cloud vs local based on the URL: any URL containing `
|
|
|
319
340
|
|
|
320
341
|
Before modifying `~/.claude/settings.json`, the installer creates a `.bak` copy at `~/.claude/settings.json.bak`. The merge is additive: existing keys are preserved unless explicitly overridden.
|
|
321
342
|
|
|
343
|
+
## Upgrading
|
|
344
|
+
|
|
345
|
+
There is no separate upgrade command — re-running the installer is the upgrade mechanism. The steps below cover the canonical paths and what to expect.
|
|
346
|
+
|
|
347
|
+
### Upgrading via `npx` (recommended)
|
|
348
|
+
|
|
349
|
+
```bash
|
|
350
|
+
npx @yugabytedb/meko-mcp@latest
|
|
351
|
+
```
|
|
352
|
+
|
|
353
|
+
The `@latest` tag is load-bearing. `npx` aggressively caches the installer tarball based on semver resolution, so plain `npx @yugabytedb/meko-mcp` can silently re-run a stale cached copy and appear to do nothing. `@latest` forces a registry lookup and pulls the newest published version. This applies to every `npx @yugabytedb/meko-mcp ...` example earlier in this README — append `@latest` whenever you intend to upgrade rather than re-run the same version.
|
|
354
|
+
|
|
355
|
+
### Upgrading a globally-installed copy
|
|
356
|
+
|
|
357
|
+
If you installed via `npm install -g @yugabytedb/meko-mcp`, the `npx` path above will not touch the global copy. Update the global package first, then re-run:
|
|
358
|
+
|
|
359
|
+
```bash
|
|
360
|
+
npm update -g @yugabytedb/meko-mcp
|
|
361
|
+
create-meko-setup
|
|
362
|
+
```
|
|
363
|
+
|
|
364
|
+
### What a re-run actually does
|
|
365
|
+
|
|
366
|
+
Re-running the installer is idempotent but not inert. A re-run:
|
|
367
|
+
|
|
368
|
+
- Overwrites the `env` block in `~/.claude/settings.json` (with a `.bak` backup — see the Security section above for backup semantics and locations).
|
|
369
|
+
- Prunes stale Meko hook entries in `settings.json.hooks` that reference a prior install path (e.g., a frozen `capture.js` from an old `npx` cache or homebrew-global copy). The current install's hook entries — whether they come from the plugin (`${CLAUDE_PLUGIN_ROOT}/...`) or an absolute path matching the current `hooks-handlers/` root — are preserved. Non-Meko hooks in the same arrays are untouched.
|
|
370
|
+
- Rewrites the Cursor skill directory and hooks config if `--client cursor` is targeted.
|
|
371
|
+
- Auto-updates the skills plugin if it's already installed (via `claude plugin update meko-agent-skills@meko-agent-skills`), otherwise installs it. See "Updating the skills plugin" below.
|
|
372
|
+
- Rebuilds the Claude Desktop `.skill` bundle if `--client claude-desktop` is targeted. You must re-drag the rebuilt bundle into Claude Desktop to pick up the new skill content.
|
|
373
|
+
|
|
374
|
+
### Updating the skills plugin (Claude Code)
|
|
375
|
+
|
|
376
|
+
The `meko-agent-skills` plugin is distributed via the Claude Code plugin marketplace and versions independently of the installer npm package. Re-running the installer now picks up the latest skill definitions automatically: it probes `claude plugin list` and, when the plugin is already present, calls
|
|
377
|
+
|
|
378
|
+
```bash
|
|
379
|
+
claude plugin update meko-agent-skills@meko-agent-skills --scope <scope>
|
|
380
|
+
```
|
|
381
|
+
|
|
382
|
+
using the qualified `plugin@marketplace` form required by Claude Code CLI 2.1.x. Older CLIs that don't know `plugin update` fall back to an uninstall-then-install dance to achieve the same refresh. You can still run the update manually if you want to bypass the installer:
|
|
383
|
+
|
|
384
|
+
```bash
|
|
385
|
+
claude plugin update meko-agent-skills@meko-agent-skills
|
|
386
|
+
```
|
|
387
|
+
|
|
388
|
+
#### Inside an active Claude Code session
|
|
389
|
+
|
|
390
|
+
If you're already in a session and want to pull the latest skill content without exiting:
|
|
391
|
+
|
|
392
|
+
```
|
|
393
|
+
/plugin marketplace update meko-agent-skills
|
|
394
|
+
/reload-plugins
|
|
395
|
+
```
|
|
396
|
+
|
|
397
|
+
The first command refetches the marketplace's source and rebuilds the plugin cache; the second activates the new content without restarting. Run `/doctor` afterward to confirm there are no plugin load errors.
|
|
398
|
+
|
|
399
|
+
#### Enabling auto-update so future skill changes land automatically
|
|
400
|
+
|
|
401
|
+
Auto-update is **per-marketplace and disabled by default for third-party marketplaces** (only Anthropic-official marketplaces auto-update out of the box). To opt in:
|
|
402
|
+
|
|
403
|
+
1. Open the in-session `/plugin` command, switch to the **Marketplaces** tab, select `meko-agent-skills`, and toggle **Enable auto-update**.
|
|
404
|
+
2. Or set it directly in your settings file (`~/.claude/settings.json` for user scope, or a project's `.claude/settings.json`):
|
|
405
|
+
|
|
406
|
+
```json
|
|
407
|
+
{
|
|
408
|
+
"extraKnownMarketplaces": {
|
|
409
|
+
"meko-agent-skills": {
|
|
410
|
+
"autoUpdate": true
|
|
411
|
+
}
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
```
|
|
415
|
+
|
|
416
|
+
Once enabled, Claude Code refreshes the marketplace and pulls the latest plugin version on each session start. There's no global "auto-update everything" switch — opt in per marketplace.
|
|
417
|
+
|
|
418
|
+
### Checking your installed version
|
|
419
|
+
|
|
420
|
+
```bash
|
|
421
|
+
create-meko-setup --version
|
|
422
|
+
```
|
|
423
|
+
|
|
424
|
+
### Rollback
|
|
425
|
+
|
|
426
|
+
If an upgrade breaks something, restore the `.bak` backups the installer wrote before its changes:
|
|
427
|
+
|
|
428
|
+
```bash
|
|
429
|
+
cp ~/.claude/settings.json.bak ~/.claude/settings.json
|
|
430
|
+
```
|
|
431
|
+
|
|
432
|
+
See the Security section above for the full list of backup locations across Claude Code, Claude Desktop, and Cursor.
|
|
433
|
+
|
|
322
434
|
## Troubleshooting
|
|
323
435
|
|
|
324
436
|
### Claude Code CLI not found
|
|
@@ -342,14 +454,25 @@ Connection refused. Is the MCP server running?
|
|
|
342
454
|
For local Meko, ensure `docker compose up -d` has started the stack.
|
|
343
455
|
```
|
|
344
456
|
|
|
345
|
-
For local setups, confirm the stack is running and the MCP endpoint is accessible:
|
|
457
|
+
For local setups, confirm the stack is running and the MCP endpoint is accessible. Note that the `Accept` header **must** advertise both `application/json` and `text/event-stream` per the MCP Streamable HTTP spec — sending only one yields HTTP 406:
|
|
346
458
|
|
|
347
459
|
```bash
|
|
348
460
|
curl -s http://localhost:8000/mcp -X POST \
|
|
349
461
|
-H "Content-Type: application/json" \
|
|
462
|
+
-H "Accept: application/json, text/event-stream" \
|
|
350
463
|
-d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-03-26","capabilities":{},"clientInfo":{"name":"test","version":"1.0.0"}}}'
|
|
351
464
|
```
|
|
352
465
|
|
|
466
|
+
For cloud, swap the URL and add `-H "Authorization: Bearer $MEKO_API_KEY"`.
|
|
467
|
+
|
|
468
|
+
### HTTP 406 Not Acceptable
|
|
469
|
+
|
|
470
|
+
```
|
|
471
|
+
Server returned HTTP 406: ... "Client must accept both application/json and text/event-stream"
|
|
472
|
+
```
|
|
473
|
+
|
|
474
|
+
The MCP server is enforcing strict Streamable HTTP compliance: clients must advertise both content types in their `Accept` header. The installer does this automatically; if you see this error, you're likely on an older installer release. Upgrade with `npx @yugabytedb/meko-mcp@latest`.
|
|
475
|
+
|
|
353
476
|
### Authentication failure (401 / 403)
|
|
354
477
|
|
|
355
478
|
```
|
|
@@ -358,6 +481,8 @@ Server returned 401. Verify your API key is correct and has not expired.
|
|
|
358
481
|
|
|
359
482
|
- Confirm the API key at app.mekodev.com > Datapacks > Connect.
|
|
360
483
|
- If using `$MEKO_API_KEY` env var, ensure it is exported in the current shell.
|
|
484
|
+
- Confirm the key environment matches the URL: PATs minted on `app.mekodev.com` only validate against `mcp.mekodev.com`; PATs minted on `cloud.mekodata.ai` only validate against `mcp.mekodata.ai`.
|
|
485
|
+
- The installer normalizes API keys (trims surrounding whitespace and a single matching pair of quotes) so a paste with a trailing newline or a literal `"…"` from a `.env` file is fine — but your raw shell variable might still be contaminated. Echo it (`echo "[$MEKO_API_KEY]"`) and check the brackets bracket the key tightly with no extra characters.
|
|
361
486
|
- Re-run the installer interactively to re-enter the key.
|
|
362
487
|
|
|
363
488
|
### Plugin marketplace already registered
|
|
@@ -384,10 +509,10 @@ cp ~/.claude/settings.json.bak ~/.claude/settings.json
|
|
|
384
509
|
### Missing core tools
|
|
385
510
|
|
|
386
511
|
```
|
|
387
|
-
Missing core tools: memory_search, conversation_create. Found 0 tool(s) total.
|
|
512
|
+
Missing core tools: memory_search, memory_get_by_id, conversation_create. Found 0 tool(s) total.
|
|
388
513
|
```
|
|
389
514
|
|
|
390
|
-
The MCP server responded but does not expose the expected tools (`memory_search`, `conversation_create`, `db_summarize_database`). This usually means a server version mismatch. Update the MCP server or check which datapack is connected.
|
|
515
|
+
The MCP server responded but does not expose the expected tools (`memory_search`, `memory_get_by_id`, `conversation_create`, `db_summarize_database`). This usually means a server version mismatch. Update the MCP server or check which datapack is connected. `memory_get_by_id` is used by the canary round-trip for direct-row verification (see [Post-install validation](#post-install-validation-canary-round-trip) above), so an older server that exposes `memory_search` but not `memory_get_by_id` will fail the canary check.
|
|
391
516
|
|
|
392
517
|
### DNS lookup failed
|
|
393
518
|
|
|
@@ -490,17 +615,27 @@ installer/
|
|
|
490
615
|
create-meko-setup.mjs # CLI entry point (arg parsing, orchestration)
|
|
491
616
|
lib/
|
|
492
617
|
installer.mjs # Shared multi-client orchestration
|
|
493
|
-
clients/ # Per-client adapters (claude-code/desktop/cursor)
|
|
494
|
-
claude-code.mjs # Backward-compatible Claude wrapper
|
|
618
|
+
clients/ # Per-client adapters (claude-code/desktop/cursor), aliases, common helpers
|
|
495
619
|
config.mjs # Safe JSON read/merge/write + path helpers
|
|
496
620
|
detect.mjs # Claude CLI and existing config detection
|
|
497
621
|
logger.mjs # ANSI-colored console output (respects NO_COLOR)
|
|
498
622
|
prompt.mjs # Interactive readline prompts (choice, text, secret, yes/no)
|
|
499
|
-
validate.mjs # Post-install validation (config, connectivity, tools)
|
|
623
|
+
validate.mjs # Post-install validation (config, connectivity, tools, canary)
|
|
624
|
+
migrate.mjs # Migrate subcommand orchestration + per-datapack state
|
|
625
|
+
migrate/
|
|
626
|
+
id.mjs # datapackKeyFromUrl + agent-id / seed helpers
|
|
627
|
+
orchestrator.mjs, daemon.mjs, state.mjs, progress.mjs, lockfile.mjs, logger.mjs
|
|
628
|
+
claude-parser.mjs, mcp-client.mjs, adapters/
|
|
629
|
+
scripts/
|
|
630
|
+
bundle-assets.mjs # prepack: copy skill/hook assets into the npm tarball
|
|
631
|
+
prepublish-smoke.sh # Pre-publish smoke harness (run before `npm publish`)
|
|
500
632
|
test/
|
|
501
633
|
config.test.mjs # Unit tests for JSON merge/read/write
|
|
502
|
-
clients.test.mjs # Unit tests for cursor
|
|
503
|
-
validate.test.mjs # Unit tests for validation logic
|
|
634
|
+
clients.test.mjs # Unit tests for cursor/claude-code/desktop adapters
|
|
635
|
+
validate.test.mjs # Unit tests for validation logic (including the canary round-trip)
|
|
636
|
+
migrate.test.mjs # Unit tests for migrator + datapackKeyFromUrl helper
|
|
637
|
+
migrate-integration.test.mjs # Integration tests for migrator scoping + legacy state back-compat
|
|
638
|
+
prepublish-smoke.test.mjs # Piped-stdin smoke tests, gated by SMOKE_HARNESS=1
|
|
504
639
|
installer.test.mjs # Integration tests for full install flow
|
|
505
640
|
fixtures/ # Mock settings files for tests
|
|
506
641
|
```
|
|
@@ -524,12 +659,26 @@ npm run test:integration
|
|
|
524
659
|
export MEKO_TEST_CLOUD_URL=https://<your-mcp>.mekodev.com/mcp
|
|
525
660
|
export MEKO_TEST_API_KEY=<your-cloud-api-key>
|
|
526
661
|
npm run test:integration:cloud
|
|
662
|
+
|
|
663
|
+
# Pre-publish smoke harness: npm pack → install tarball into a throwaway
|
|
664
|
+
# $HOME → exercise the installed CLI (`--version`, `--help`, `--dry-run`)
|
|
665
|
+
# via both the raw node entry and the `node_modules/.bin/meko-mcp` symlink
|
|
666
|
+
# that `npx` resolves through. Gated piped-stdin tests in
|
|
667
|
+
# `test/prepublish-smoke.test.mjs` (SMOKE_HARNESS=1) are run by the harness.
|
|
668
|
+
npm run smoke
|
|
527
669
|
```
|
|
528
670
|
|
|
529
671
|
The cloud round-trip tests point the installer at a throw-away `$HOME` via
|
|
530
672
|
`spawnSync`, so the developer's real `~/.claude/settings.json` is never
|
|
531
673
|
modified. They skip cleanly when either env var is unset.
|
|
532
674
|
|
|
675
|
+
The pre-publish smoke harness is the last gate before `npm publish`. See
|
|
676
|
+
[`RELEASING.md`](../RELEASING.md) at the repo root for the full release
|
|
677
|
+
procedure (version bump → smoke harness → manual TTY checklist → tag → CI
|
|
678
|
+
publish workflows). A CI workflow at `.github/workflows/prepublish-smoke.yml`
|
|
679
|
+
runs the harness on Ubuntu and macOS for every push to a `release/*`
|
|
680
|
+
branch.
|
|
681
|
+
|
|
533
682
|
### Design Principles
|
|
534
683
|
|
|
535
684
|
- **Zero external dependencies** -- Node.js built-ins only (`fs`, `path`, `readline`, `child_process`, `url`, `http`, `https`, `os`, `node:test`, `node:assert`), matching the pattern of `capture.js`.
|