@yugabytedb/meko-mcp 2.0.0 → 2.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +183 -33
- package/assets/hooks-handlers/codex-session-end.sh +13 -0
- package/assets/hooks-handlers/cursor-session-start.sh +19 -1
- package/assets/hooks-handlers/lib/capture-notices.js +321 -0
- package/assets/hooks-handlers/lib/capture-state.js +2079 -0
- package/assets/hooks-handlers/lib/capture-status-cli.js +82 -0
- package/assets/hooks-handlers/lib/capture.js +1653 -225
- package/assets/hooks-handlers/lib/checkpoint-timer.js +455 -50
- package/assets/hooks-handlers/lib/kiro-handler.js +738 -0
- package/assets/hooks-handlers/lib/terminal-handoff.js +418 -0
- package/assets/hooks-handlers/session-end.sh +3 -24
- package/assets/hooks-handlers/session-start.sh +8 -1
- package/assets/hooks-handlers/test_checkpoint_timer.sh +162 -0
- package/assets/scripts/meko-statusline.sh +41 -1
- package/assets/scripts/package-desktop-skill.sh +32 -1
- package/assets/skills/meko-mcp-tools/SKILL.md +90 -137
- package/assets/skills/meko-mcp-tools/references/_sections.md +3 -5
- package/assets/skills/meko-mcp-tools/references/tools-agent-id-conventions.md +31 -28
- package/assets/skills/meko-mcp-tools/references/tools-conversation-dedup.md +5 -7
- package/assets/skills/meko-mcp-tools/references/tools-conversation-reasoning.md +50 -0
- package/assets/skills/meko-mcp-tools/references/tools-cookbook.md +69 -49
- package/assets/skills/meko-mcp-tools/references/tools-datapack-workflow.md +6 -6
- package/assets/skills/meko-mcp-tools/references/tools-known-limitations.md +29 -5
- package/assets/skills/meko-mcp-tools/references/tools-memory-vs-conversation.md +29 -92
- package/assets/skills/meko-mcp-tools/references/tools-overview.md +42 -40
- package/assets/skills/meko-mcp-tools/references/tools-rag-workflow.md +1 -2
- package/assets/skills/meko-mcp-tools/references/tools-troubleshooting.md +18 -11
- package/assets/skills/meko-mcp-tools/references/tools-user-id-conventions.md +10 -9
- package/assets/skills/meko-mcp-tools-desktop/SKILL.md +51 -44
- package/assets/skills/meko-mcp-tools-desktop/desktop/README.md +6 -6
- package/assets/skills/meko-mcp-tools-desktop/references/_sections.md +2 -2
- package/assets/skills/meko-mcp-tools-desktop/references/tools-agent-id-conventions.md +34 -25
- package/assets/skills/meko-mcp-tools-desktop/references/tools-conversation-reasoning.md +50 -0
- package/assets/skills/meko-mcp-tools-desktop/references/tools-cookbook.md +63 -37
- package/assets/skills/meko-mcp-tools-desktop/references/tools-known-limitations.md +4 -4
- package/assets/skills/meko-mcp-tools-desktop/references/tools-memory-vs-conversation.md +19 -22
- package/assets/skills/meko-mcp-tools-desktop/references/tools-overview.md +42 -40
- package/assets/skills/meko-mcp-tools-desktop/references/tools-rag-workflow.md +1 -2
- package/assets/skills/meko-mcp-tools-desktop/references/tools-troubleshooting.md +3 -17
- package/assets/skills/meko-select-datapack-desktop/SKILL.md +31 -21
- package/assets/skills/meko-select-datapack-desktop/references/cookbook.md +8 -8
- package/assets/skills/meko-select-datapack-desktop/references/role-display-future.md +41 -0
- package/assets/skills/meko-select-datapack-desktop/references/troubleshooting.md +1 -1
- package/bin/create-meko-setup.mjs +93 -16
- package/lib/capture-status.mjs +67 -0
- package/lib/clients/aliases.mjs +5 -0
- package/lib/clients/claude-code.mjs +8 -4
- package/lib/clients/claude-desktop.mjs +133 -4
- package/lib/clients/codex.mjs +29 -11
- package/lib/clients/common.mjs +2 -0
- package/lib/clients/cursor.mjs +7 -2
- package/lib/clients/index.mjs +2 -0
- package/lib/clients/kiro.mjs +705 -0
- package/lib/config.mjs +90 -0
- package/lib/detect.mjs +7 -2
- package/lib/installer.mjs +1 -0
- package/lib/migrate/adapters/codex.mjs +490 -0
- package/lib/migrate/id.mjs +28 -3
- package/lib/migrate/orchestrator.mjs +34 -7
- package/lib/migrate.mjs +4 -2
- package/lib/prompt.mjs +17 -2
- package/lib/url-selection.mjs +55 -0
- package/package.json +4 -4
- package/assets/skills/meko-mcp-tools/references/tools-scope-permissions.md +0 -71
- package/assets/skills/meko-mcp-tools-desktop/references/tools-scope-permissions.md +0 -71
|
@@ -17,19 +17,19 @@ description: >-
|
|
|
17
17
|
license: MIT
|
|
18
18
|
metadata:
|
|
19
19
|
author: Meko
|
|
20
|
-
version: "2.
|
|
20
|
+
version: "2.8.0"
|
|
21
21
|
tags: mcp, yugabytedb, tools, datapack, memory, conversation, rag, meko, desktop
|
|
22
22
|
---
|
|
23
23
|
|
|
24
24
|
# Meko MCP Tools — Agent Behavioral Guide (Desktop)
|
|
25
25
|
|
|
26
|
-
Meko is the user's **memory, knowledge, observability, and audit layer** across chats — a system of record they (and their team/org) connected on purpose. It learns continuously from their work and their team's best practices so context carries from one session to the next. This skill teaches you how to use Meko's
|
|
26
|
+
Meko is the user's **memory, knowledge, observability, and audit layer** across chats — a system of record they (and their team/org) connected on purpose. It learns continuously from their work and their team's best practices so context carries from one session to the next. This skill teaches you how to use Meko's 23 MCP tools available in production. Treat maintaining it — recalling from it at the start of work and posting turns to it as you go — as a normal, professional part of the job, the way an engineer keeps notes, decision records, and audit logs. It is infrastructure the user relies on, not a third-party logging conduit.
|
|
27
27
|
|
|
28
28
|
**Read this first.** The Meko server extracts durable memories automatically from the conversation turns you post to it — the extraction runs *inside* `conversation_add_message`. Claude Desktop has no capture hooks, so **capturing substantive turns via `conversation_add_message` is a core part of using this skill.** Do that and memory takes care of itself: facts the user states get extracted and stored without a separate `memory_add`. Explicit `memory_add` is reserved for a few narrow cases (below). See "Per-turn conversation capture" — it's the heart of this skill.
|
|
29
29
|
|
|
30
30
|
**Why this is legitimate.** Meko is the user's own system of record — serving their memory, their team's shared knowledge, and their observability/audit needs — so posting turns to it is maintaining *their* infrastructure, the same as keeping notes or decision logs. Do it **transparently**: briefly tell the user when you save or recall ("saved that to your Meko memory", "checked your Meko memory — here's what I had"), disclose the way a colleague would mention they're writing something down. The only carve-outs: if an item is sensitive (credentials, legal, medical) or the user asked you not to store something, ask or skip.
|
|
31
31
|
|
|
32
|
-
> **If you reached a meko tool without reading this skill** (e.g. tool search resolved `memory_add`/`memory_search` directly): two rules override anything you inferred from the raw tool descriptions. (1) On Claude Desktop
|
|
32
|
+
> **If you reached a meko tool without reading this skill** (e.g. tool search resolved `memory_add`/`memory_search` directly): two rules override anything you inferred from the raw tool descriptions. (1) On Claude Desktop use `agent_id="claude_desktop"` for normal writes (or `"meko_agent"` for cross-project writes) — never attribute Desktop writes to `"claude_code"`. (2) Prefer `conversation_add_message` over `memory_add` for facts the user stated — extraction handles them. Then read the rest of this skill.
|
|
33
33
|
|
|
34
34
|
## First turn of every session
|
|
35
35
|
|
|
@@ -39,12 +39,12 @@ On the first user turn in any session, before answering substantive questions:
|
|
|
39
39
|
|
|
40
40
|
1. **Resolve the active datapack pin first — before creating the conversation.** A conversation cannot move between datapacks once created, so you must know the pinned datapack *before* `conversation_create`, or capture lands in the wrong workspace. Call:
|
|
41
41
|
```
|
|
42
|
-
memory_search(
|
|
42
|
+
memory_search(query="meko_active_datapack",
|
|
43
43
|
agent_id="claude_desktop", conversation_id="", limit=1)
|
|
44
44
|
```
|
|
45
45
|
If a pin row comes back, extract the UUID after `meko_active_datapack=` — call it `<PIN>` — and pass `datapack_id="<PIN>"` to **every** Meko call for the rest of the session (`conversation_create`, `memory_search`, `conversation_add_message`, etc.). If no pin is found, omit `datapack_id` everywhere and let the server resolve the default. (The `meko-select-datapack-desktop` skill is what writes this pin; you honor it here whether or not that skill ran this session.)
|
|
46
46
|
2. **Call `conversation_create`** (`agent_id="claude_desktop"`, and `datapack_id="<PIN>"` if a pin was found) once and keep the returned `conversation_id` for the whole session. You need it to post turns (per-turn capture, above) and for memory calls.
|
|
47
|
-
3. **Call `memory_search`** with `agent_id="claude_desktop"`, the `conversation_id` from step 2, `datapack_id="<PIN>"` if pinned, and a query derived from the user's topic.
|
|
47
|
+
3. **Call `memory_search`** with `agent_id="claude_desktop"`, the `conversation_id` from step 2, `datapack_id="<PIN>"` if pinned, and a query derived from the user's topic. One search returns this user's memories across every agent, including the `meko_agent` common bucket; `agent_id` attributes the trace but does not filter memory results.
|
|
48
48
|
4. Incorporate the recalled facts into your reply. Don't re-ask things you've been told before.
|
|
49
49
|
|
|
50
50
|
Recall and capture are routine parts of answering — the user has set Meko up as their memory layer, so you don't need a per-call permission prompt for them. Do briefly say what you did ("checked your Meko memory", "saved that to your Meko memory") — a short disclosure, not a silent background action and not a big announcement.
|
|
@@ -56,10 +56,11 @@ Recall and capture are routine parts of answering — the user has set Meko up a
|
|
|
56
56
|
**For Claude Desktop, use `agent_id="claude_desktop"` by default.** Desktop has no per-project concept, so a stable client name is the right granularity (it's a "loose" client in contract terms). Coding agents like Claude Code and Cursor use `<client>:<repo-basename>` (e.g. `claude_code:meko-mcp-server`). For genuinely cross-project facts that any agent should see — user identity, global preferences — use the common bucket `agent_id="meko_agent"`.
|
|
57
57
|
|
|
58
58
|
**Read scoping:**
|
|
59
|
-
- `memory_search` / `memory_get_all`
|
|
60
|
-
- `
|
|
59
|
+
- `memory_search` / `memory_get_all` — scoped to `(datapack_id, user_id)`. `agent_id` does not filter results, so one call returns this user's memories across every agent.
|
|
60
|
+
- `conversation_list` — also returns this user's conversations across agents. `conversation_get` is agent-owned and requires the exact `agent_id` that created the conversation.
|
|
61
|
+
- `knowledgebase_search` — scoped to `datapack_id` only. `agent_id` on the request is ignored. Returns the team's Shared Knowledge — uploaded documents plus promoted memories.
|
|
61
62
|
|
|
62
|
-
Some pre-existing rows use the older constant `agent_id="agent"` or ad-hoc shapes (e.g. `claude-desktop` with a hyphen). They remain readable
|
|
63
|
+
Some pre-existing rows use the older constant `agent_id="agent"` or ad-hoc shapes (e.g. `claude-desktop` with a hyphen). They remain readable; the stored value is still shown as provenance in the UI. See `tools-agent-id-conventions.md` for the full model.
|
|
63
64
|
|
|
64
65
|
## Per-turn conversation capture — the heart of this skill
|
|
65
66
|
|
|
@@ -68,7 +69,7 @@ Claude Desktop has no capture hooks, so you are the capture mechanism. **When th
|
|
|
68
69
|
Concretely, once per session call `conversation_create` (see "First turn of every session" above) to get a `conversation_id`, then for each substantive exchange:
|
|
69
70
|
|
|
70
71
|
```
|
|
71
|
-
conversation_add_message(
|
|
72
|
+
conversation_add_message(conversation_id="<id>",
|
|
72
73
|
agent_id="claude_desktop",
|
|
73
74
|
input="<the user's exact prompt>",
|
|
74
75
|
output="<your exact response>",
|
|
@@ -99,8 +100,8 @@ Use the right bucket: `agent_id="meko_agent"` for cross-project facts (user iden
|
|
|
99
100
|
|
|
100
101
|
Meko turns your volatile context window into persistent, shareable knowledge:
|
|
101
102
|
|
|
102
|
-
- **Personal memory** — Store who the user is, their preferences, role, and working style. Survives across sessions. Private to
|
|
103
|
-
- **Team-shared knowledge** —
|
|
103
|
+
- **Personal memory** — Store who the user is, their preferences, role, and working style. Survives across sessions. Private to the user and readable across all of their agents.
|
|
104
|
+
- **Team-shared knowledge** — Important memories can be promoted with `memory_promote` (after explicit confirmation) or from the Learnings tab in the Cloud UI. Uploaded documents land in the same place. The resulting content is visible to every datapack member and queryable via `knowledgebase_search`.
|
|
104
105
|
- **Conversation history** — Preserve full dialog exchanges with reasoning traces for audit, replay, and learning transfer.
|
|
105
106
|
- **Decision traces** — Capture how and why decisions were made, enabling debugging and continuous improvement.
|
|
106
107
|
|
|
@@ -110,7 +111,7 @@ Meko turns your volatile context window into persistent, shareable knowledge:
|
|
|
110
111
|
- You need to decide what to store, where, and how (personal memory vs. team-shared knowledge)
|
|
111
112
|
- You want to search the team's shared knowledge base (`knowledgebase_search`)
|
|
112
113
|
- You are managing datapacks
|
|
113
|
-
- You want to understand
|
|
114
|
+
- You want to understand `agent_id` conventions, or `datapack_id` routing
|
|
114
115
|
|
|
115
116
|
## Critical: Use Meko, not local storage
|
|
116
117
|
|
|
@@ -139,8 +140,9 @@ Your job is not to decide fact-by-fact what to `memory_add`. It's to **post ever
|
|
|
139
140
|
| User corrects or negates a prior fact | Post the turn (the new fact is extracted). Extraction is **additive**, so if the stale fact must not survive, `memory_search` for it and `memory_update` / `memory_delete_by_id`. |
|
|
140
141
|
| User explicitly says "remember this" | `memory_add` (verbatim), in addition to posting the turn. |
|
|
141
142
|
| A durable fact lives only in your output or a tool result | `memory_add`. Extraction reads the user side of the turn, so it won't capture these. |
|
|
142
|
-
| User asks "what do you know about X?" |
|
|
143
|
+
| User asks "what do you know about X?" | Two-call sweep: one `memory_search(agent_id="claude_desktop")` covers this user's memories across every agent; `knowledgebase_search(datapack_id=<X>)` covers team-shared knowledge. |
|
|
143
144
|
| User asks "what do we (as a team) know about X?" or about uploaded documents | `knowledgebase_search` (returns uploaded docs + promoted memories). |
|
|
145
|
+
| User asks to share specific private memories with the team | Follow the `memory_promote` confirmation workflow below. Never promote based on a fuzzy search result or implied consent. |
|
|
144
146
|
| User provides structured/tabular data (CSV, data dictionary) | Not natively supported via MCP. Point the user at the UI's Add Knowledge upload; do not `memory_add` row-by-row. |
|
|
145
147
|
| User wants to add documents to the team's knowledge base | Point them at the Cloud UI flow — Datapack → Actions → **Add Knowledge** (PDF/TXT/MD/JSON/MP4, 5MB each, 10/batch). MCP ingestion tools are not available on Cloud. |
|
|
146
148
|
|
|
@@ -151,7 +153,7 @@ The **what and when** is covered above ("Per-turn conversation capture" — post
|
|
|
151
153
|
`conversation_create` — once per session; keep the `conversation_id`:
|
|
152
154
|
|
|
153
155
|
```
|
|
154
|
-
conversation_create(
|
|
156
|
+
conversation_create(agent_id="claude_desktop",
|
|
155
157
|
title="<descriptive topic>")
|
|
156
158
|
```
|
|
157
159
|
|
|
@@ -170,75 +172,80 @@ conversation_create(scope="write", agent_id="claude_desktop",
|
|
|
170
172
|
|
|
171
173
|
Only for the three exception cases (explicit "remember this", output-only/tool-derived fact, overwriting correction) — not for facts the user stated, which the posted turn already captures. Example of an explicit save:
|
|
172
174
|
```
|
|
173
|
-
memory_add(
|
|
175
|
+
memory_add(
|
|
174
176
|
text="Remember: deploy scripts must be run from the repo root, never a subdir",
|
|
175
177
|
agent_id="claude_desktop",
|
|
176
178
|
conversation_id="<id from conversation_create>")
|
|
177
179
|
```
|
|
178
|
-
Required parameters: `
|
|
180
|
+
Required parameters: `text`, `agent_id`, `conversation_id`. On **writes**, `conversation_id` must be a real UUID from `conversation_create` — writes attached to a nil/empty conversation are orphaned in Langfuse traces. Empty / missing `agent_id` is NOT rejected — the server quietly falls back to the `meko_agent` common bucket. Pass `agent_id="claude_desktop"` explicitly so this client's writes stay in the right bucket and don't pollute the cross-project pool.
|
|
179
181
|
|
|
180
182
|
### memory_search — correct call pattern
|
|
181
183
|
```
|
|
182
|
-
memory_search(
|
|
184
|
+
memory_search(
|
|
183
185
|
query="user role",
|
|
184
186
|
agent_id="claude_desktop",
|
|
185
187
|
conversation_id="<id from conversation_create>")
|
|
186
188
|
```
|
|
187
|
-
Required parameters: `
|
|
189
|
+
Required parameters: `query`, `agent_id`, `conversation_id`. On **`memory_search`** specifically, `conversation_id` is used only for Langfuse trace nesting — it does NOT filter results. Pass the session's UUID so the search span appears under the active conversation; passing `""` is accepted and means "don't nest under any trace." For conversation-scoped filtering use the separate `run_id` parameter.
|
|
188
190
|
|
|
189
|
-
|
|
190
|
-
```
|
|
191
|
-
memory_search(scope="read", query="user role",
|
|
192
|
-
agent_id="meko_agent", conversation_id="<id>")
|
|
193
|
-
```
|
|
191
|
+
`agent_id` attributes the search trace but does not filter the returned memories. One call includes rows written by `claude_desktop`, `meko_agent`, coding agents, and legacy agent values for this user.
|
|
194
192
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
**Interpreting results — trust the memory rows, be skeptical of stray `relations`.** `memory_search` returns three lists: `results` (the actual stored memories — trust these), `relations`, and `promoted_relations` (entity-graph edges). Two things to know so you don't discard useful results:
|
|
193
|
+
**Interpreting results.** `memory_search` returns a single list — `{"results": [...]}` — the stored memories, ranked by a hybrid score (semantic similarity + keyword match + a boost for memories mentioning the entities named in your query). There are no `relations` / `promoted_relations` keys. Two things to know so you don't discard useful results:
|
|
198
194
|
|
|
199
195
|
- **`memory_search` is cross-agent by design.** Results include memories written by *other* clients (`agent_id` "agent", "claude_code:…", etc.) for the same user — that is expected, not a tenant leak. Use them.
|
|
200
|
-
- **
|
|
196
|
+
- **Older (pre-2.x) servers may still return `relations` / `promoted_relations` (graph edges) alongside `results`.** If they appear, trust the memory rows in `results` and disregard any edge that contradicts them — don't conclude the whole result set is "someone else's data" and throw it away.
|
|
201
197
|
|
|
202
198
|
### knowledgebase_search — correct call pattern
|
|
203
199
|
```
|
|
204
|
-
knowledgebase_search(
|
|
200
|
+
knowledgebase_search(
|
|
205
201
|
query="...",
|
|
206
202
|
agent_id="<anything — ignored>",
|
|
207
203
|
conversation_id="<id>",
|
|
208
204
|
datapack_id="<datapack UUID>",
|
|
209
205
|
limit=10)
|
|
210
206
|
```
|
|
211
|
-
Required parameters: `
|
|
207
|
+
Required parameters: `query`, `agent_id`, `conversation_id`, `datapack_id`. `datapack_id` has no default here. `agent_id` is ignored for filtering — results are the team's shared knowledge on the datapack regardless of what you pass.
|
|
208
|
+
|
|
209
|
+
### memory_promote — explicit confirmation required
|
|
210
|
+
|
|
211
|
+
`memory_promote` is destructive and non-idempotent: it makes selected content visible to the datapack, moves the memories into shared knowledge, and evicts the private mem0 records. There is no MCP rollback.
|
|
212
|
+
|
|
213
|
+
1. Use `memory_search` or `memory_get_all` to obtain exact memory UUIDs from the `id` field. Never pass any other identifier.
|
|
214
|
+
2. Present each exact candidate memory and its UUID to the user.
|
|
215
|
+
3. State that promotion is one-way, team-visible, and removes the private records.
|
|
216
|
+
4. Obtain explicit confirmation for those exact candidates before calling `memory_promote`.
|
|
217
|
+
5. Call it with the active `conversation_id`, exact `memory_ids`, `agent_id="claude_desktop"`, and intended `datapack_id`. If a legacy deployment exposes `scope`, use the minimum `write` scope; do not escalate to `admin`.
|
|
218
|
+
6. Only datapack owners and maintainers may promote. If a viewer/contributor receives 403, or any authentication/permission error occurs, report it and stop. Do not retry with a broader scope, another datapack, or altered identity.
|
|
219
|
+
7. After success, optionally verify visibility with `knowledgebase_search`. Do not claim rollback is possible.
|
|
220
|
+
|
|
221
|
+
The Cloud UI's Learnings tab remains an alternative user-driven path.
|
|
212
222
|
|
|
213
223
|
### Critical parameter rules
|
|
214
224
|
|
|
215
|
-
- **agent_id**: `"claude_desktop"` for this client's project-less
|
|
225
|
+
- **agent_id**: `"claude_desktop"` for this client's project-less writes and trace attribution. Use `"meko_agent"` when writing genuinely cross-project facts such as user identity. Empty/missing values on writes route to `meko_agent`. The value does not filter `memory_search`, `memory_get_all`, `conversation_list`, or `knowledgebase_search`; `conversation_get` is the read that requires the creating agent's exact value. See `tools-agent-id-conventions.md`.
|
|
216
226
|
- **conversation_id**: Behavior varies by tool. On write tools (`memory_add`, `conversation_add_message`) pass a real UUID from `conversation_create` — a nil/empty value orphans the Langfuse trace. On `memory_search` it's used only for trace nesting (not for filtering), and empty-string is accepted; on `memory_get_all` and most read tools, still pass the session UUID when you have one. Never pass `"current"` or other non-UUID junk — only a real UUID or an intentionally empty string where the tool allows it.
|
|
217
|
-
- **scope**: Only `"read"`, `"write"`, or `"admin"`. Nothing else.
|
|
218
227
|
- **When in doubt about optional parameters, omit them.** The server has sensible defaults.
|
|
219
228
|
|
|
220
229
|
## Key concepts
|
|
221
230
|
|
|
222
|
-
1. **
|
|
223
|
-
2. **
|
|
224
|
-
3. **
|
|
225
|
-
4. **
|
|
226
|
-
5. **
|
|
227
|
-
6. **
|
|
228
|
-
7. **
|
|
229
|
-
8. **
|
|
230
|
-
9. **
|
|
231
|
-
10. **
|
|
232
|
-
11. **Error recovery**: Connection errors are common with memory tools — see `tools-troubleshooting.md` for retry strategies and fallbacks.
|
|
231
|
+
1. **23 tools in 6 groups** (all available in production): Memory (8 — including `memory_promote`), Conversation (6), Knowledge Base (1 — `knowledgebase_search`), Datapack (5), Artifacts (2 — `artifact_put`, `artifact_get`), Observability (1 — `track_token_usage`). Memory is captured automatically from turns posted with `conversation_add_message` — post each substantive turn and the server extracts durable memories from it. KB ingestion is UI-only (Datapack → Actions → Add Knowledge); raw SQL is not exposed. See `tools-overview.md`.
|
|
232
|
+
2. **datapack_id routing**: DB, RAG, and memory tools accept optional `datapack_id` (default datapack if omitted). `knowledgebase_search` is the exception: `datapack_id` is **required** there.
|
|
233
|
+
3. **agent_id is multi-agent**: For Claude Desktop, use `agent_id="claude_desktop"` for normal writes and `agent_id="meko_agent"` for cross-project facts. Writes are attributed to `(datapack_id, user_id, agent_id)`. Personal memory reads and `conversation_list` span all of this user's agents; `conversation_get` remains agent-owned. `knowledgebase_search` ignores `agent_id` entirely. See `tools-agent-id-conventions.md`.
|
|
234
|
+
4. **Personal memory vs. team-shared knowledge**: Un-promoted memories are scoped per-user — readable across all of that user's agents, but no other user can see them. With explicit confirmation, `memory_promote` moves exact memories into Shared Knowledge; the Cloud UI's Learnings tab is an alternative. Promoted content is visible to every datapack member. `knowledgebase_search` is the MCP read path for both Shared Knowledge and uploaded documents.
|
|
235
|
+
5. **conversation_id IS the Langfuse trace ID**: every MCP tool call inside a conversation becomes a span under that trace. Observable in the Meko UI's Observe hub. See `tools-memory-vs-conversation.md`.
|
|
236
|
+
6. **Adding documents to the team knowledge base is UI-only on Cloud today**: user uploads files via Datapack → Actions → **Add Knowledge** (PDF/TXT/MD/JSON/MP4, 5MB each). The MCP ingestion tools are not available on Cloud. See `tools-rag-workflow.md`.
|
|
237
|
+
7. **Manual conversation capture**: Claude Desktop does not have automatic capture hooks. Create and save conversations explicitly when sessions are valuable.
|
|
238
|
+
8. **Memory latencies are not cheap**: observed on prod 2026-05-07 — `memory_add` 12-21s/call (calls OpenAI), `memory_search` 2-6s/call. Budget accordingly.
|
|
239
|
+
9. **Known limitations**: see `tools-known-limitations.md` before attempting write operations on tools that appear in the catalog but aren't available on Cloud.
|
|
240
|
+
10. **Error recovery**: Connection errors are common with memory tools — see `tools-troubleshooting.md` for retry strategies and fallbacks.
|
|
233
241
|
|
|
234
242
|
## Reference sections
|
|
235
243
|
|
|
236
244
|
| File | What it covers |
|
|
237
245
|
|------|---------------|
|
|
238
|
-
| `tools-overview.md` | Complete catalog of all
|
|
246
|
+
| `tools-overview.md` | Complete catalog of all 23 tools available in production, with decision tree |
|
|
239
247
|
| `tools-cookbook.md` | Per-tool examples with correct parameters, responses, and error cases |
|
|
240
248
|
| `tools-memory-vs-conversation.md` | When to use memory tools vs conversation tools |
|
|
241
249
|
| `tools-rag-workflow.md` | End-to-end RAG pipeline flow |
|
|
242
|
-
| `tools-scope-permissions.md` | read/write/admin permission hierarchy |
|
|
243
250
|
| `tools-troubleshooting.md` | Error recovery, retry strategies, stuck pipeline diagnosis |
|
|
244
251
|
| `tools-known-limitations.md` | Broken tools, missing capabilities, permission gaps |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Meko MCP Tools — Claude Desktop Setup
|
|
2
2
|
|
|
3
|
-
Use the Meko MCP tools skill natively in Claude Desktop. Because Desktop has no lifecycle hooks, the skill teaches Claude to capture each substantive turn by posting it via `conversation_add_message` (the server extracts durable memories from those posts), to reserve explicit `memory_add` for the narrow cases (the user says "remember this", a fact lives only in the assistant's output or a tool result, or a corrected fact needs overwriting), to classify information, to use all
|
|
3
|
+
Use the Meko MCP tools skill natively in Claude Desktop. Because Desktop has no lifecycle hooks, the skill teaches Claude to capture each substantive turn by posting it via `conversation_add_message` (the server extracts durable memories from those posts), to reserve explicit `memory_add` for the narrow cases (the user says "remember this", a fact lives only in the assistant's output or a tool result, or a corrected fact needs overwriting), to classify information, to use all <!--tool-count-->24<!--/tool-count--> Meko MCP tools correctly, and to handle errors gracefully.
|
|
4
4
|
|
|
5
5
|
## Setup
|
|
6
6
|
|
|
@@ -12,21 +12,21 @@ In Claude Desktop: Customize > Personal plugins > Browse plugin marketplace. Sea
|
|
|
12
12
|
|
|
13
13
|
**Option B — .skill file:**
|
|
14
14
|
|
|
15
|
-
Download `meko-mcp-tools-desktop.skill` from the [releases page](https://github.com/yugabyte/meko-
|
|
15
|
+
Download `meko-mcp-tools-desktop.skill` from the [releases page](https://github.com/yugabyte/meko-skills/releases) and drag it into Claude Desktop (or use Customize > Skills > Import).
|
|
16
16
|
|
|
17
17
|
**Option C — Manual install:**
|
|
18
18
|
|
|
19
19
|
```bash
|
|
20
|
-
git clone https://github.com/yugabyte/meko-
|
|
20
|
+
git clone https://github.com/yugabyte/meko-skills.git
|
|
21
21
|
```
|
|
22
22
|
|
|
23
|
-
Copy `skills/
|
|
23
|
+
Copy `skills/meko-mcp-tools-desktop/` into Claude Desktop's skill directory. The exact path depends on your Desktop version — check Customize > Skills for the install location.
|
|
24
24
|
|
|
25
25
|
### Step 2: Configure the MCP server
|
|
26
26
|
|
|
27
27
|
Add the Meko MCP server to your Claude Desktop configuration. Go to Claude > Settings > Developer > Edit Config and add a `mcpServers` entry.
|
|
28
28
|
|
|
29
|
-
**Local HTTP** (for
|
|
29
|
+
**Local HTTP** (for local Meko development environments):
|
|
30
30
|
|
|
31
31
|
```json
|
|
32
32
|
{
|
|
@@ -70,7 +70,7 @@ Replace `/path/to/meko-mcp-server` with your cloned repo path and set the correc
|
|
|
70
70
|
{
|
|
71
71
|
"mcpServers": {
|
|
72
72
|
"meko": {
|
|
73
|
-
"url": "https
|
|
73
|
+
"url": "https://mcp.mekodata.ai/mcp"
|
|
74
74
|
}
|
|
75
75
|
}
|
|
76
76
|
}
|
|
@@ -6,15 +6,15 @@ description: Maps reference files to their topics for the meko-mcp-tools-desktop
|
|
|
6
6
|
# Reference Sections
|
|
7
7
|
|
|
8
8
|
## Tool Selection & Catalog
|
|
9
|
-
- [tools-overview.md](tools-overview.md) — Complete catalog of all
|
|
9
|
+
- [tools-overview.md](tools-overview.md) — Complete catalog of all 23 tools available in production, with a decision tree
|
|
10
10
|
|
|
11
11
|
## Tool-Specific Guidance
|
|
12
12
|
- [tools-agent-id-conventions.md](tools-agent-id-conventions.md) — Multi-agent model: the three buckets (project `<client>:<repo-basename>`, common `meko_agent`, loose client name), personal vs. team-shared read surfaces
|
|
13
13
|
- [tools-memory-vs-conversation.md](tools-memory-vs-conversation.md) — Decision framework: memory_add vs conversation_create/conversation_add_message, plus Desktop capture guidance
|
|
14
|
+
- [tools-conversation-reasoning.md](tools-conversation-reasoning.md) — Authoring the `reasoning` and `plan` fields on `conversation_add_message`, with worked examples
|
|
14
15
|
- [tools-rag-workflow.md](tools-rag-workflow.md) — End-to-end RAG pipeline: source registration, index creation, status polling
|
|
15
16
|
|
|
16
17
|
## Safety & Permissions
|
|
17
|
-
- [tools-scope-permissions.md](tools-scope-permissions.md) — read/write/admin permission hierarchy and per-tool requirements
|
|
18
18
|
|
|
19
19
|
## Practical Usage
|
|
20
20
|
- [tools-cookbook.md](tools-cookbook.md) — Per-tool examples with correct parameters, expected responses, and common errors
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
# agent_id — multi-agent identity on Cloud Meko
|
|
2
2
|
|
|
3
|
-
`agent_id` identifies **which agent wrote a memory or created a conversation**. It is not a constant. Pick a value that represents the
|
|
3
|
+
`agent_id` identifies **which agent wrote a memory or created a conversation**. It is not a constant. Pick a value that represents the client you're acting for and use it consistently for writes and trace attribution within this session.
|
|
4
4
|
|
|
5
|
-
The Cloud UI (`cloud.mekodata.ai`) renders `agent_id` as a badge on every memory and conversation row — so the value you pick is user-visible. Multiple different agents
|
|
5
|
+
The Cloud UI (`cloud.mekodata.ai`) renders `agent_id` as a badge on every memory and conversation row — so the value you pick is user-visible. Multiple different agents can write into the same datapack, and both the UI and one `memory_search` show the user's full cross-agent picture.
|
|
6
6
|
|
|
7
7
|
## The three buckets
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Each memory is tagged with the writing `agent_id`. Pick the right value up front so attribution remains meaningful:
|
|
10
10
|
|
|
11
11
|
| Pattern | When to use | Example |
|
|
12
12
|
|---|---|---|
|
|
@@ -14,13 +14,15 @@ Memories segregate strictly by `agent_id`. Pick the right bucket up front:
|
|
|
14
14
|
| `<client>:<repo-basename>` | Coding agents (Claude Code, Cursor) writing project-scoped facts. **Not used by Claude Desktop**, but you'll see these values on rows written by other clients in the same datapack. | `claude_code:meko-mcp-server` |
|
|
15
15
|
| `meko_agent` | Cross-project common bucket — facts any agent should see regardless of project (user identity, global preferences). The server stores empty/missing `agent_id` here automatically. | `meko_agent` |
|
|
16
16
|
|
|
17
|
-
**For Claude Desktop, the practical default is `claude_desktop
|
|
17
|
+
**For Claude Desktop, the practical default is `claude_desktop`; use `meko_agent` for genuinely cross-client facts.** This controls attribution, not read visibility: the user's other agents can read either value.
|
|
18
|
+
|
|
19
|
+
**Don't write with another client's shape.** A Claude Desktop session that writes with `agent_id="claude_code"` (or `claude_code:something`) creates rows the UI will incorrectly attribute to Claude Code. Use `claude_desktop` when Desktop is running.
|
|
18
20
|
|
|
19
21
|
## Valid characters
|
|
20
22
|
|
|
21
23
|
The server stores `agent_id` as a row-level column value — it never becomes a PostgreSQL identifier on Cloud. Any printable string works: colons, hyphens, dots, underscores, spaces. Stay within what's readable in the UI badge.
|
|
22
24
|
|
|
23
|
-
Pre-existing data in real datapacks includes a mix of legacy shapes — `agent`, `claude-code`, `claude_code`, `cursor:<slug>`, `claude-code:-Users-...`, `claude-desktop` (hyphenated). None of them cause errors
|
|
25
|
+
Pre-existing data in real datapacks includes a mix of legacy shapes — `agent`, `claude-code`, `claude_code`, `cursor:<slug>`, `claude-code:-Users-...`, `claude-desktop` (hyphenated). None of them cause errors or prevent memory recall. New writes should follow the table above.
|
|
24
26
|
|
|
25
27
|
## How agent_id filters reads and writes
|
|
26
28
|
|
|
@@ -29,15 +31,19 @@ Pre-existing data in real datapacks includes a mix of legacy shapes — `agent`,
|
|
|
29
31
|
- The row stores `(meko_datapack_id, meko_user_id, meko_agent_id)` — the user_id comes from your cognito account; the datapack_id defaults or is explicit; the agent_id is what you pass.
|
|
30
32
|
- If you pass an empty or whitespace-only `agent_id`, the server stores `meko_agent`. That's the common bucket — fine for cross-client facts; not what you want for desktop-personal writes.
|
|
31
33
|
|
|
32
|
-
### Personal reads — `memory_search`, `memory_get_all
|
|
34
|
+
### Personal memory reads — `memory_search`, `memory_get_all`
|
|
35
|
+
|
|
36
|
+
Filter tuple: `(datapack_id, user_id)`. `agent_id` is not applied on memory reads.
|
|
33
37
|
|
|
34
|
-
|
|
38
|
+
- `user_id` is **always enforced**: one user cannot read another team member's un-promoted memories directly from MCP.
|
|
39
|
+
- `agent_id` does **not** filter results. One search returns this user's memories across every agent, including `claude_desktop`, project agents, legacy values, and the `meko_agent` common bucket.
|
|
35
40
|
|
|
36
|
-
|
|
37
|
-
- `agent_id` is **strictly matched**: a search with `agent_id="claude_desktop"` returns only rows whose stored value is exactly that. Memories written from `agent_id="claude_code:foo"` are invisible to it.
|
|
38
|
-
- An empty `agent_id` is rewritten to `meko_agent` server-side, so a "broad" read with empty string returns only common-bucket rows — **not** a cross-client fan-out. To search across multiple agent_ids, call once per known value.
|
|
41
|
+
Empirically verified 2026-07-23 on Cloud prod: memories written under two distinct `agent_id` values were both returned by a search using a third value.
|
|
39
42
|
|
|
40
|
-
|
|
43
|
+
### Personal conversation reads — `conversation_get`, `conversation_list`
|
|
44
|
+
|
|
45
|
+
- `conversation_get` is agent-owned: pass the exact `agent_id` that created the conversation.
|
|
46
|
+
- `conversation_list` is not agent-filtered and returns the datapack's conversations for this user across agents.
|
|
41
47
|
|
|
42
48
|
### Team-shared reads — `knowledgebase_search`
|
|
43
49
|
|
|
@@ -57,7 +63,8 @@ memory_add(agent_id=X, text=...)
|
|
|
57
63
|
▼
|
|
58
64
|
mem0_collection ── personal memories, scoped (datapack, user, agent)
|
|
59
65
|
│
|
|
60
|
-
│
|
|
66
|
+
│ memory_promote (exact UUIDs + explicit confirmation)
|
|
67
|
+
│ or UI "Promote to Knowledge" (Learnings tab)
|
|
61
68
|
│ ─────────────────────────────────────────
|
|
62
69
|
│ Strips user_id, keeps agent_id as metadata,
|
|
63
70
|
│ copies into team-shared table
|
|
@@ -70,30 +77,32 @@ knowledgebase_search(agent_id=anything, query=...)
|
|
|
70
77
|
|
|
71
78
|
- **Personal memories** are what you get from `memory_search` / `memory_get_all`. Private to you.
|
|
72
79
|
- **Shared Knowledge** is what you get from `knowledgebase_search`. Visible to every user and every agent on the datapack.
|
|
73
|
-
- **Promotion
|
|
80
|
+
- **Promotion has MCP and UI paths.** `memory_promote` moves exact, user-confirmed memories into Shared Knowledge and evicts the private records; the Learnings tab is the user-driven alternative. Only datapack owners and maintainers may use the MCP path.
|
|
74
81
|
|
|
75
82
|
## When to use what — broad-query guidance
|
|
76
83
|
|
|
77
|
-
If the user asks "what do you know about X?"
|
|
78
|
-
|
|
79
|
-
1. **First call**: `memory_search(agent_id="claude_desktop", query="X")` — returns your desktop-personal memories.
|
|
80
|
-
2. **Second call**: `memory_search(agent_id="meko_agent", query="X")` — returns the common cross-project bucket: anything written with `agent_id="meko_agent"` from any client, plus rows the server stored under that name when called with empty `agent_id`.
|
|
81
|
-
3. **Third call**: `knowledgebase_search(agent_id="<anything>", datapack_id="<datapack>", query="X")` — returns team-shared knowledge. Useful when the answer may have been promoted by the user or a teammate.
|
|
84
|
+
If the user asks "what do you know about X?":
|
|
82
85
|
|
|
83
|
-
|
|
86
|
+
1. **`memory_search(agent_id="claude_desktop", query="X")`** — returns all of this user's personal memories across every agent. `agent_id` attributes the trace.
|
|
87
|
+
2. **`knowledgebase_search(agent_id="<anything>", datapack_id="<datapack>", query="X")`** — returns team-shared knowledge. Useful when the answer may have been promoted by the user or a teammate.
|
|
84
88
|
|
|
85
|
-
Always tell the user
|
|
89
|
+
Always tell the user which surface you searched: personal memory or team-shared knowledge.
|
|
86
90
|
|
|
87
|
-
##
|
|
91
|
+
## Optional sub-scoping
|
|
88
92
|
|
|
89
|
-
Optional parameters narrow
|
|
93
|
+
Optional parameters can narrow a call further:
|
|
90
94
|
- `user_id` — explicitly scope writes/reads to a specific end-user if your agent serves multiple (rare in Claude Desktop; more common in API products)
|
|
91
|
-
- `run_id` —
|
|
95
|
+
- `run_id` — **read/delete filter only**, and it filters on the row's
|
|
96
|
+
`meko_conversation_id`, so the value to pass is a *conversation id*, not a
|
|
97
|
+
free-form run label. On `memory_add` it is Langfuse trace metadata only and is
|
|
98
|
+
never persisted on the row: writing with `run_id=X` then reading with
|
|
99
|
+
`memory_search(run_id=X)` returns nothing, silently. Scope writes with
|
|
100
|
+
`conversation_id` instead (MEKO-473).
|
|
92
101
|
|
|
93
102
|
Available on `memory_add`, `memory_search`, `memory_get_all`, `memory_delete_all`, `conversation_create`, `conversation_list`.
|
|
94
103
|
|
|
95
104
|
## Things I checked and found in-data on real Cloud datapacks
|
|
96
105
|
|
|
97
|
-
- `agent_id="agent"` appears on many legacy rows — it was the previous canonical constant. New writes should use the schema in the table above;
|
|
98
|
-
- Memory Summary UI (`/datapacks/<name>/memory-summary`)
|
|
106
|
+
- `agent_id="agent"` appears on many legacy rows — it was the previous canonical constant. New writes should use the schema in the table above; memory reads still return the legacy rows.
|
|
107
|
+
- Memory Summary UI (`/datapacks/<name>/memory-summary`) shows every row for the user and renders the stored `agent_id` as a badge, consistent with cross-agent MCP memory reads.
|
|
99
108
|
- Subagents spawned via the `Agent` tool in Claude Code do not automatically inherit the parent's `agent_id`. The parent must inject it into the spawn prompt. See the SKILL.md "When spawning subagents" section in the coding-agent skill.
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# Authoring `reasoning` and `plan` on `conversation_add_message`
|
|
2
|
+
|
|
3
|
+
`conversation_add_message` accepts two optional fields — `reasoning` and `plan` — that capture *why* the assistant replied the way it did and *what* concrete steps it took. They are stored side-by-side on the per-turn `Reasoning` observation in Langfuse, independently, so consumers can read or render either one on its own.
|
|
4
|
+
|
|
5
|
+
Provide them on the large majority of substantive turns. Skip both only for genuinely trivial acknowledgements (a one-word reply, a pure restatement). Do not fabricate deliberation — but in practice, almost every substantive reply has at least a one-line *why* and a one-step plan.
|
|
6
|
+
|
|
7
|
+
## `reasoning`
|
|
8
|
+
|
|
9
|
+
A short paragraph (1–3 sentences) of the **why**. Plain English. Explain which trade-off you weighed, which user fact tipped the decision, why this answer beat the alternatives. Inline markdown (`**bold**`, `*italics*`, `` `code` ``) is fine.
|
|
10
|
+
|
|
11
|
+
Do NOT include a `**Plan:**` heading inside `reasoning` — put steps in the `plan` field instead.
|
|
12
|
+
|
|
13
|
+
## `plan`
|
|
14
|
+
|
|
15
|
+
A list of 2 to 4 concrete actions taken for this turn. Each entry is a single imperative sentence, like a checklist item. Pass a list of strings.
|
|
16
|
+
|
|
17
|
+
Do NOT pre-number entries. Do NOT include a `**Plan:**` heading inside the strings — `plan` is stored as a structured array on the observation's `metadata.plan`, independent of `reasoning`.
|
|
18
|
+
|
|
19
|
+
## Two examples
|
|
20
|
+
|
|
21
|
+
### Example A — database recommendation
|
|
22
|
+
|
|
23
|
+
```
|
|
24
|
+
reasoning:
|
|
25
|
+
"The user cares about low latency and predictable cost.
|
|
26
|
+
Option A wins on latency but costs more per month; option
|
|
27
|
+
B is cheaper but adds 30 ms p99. Latency was their top
|
|
28
|
+
priority, so I picked Option A."
|
|
29
|
+
|
|
30
|
+
plan: [
|
|
31
|
+
"Recommend Option A and call out the latency advantage.",
|
|
32
|
+
"Show the monthly cost delta in clear numbers.",
|
|
33
|
+
"Flag the cost difference so the user can decide if it fits."
|
|
34
|
+
]
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
### Example B — book pick for a long flight
|
|
38
|
+
|
|
39
|
+
```
|
|
40
|
+
reasoning:
|
|
41
|
+
"The user wants a non-fiction book for a six-hour flight
|
|
42
|
+
and does not enjoy business memoirs. *Sapiens* fits the
|
|
43
|
+
time slot, is non-fiction, and is not a memoir."
|
|
44
|
+
|
|
45
|
+
plan: [
|
|
46
|
+
"Recommend *Sapiens* as the main pick.",
|
|
47
|
+
"Offer *Bad Blood* as a non-memoir backup.",
|
|
48
|
+
"Skip founder memoirs per the user's stated dislike."
|
|
49
|
+
]
|
|
50
|
+
```
|