harmony-mcp 1.9.6 → 1.9.7

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.
Files changed (6) hide show
  1. package/README.md +112 -24
  2. package/dist/cli.js +1496 -1138
  3. package/dist/http.js +1957 -0
  4. package/dist/index.js +1494 -1136
  5. package/dist/remote.js +34534 -0
  6. package/package.json +3 -2
package/README.md CHANGED
@@ -5,14 +5,18 @@ Enables AI coding agents (Claude Code, OpenAI Codex, Cursor, Windsurf) to intera
5
5
 
6
6
  ## Features
7
7
 
8
- - **29 MCP Tools** for full board control (cards, columns, labels, subtasks, links)
8
+ - **43+ MCP Tools** for full board control, knowledge graph, and workflow plans
9
+ - **Knowledge Graph Memory** - persistent memory with entity types, tiers, scopes, and typed relations
10
+ - **Active Learning** - auto-extracts lessons, solutions, and error patterns from completed work sessions
11
+ - **Context Assembly** - token-budget-aware memory injection into AI prompts
12
+ - **GSD Workflow Plans** - plan/execute/verify/done lifecycle with auto card creation
9
13
  - **Card Linking** - create relationships between cards (blocks, relates_to, duplicates, is_part_of)
10
14
  - **Prompt Builder** - generate AI-ready prompts from cards with context
11
15
  - **Agent Session Tracking** - track work progress with timer badges
12
16
  - **Auto-Assignment** - automatically assign cards to you when starting agent sessions
17
+ - **Memory Sync** - bidirectional sync between local markdown files and remote database
13
18
  - **Multi-Agent Support** - works with Claude Code, Codex, Cursor, Windsurf
14
19
  - **Smart Setup** - one command configures everything
15
- - **Natural Language Processing** via voice-nlu edge function
16
20
  - **API Key Authentication** - no database credentials required
17
21
 
18
22
  ## Quick Start
@@ -39,6 +43,31 @@ The smart setup wizard will:
39
43
 
40
44
  That's it! You're ready to use Harmony with your AI agent.
41
45
 
46
+ ## Remote MCP (Hosted)
47
+
48
+ If your AI tool supports remote MCP servers natively (e.g., Claude.ai), you can connect directly to Harmony's hosted endpoint — no local server required.
49
+
50
+ **Endpoint:** `https://mcp.gethmy.com/mcp`
51
+
52
+ **Transport:** Streamable HTTP (MCP SDK standard)
53
+
54
+ **Authentication:** Bearer token using your `hmy_` API key
55
+
56
+ ```
57
+ Authorization: Bearer hmy_your_key_here
58
+ ```
59
+
60
+ **How to connect from Claude.ai:**
61
+
62
+ 1. Get an API key from [Harmony](https://gethmy.com/user/keys)
63
+ 2. In Claude.ai, add a remote MCP server with URL `https://mcp.gethmy.com/mcp`
64
+ 3. Set the Authorization header to `Bearer hmy_your_key_here`
65
+ 4. All 43+ Harmony tools become available in your conversation
66
+
67
+ **Session management** is automatic — sessions have a 1-hour TTL and are created/renewed transparently.
68
+
69
+ > **When to use remote vs local:** Use the remote endpoint when your client supports it natively (like Claude.ai) and you don't need local file access. Use the local server (`npx harmony-mcp setup`) when your agent needs stdio transport or you want skills and local project context.
70
+
42
71
  ### Adding to a New Project
43
72
 
44
73
  Just run setup again in the new project directory:
@@ -83,12 +112,13 @@ npx harmony-mcp serve # Start MCP server
83
112
 
84
113
  ## Supported AI Agents
85
114
 
86
- | Agent | Workflow Command | Config Location |
87
- | ---------------- | ------------------------ | ------------------------------------- |
88
- | **Claude Code** | `/hmy #42` | `~/.claude/settings.json` |
89
- | **OpenAI Codex** | `/prompts:hmy #42` | `~/.codex/config.toml` |
90
- | **Cursor** | MCP tools auto-available | `.cursor/mcp.json` |
91
- | **Windsurf** | MCP tools auto-available | `~/.codeium/windsurf/mcp_config.json` |
115
+ | Agent | Workflow Command | Config Location | Transport |
116
+ | ---------------- | ------------------------ | ------------------------------------- | ---------------- |
117
+ | **Claude Code** | `/hmy #42` | `~/.claude/settings.json` | Local (stdio) |
118
+ | **OpenAI Codex** | `/prompts:hmy #42` | `~/.codex/config.toml` | Local (stdio) |
119
+ | **Cursor** | MCP tools auto-available | `.cursor/mcp.json` | Local (stdio) |
120
+ | **Windsurf** | MCP tools auto-available | `~/.codeium/windsurf/mcp_config.json` | Local (stdio) |
121
+ | **Claude.ai** | MCP tools auto-available | Remote MCP settings in Claude.ai | Remote (HTTP) |
92
122
 
93
123
  ## Card Workflow
94
124
 
@@ -108,7 +138,7 @@ When you start working on a card (e.g., `/hmy #42`):
108
138
 
109
139
  - `harmony_create_card` - Create a new card
110
140
  - `harmony_update_card` - Update card properties
111
- - `harmony_move_card` - Move card to different column
141
+ - `harmony_move_card` - Move card to different column (auto-ends agent session on move to done/review)
112
142
  - `harmony_delete_card` - Delete a card
113
143
  - `harmony_assign_card` - Assign to team member
114
144
  - `harmony_search_cards` - Search by title/description
@@ -151,7 +181,7 @@ When you start working on a card (e.g., `/hmy #42`):
151
181
 
152
182
  - `harmony_list_workspaces` - List workspaces
153
183
  - `harmony_list_projects` - List projects
154
- - `harmony_get_board` - Get full board state
184
+ - `harmony_get_board` - Get board state (supports pagination via `limit`/`offset`, `summary` mode, `columnId` filter)
155
185
  - `harmony_get_workspace_members` - Get team members
156
186
  - `harmony_set_workspace_context` - Set active workspace
157
187
  - `harmony_set_project_context` - Set active project
@@ -163,14 +193,14 @@ When you start working on a card (e.g., `/hmy #42`):
163
193
 
164
194
  ### Agent Session Tracking
165
195
 
166
- - `harmony_start_agent_session` - Start tracking work on a card
196
+ - `harmony_start_agent_session` - Start tracking work on a card (with `moveToColumn` and `addLabels` side effects)
167
197
  - `harmony_update_agent_progress` - Update progress, status, blockers
168
- - `harmony_end_agent_session` - End session (completed/paused)
198
+ - `harmony_end_agent_session` - End session (completed/paused); triggers active learning extraction
169
199
  - `harmony_get_agent_session` - Get current session state
170
200
 
171
201
  ### Prompt Generation
172
202
 
173
- - `harmony_generate_prompt` - Generate an AI-ready prompt from a card
203
+ - `harmony_generate_prompt` - Generate an AI-ready prompt from a card with assembled memory context
174
204
 
175
205
  **Parameters:**
176
206
  | Parameter | Description |
@@ -183,13 +213,64 @@ When you start working on a card (e.g., `/hmy #42`):
183
213
  | `includeLinks` | Include linked cards in prompt (default: true) |
184
214
  | `customConstraints` | Additional instructions to append |
185
215
 
186
- **Variants:**
216
+ The prompt builder automatically infers the agent role based on card labels (bug, feature, design, etc.) and injects relevant memory context using the context assembly engine.
217
+
218
+ ### Memory / Knowledge Graph
219
+
220
+ Store and retrieve persistent knowledge across sessions. Memories have types, tiers, scopes, confidence scores, and can be linked via typed relations.
221
+
222
+ **CRUD:**
223
+
224
+ - `harmony_remember` - Store a memory entity (markdown with YAML frontmatter)
225
+ - `harmony_recall` - Retrieve memories by type, tags, scope, or text query
226
+ - `harmony_update_memory` - Update an existing memory entity
227
+ - `harmony_forget` - Archive or delete a memory entity
228
+ - `harmony_memory_search` - Full-text search across the knowledge base
229
+ - `harmony_relate` - Create a typed relationship between two memory entities
230
+
231
+ **Entity Types:** `agent`, `task`, `decision`, `context`, `pattern`, `error`, `solution`, `preference`, `relationship`, `commitment`, `lesson`, `project`, `handoff`
232
+
233
+ **Memory Tiers:** `draft` (working notes) → `episode` (session summaries) → `reference` (durable knowledge)
234
+
235
+ **Scopes:** `private`, `project`, `workspace`, `global`
236
+
237
+ **Relation Types:** `learned_from`, `resolved_by`, `contradicts`, `supports`, `depends_on`, `part_of`, `caused_by`, `relates_to`
238
+
239
+ ### Memory Vault & Sync
187
240
 
188
- - `analysis` - Understand the problem and create a plan
189
- - `draft` - Design a solution approach
190
- - `execute` - Full implementation (default)
241
+ - `harmony_vault_index` - Compact index of all memory entities (markdown table)
242
+ - `harmony_resolve_links` - Batch-scan for `[[wiki-links]]` and auto-create relations
243
+ - `harmony_sync` - Bidirectional sync between local markdown files (`~/.harmony/memory/`) and remote database (directions: `pull`, `push`, `full`)
191
244
 
192
- The prompt builder automatically infers the agent role based on card labels (bug, feature, design, etc.) and includes relevant context from linked cards.
245
+ ### Memory Lifecycle
246
+
247
+ - `harmony_promote_memory` - Promote entity tier: `draft` → `episode` or `episode` → `reference`
248
+ - `harmony_prune_draft` - Remove stale draft memories (dry-run mode by default)
249
+
250
+ ### Active Learning & Review
251
+
252
+ When an agent session ends, the system auto-extracts learnings: blockers produce `error` entities, completed sessions produce `lesson` entities, and bug fixes produce `solution` entities. Lower-confidence entries go into a review queue.
253
+
254
+ - `harmony_review_learnings` - List pending auto-extracted memories awaiting review
255
+ - `harmony_approve_learning` - Approve or reject a pending learning
256
+
257
+ ### Context Debugging
258
+
259
+ - `harmony_get_context_manifest` - Debug what memories were loaded/excluded in a prompt assembly
260
+ - `harmony_debug_context` - Explain why a specific memory was or wasn't included (relevance score breakdown)
261
+ - `harmony_export_memory_graph` - Export knowledge graph as DOT format for Graphviz visualization
262
+
263
+ ### GSD Workflow Plans
264
+
265
+ Create and manage project plans with a phased workflow: **plan** → **execute** → **verify** → **done**.
266
+
267
+ - `harmony_create_plan` - Create a new plan with embedded tasks
268
+ - `harmony_get_plan` - Get plan by ID or card ID
269
+ - `harmony_update_plan` - Update plan title, content, status, or phase
270
+ - `harmony_advance_plan` - Advance to next phase with side effects:
271
+ - **plan → execute:** auto-creates Kanban cards from plan tasks, sets plan active
272
+ - **execute → verify:** checks card completion status
273
+ - **verify → done:** archives plan, creates memory entities
193
274
 
194
275
  ## Direct API Access
195
276
 
@@ -213,20 +294,20 @@ curl -X GET "https://gethmy.com/api/v1/workspaces" \
213
294
  | `/v1/cards/:id` | PATCH | Update card |
214
295
  | `/v1/cards/:id` | DELETE | Delete card |
215
296
  | `/v1/cards/:id/move` | POST | Move card |
297
+ | `/v1/cards/:id/prompt` | GET | Generate prompt from card |
298
+ | `/v1/cards/:id/links` | GET | Get card links |
299
+ | `/v1/cards/:id/links` | POST | Create card link |
300
+ | `/v1/cards/:id/labels` | POST | Add label to card |
301
+ | `/v1/cards/:id/labels/:labelId` | DELETE | Remove label |
216
302
  | `/v1/search?q=query` | GET | Search cards |
217
303
  | `/v1/columns` | POST | Create column |
218
304
  | `/v1/columns/:id` | PATCH | Update column |
219
305
  | `/v1/columns/:id` | DELETE | Delete column |
220
306
  | `/v1/labels` | POST | Create label |
221
- | `/v1/cards/:id/labels` | POST | Add label to card |
222
- | `/v1/cards/:id/labels/:labelId` | DELETE | Remove label |
223
307
  | `/v1/subtasks` | POST | Create subtask |
224
308
  | `/v1/subtasks/:id/toggle` | POST | Toggle subtask |
225
309
  | `/v1/subtasks/:id` | DELETE | Delete subtask |
226
- | `/v1/cards/:id/links` | GET | Get card links |
227
- | `/v1/cards/:id/links` | POST | Create card link |
228
310
  | `/v1/links/:id` | DELETE | Delete card link |
229
- | `/v1/cards/:id/prompt` | GET | Generate prompt from card |
230
311
  | `/v1/nlu` | POST | Process natural language |
231
312
 
232
313
  ## Configuration
@@ -318,11 +399,18 @@ Add this to prevent accidentally committing local config:
318
399
  ```
319
400
  ┌─────────────────┐ MCP Protocol ┌──────────────────┐
320
401
  │ Claude Code │ ───────────────────────▶│ harmony-mcp │
321
- │ Cursor │ │ (local server) │
402
+ │ Cursor │ (local stdio) │ (local server) │
322
403
  │ Windsurf │ └────────┬─────────┘
323
404
  │ Codex │ │
324
405
  └─────────────────┘ │ API Key Auth
325
406
 
407
+ ┌─────────────────┐ Streamable HTTP ┌──────────────────┐
408
+ │ Claude.ai │ ───────────────────────▶│ Remote MCP │
409
+ │ Any MCP client │ (Bearer: hmy_xxx) │ mcp.gethmy.com │──┐
410
+ └─────────────────┘ └──────────────────┘ │
411
+
412
+ ┌─────────────┘
413
+
326
414
  ┌──────────────────┐
327
415
  │ Harmony API │
328
416
  │ (Edge Function) │