@gethmy/mcp 1.0.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 +343 -0
- package/dist/cli.js +32583 -0
- package/dist/index.js +28566 -0
- package/package.json +61 -0
package/README.md
ADDED
|
@@ -0,0 +1,343 @@
|
|
|
1
|
+
# harmony-mcp
|
|
2
|
+
|
|
3
|
+
MCP (Model Context Protocol) server for [Harmony](https://gethmy.com).
|
|
4
|
+
Enables AI coding agents (Claude Code, OpenAI Codex, Cursor, Windsurf) to interact with your Harmony boards.
|
|
5
|
+
|
|
6
|
+
## Features
|
|
7
|
+
|
|
8
|
+
- **29 MCP Tools** for full board control (cards, columns, labels, subtasks, links)
|
|
9
|
+
- **Card Linking** - create relationships between cards (blocks, relates_to, duplicates, is_part_of)
|
|
10
|
+
- **Prompt Builder** - generate AI-ready prompts from cards with context
|
|
11
|
+
- **Agent Session Tracking** - track work progress with timer badges
|
|
12
|
+
- **Auto-Assignment** - automatically assign cards to you when starting agent sessions
|
|
13
|
+
- **Multi-Agent Support** - works with Claude Code, Codex, Cursor, Windsurf
|
|
14
|
+
- **Smart Setup** - one command configures everything
|
|
15
|
+
- **Natural Language Processing** via voice-nlu edge function
|
|
16
|
+
- **API Key Authentication** - no database credentials required
|
|
17
|
+
|
|
18
|
+
## Quick Start
|
|
19
|
+
|
|
20
|
+
### 1. Get an API Key
|
|
21
|
+
|
|
22
|
+
1. Log into [Harmony](https://gethmy.com)
|
|
23
|
+
2. Go to **[API Keys](https://gethmy.com/user/keys)**
|
|
24
|
+
3. Click **"Generate New Key"**
|
|
25
|
+
4. Copy the key (starts with `hmy_`)
|
|
26
|
+
|
|
27
|
+
### 2. Run Setup
|
|
28
|
+
|
|
29
|
+
```bash
|
|
30
|
+
npx harmony-mcp setup
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
The smart setup wizard will:
|
|
34
|
+
|
|
35
|
+
- Validate your API key
|
|
36
|
+
- Detect installed AI agents (Claude Code, Cursor, Windsurf, Codex)
|
|
37
|
+
- Install skills globally (recommended) or locally
|
|
38
|
+
- Let you select your workspace and project
|
|
39
|
+
|
|
40
|
+
That's it! You're ready to use Harmony with your AI agent.
|
|
41
|
+
|
|
42
|
+
### Adding to a New Project
|
|
43
|
+
|
|
44
|
+
Just run setup again in the new project directory:
|
|
45
|
+
|
|
46
|
+
```bash
|
|
47
|
+
cd my-new-project
|
|
48
|
+
npx harmony-mcp setup
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
It detects your existing configuration and only asks for the project context.
|
|
52
|
+
|
|
53
|
+
## CLI Commands
|
|
54
|
+
|
|
55
|
+
```bash
|
|
56
|
+
# Setup (recommended)
|
|
57
|
+
npx harmony-mcp setup # Smart setup wizard
|
|
58
|
+
|
|
59
|
+
# Setup with flags (non-interactive)
|
|
60
|
+
npx harmony-mcp setup --api-key KEY --global --workspace ID --project ID
|
|
61
|
+
|
|
62
|
+
# Status and management
|
|
63
|
+
npx harmony-mcp status # Show current configuration
|
|
64
|
+
npx harmony-mcp reset # Clear all configuration
|
|
65
|
+
|
|
66
|
+
# Server (called by agents automatically)
|
|
67
|
+
npx harmony-mcp serve # Start MCP server
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
### Setup Options
|
|
71
|
+
|
|
72
|
+
| Flag | Description |
|
|
73
|
+
| -------------------------- | ---------------------------------------------------- |
|
|
74
|
+
| `-k, --api-key <key>` | API key (skips prompt) |
|
|
75
|
+
| `-e, --email <email>` | Your email for auto-assignment |
|
|
76
|
+
| `-a, --agents <agents...>` | Agents to configure: claude, codex, cursor, windsurf |
|
|
77
|
+
| `-g, --global` | Install skills globally (recommended) |
|
|
78
|
+
| `-l, --local` | Install skills locally in project directory |
|
|
79
|
+
| `-w, --workspace <id>` | Set workspace context |
|
|
80
|
+
| `-p, --project <id>` | Set project context |
|
|
81
|
+
| `--skip-context` | Skip workspace/project selection |
|
|
82
|
+
| `-f, --force` | Overwrite existing configuration |
|
|
83
|
+
|
|
84
|
+
## Supported AI Agents
|
|
85
|
+
|
|
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` |
|
|
92
|
+
|
|
93
|
+
## Card Workflow
|
|
94
|
+
|
|
95
|
+
When you start working on a card (e.g., `/hmy #42`):
|
|
96
|
+
|
|
97
|
+
1. **Find** - Locates the card by short ID, UUID, or name
|
|
98
|
+
2. **Move** - Moves the card to "In Progress" column
|
|
99
|
+
3. **Label** - Adds the "agent" label to indicate AI is working
|
|
100
|
+
4. **Assign** - Auto-assigns the card to you (if email is configured)
|
|
101
|
+
5. **Track** - Starts a session timer visible in the UI
|
|
102
|
+
6. **Implement** - Work on the task with progress updates
|
|
103
|
+
7. **Complete** - Move to "Review" when done
|
|
104
|
+
|
|
105
|
+
## Available Tools
|
|
106
|
+
|
|
107
|
+
### Card Operations
|
|
108
|
+
|
|
109
|
+
- `harmony_create_card` - Create a new card
|
|
110
|
+
- `harmony_update_card` - Update card properties
|
|
111
|
+
- `harmony_move_card` - Move card to different column
|
|
112
|
+
- `harmony_delete_card` - Delete a card
|
|
113
|
+
- `harmony_assign_card` - Assign to team member
|
|
114
|
+
- `harmony_search_cards` - Search by title/description
|
|
115
|
+
- `harmony_get_card` - Get card details by UUID
|
|
116
|
+
- `harmony_get_card_by_short_id` - Get card by short ID (e.g., #42)
|
|
117
|
+
|
|
118
|
+
### Card Link Operations
|
|
119
|
+
|
|
120
|
+
- `harmony_add_link_to_card` - Create a link between two cards
|
|
121
|
+
- `harmony_remove_link_from_card` - Remove a link between cards
|
|
122
|
+
- `harmony_get_card_links` - Get all links for a card
|
|
123
|
+
|
|
124
|
+
**Link Types:**
|
|
125
|
+
| Type | Description |
|
|
126
|
+
|------|-------------|
|
|
127
|
+
| `relates_to` | Generic relationship between cards |
|
|
128
|
+
| `blocks` | Source card blocks target card |
|
|
129
|
+
| `duplicates` | Source card duplicates target card |
|
|
130
|
+
| `is_part_of` | Source card is part of target card |
|
|
131
|
+
|
|
132
|
+
### Column Operations
|
|
133
|
+
|
|
134
|
+
- `harmony_create_column` - Create new column
|
|
135
|
+
- `harmony_update_column` - Update column properties
|
|
136
|
+
- `harmony_delete_column` - Delete column
|
|
137
|
+
|
|
138
|
+
### Label Operations
|
|
139
|
+
|
|
140
|
+
- `harmony_create_label` - Create new label
|
|
141
|
+
- `harmony_add_label_to_card` - Add label to card
|
|
142
|
+
- `harmony_remove_label_from_card` - Remove label
|
|
143
|
+
|
|
144
|
+
### Subtask Operations
|
|
145
|
+
|
|
146
|
+
- `harmony_create_subtask` - Create subtask
|
|
147
|
+
- `harmony_toggle_subtask` - Toggle completion
|
|
148
|
+
- `harmony_delete_subtask` - Delete subtask
|
|
149
|
+
|
|
150
|
+
### Context Operations
|
|
151
|
+
|
|
152
|
+
- `harmony_list_workspaces` - List workspaces
|
|
153
|
+
- `harmony_list_projects` - List projects
|
|
154
|
+
- `harmony_get_board` - Get full board state
|
|
155
|
+
- `harmony_get_workspace_members` - Get team members
|
|
156
|
+
- `harmony_set_workspace_context` - Set active workspace
|
|
157
|
+
- `harmony_set_project_context` - Set active project
|
|
158
|
+
- `harmony_get_context` - Get current context
|
|
159
|
+
|
|
160
|
+
### Natural Language
|
|
161
|
+
|
|
162
|
+
- `harmony_process_command` - Process natural language commands
|
|
163
|
+
|
|
164
|
+
### Agent Session Tracking
|
|
165
|
+
|
|
166
|
+
- `harmony_start_agent_session` - Start tracking work on a card
|
|
167
|
+
- `harmony_update_agent_progress` - Update progress, status, blockers
|
|
168
|
+
- `harmony_end_agent_session` - End session (completed/paused)
|
|
169
|
+
- `harmony_get_agent_session` - Get current session state
|
|
170
|
+
|
|
171
|
+
### Prompt Generation
|
|
172
|
+
|
|
173
|
+
- `harmony_generate_prompt` - Generate an AI-ready prompt from a card
|
|
174
|
+
|
|
175
|
+
**Parameters:**
|
|
176
|
+
| Parameter | Description |
|
|
177
|
+
|-----------|-------------|
|
|
178
|
+
| `cardId` | Card UUID to generate prompt from |
|
|
179
|
+
| `shortId` | Alternative: Card short ID (e.g., 42 for #42) |
|
|
180
|
+
| `variant` | `analysis` (understand/plan), `draft` (design solution), `execute` (implement fully) |
|
|
181
|
+
| `includeDescription` | Include card description (default: true) |
|
|
182
|
+
| `includeSubtasks` | Include subtasks in prompt (default: true) |
|
|
183
|
+
| `includeLinks` | Include linked cards in prompt (default: true) |
|
|
184
|
+
| `customConstraints` | Additional instructions to append |
|
|
185
|
+
|
|
186
|
+
**Variants:**
|
|
187
|
+
|
|
188
|
+
- `analysis` - Understand the problem and create a plan
|
|
189
|
+
- `draft` - Design a solution approach
|
|
190
|
+
- `execute` - Full implementation (default)
|
|
191
|
+
|
|
192
|
+
The prompt builder automatically infers the agent role based on card labels (bug, feature, design, etc.) and includes relevant context from linked cards.
|
|
193
|
+
|
|
194
|
+
## Direct API Access
|
|
195
|
+
|
|
196
|
+
You can also call the Harmony API directly from any HTTP client:
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
curl -X GET "https://gethmy.com/api/v1/workspaces" \
|
|
200
|
+
-H "X-API-Key: hmy_your_key_here"
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
### API Endpoints
|
|
204
|
+
|
|
205
|
+
| Endpoint | Method | Description |
|
|
206
|
+
| ------------------------------- | ------ | -------------------------- |
|
|
207
|
+
| `/v1/workspaces` | GET | List workspaces |
|
|
208
|
+
| `/v1/workspaces/:id/projects` | GET | List projects in workspace |
|
|
209
|
+
| `/v1/workspaces/:id/members` | GET | Get workspace members |
|
|
210
|
+
| `/v1/board/:projectId` | GET | Get full board state |
|
|
211
|
+
| `/v1/cards` | POST | Create card |
|
|
212
|
+
| `/v1/cards/:id` | GET | Get card |
|
|
213
|
+
| `/v1/cards/:id` | PATCH | Update card |
|
|
214
|
+
| `/v1/cards/:id` | DELETE | Delete card |
|
|
215
|
+
| `/v1/cards/:id/move` | POST | Move card |
|
|
216
|
+
| `/v1/search?q=query` | GET | Search cards |
|
|
217
|
+
| `/v1/columns` | POST | Create column |
|
|
218
|
+
| `/v1/columns/:id` | PATCH | Update column |
|
|
219
|
+
| `/v1/columns/:id` | DELETE | Delete column |
|
|
220
|
+
| `/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
|
+
| `/v1/subtasks` | POST | Create subtask |
|
|
224
|
+
| `/v1/subtasks/:id/toggle` | POST | Toggle subtask |
|
|
225
|
+
| `/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
|
+
| `/v1/links/:id` | DELETE | Delete card link |
|
|
229
|
+
| `/v1/cards/:id/prompt` | GET | Generate prompt from card |
|
|
230
|
+
| `/v1/nlu` | POST | Process natural language |
|
|
231
|
+
|
|
232
|
+
## Configuration
|
|
233
|
+
|
|
234
|
+
### Global Configuration
|
|
235
|
+
|
|
236
|
+
Stored in `~/.harmony-mcp/config.json`:
|
|
237
|
+
|
|
238
|
+
```json
|
|
239
|
+
{
|
|
240
|
+
"apiKey": "hmy_...",
|
|
241
|
+
"apiUrl": "https://gethmy.com/api",
|
|
242
|
+
"userEmail": "you@example.com",
|
|
243
|
+
"activeWorkspaceId": null,
|
|
244
|
+
"activeProjectId": null
|
|
245
|
+
}
|
|
246
|
+
```
|
|
247
|
+
|
|
248
|
+
### Local Project Configuration
|
|
249
|
+
|
|
250
|
+
Stored in `.harmony-mcp.json` in your project root:
|
|
251
|
+
|
|
252
|
+
```json
|
|
253
|
+
{
|
|
254
|
+
"workspaceId": "uuid-here",
|
|
255
|
+
"projectId": "uuid-here"
|
|
256
|
+
}
|
|
257
|
+
```
|
|
258
|
+
|
|
259
|
+
**Priority**: Local config overrides global config for workspace and project context.
|
|
260
|
+
|
|
261
|
+
**Security**: API key is never stored locally (only in global config) to prevent accidental commits.
|
|
262
|
+
|
|
263
|
+
### Auto-Assignment
|
|
264
|
+
|
|
265
|
+
When your email is configured during setup, cards are automatically assigned to you when you start an agent session (e.g., via `/hmy #42`). This helps track who is working on what.
|
|
266
|
+
|
|
267
|
+
To update your email:
|
|
268
|
+
|
|
269
|
+
```bash
|
|
270
|
+
npx harmony-mcp setup --email you@example.com
|
|
271
|
+
```
|
|
272
|
+
|
|
273
|
+
The email must match your Harmony account email to work correctly.
|
|
274
|
+
|
|
275
|
+
### Viewing Configuration
|
|
276
|
+
|
|
277
|
+
```bash
|
|
278
|
+
npx harmony-mcp status
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Example output:
|
|
282
|
+
|
|
283
|
+
```
|
|
284
|
+
Status: Configured
|
|
285
|
+
|
|
286
|
+
API:
|
|
287
|
+
Key: hmy_abc1...
|
|
288
|
+
URL: https://gethmy.com/api
|
|
289
|
+
Email: y***@example.com
|
|
290
|
+
|
|
291
|
+
Skills:
|
|
292
|
+
Installed: Yes (global)
|
|
293
|
+
~/.agents/skills/hmy/SKILL.md
|
|
294
|
+
|
|
295
|
+
Context:
|
|
296
|
+
Local config: .harmony-mcp.json
|
|
297
|
+
Workspace: my-team-id
|
|
298
|
+
Project: my-project-id
|
|
299
|
+
Global config: ~/.harmony-mcp/config.json
|
|
300
|
+
Workspace: (not set)
|
|
301
|
+
Project: (not set)
|
|
302
|
+
|
|
303
|
+
Active (effective):
|
|
304
|
+
Workspace: my-team-id ← local
|
|
305
|
+
Project: my-project-id ← local
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
### Recommended .gitignore
|
|
309
|
+
|
|
310
|
+
Add this to prevent accidentally committing local config:
|
|
311
|
+
|
|
312
|
+
```
|
|
313
|
+
.harmony-mcp.json
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
## Architecture
|
|
317
|
+
|
|
318
|
+
```
|
|
319
|
+
┌─────────────────┐ MCP Protocol ┌──────────────────┐
|
|
320
|
+
│ Claude Code │ ───────────────────────▶│ harmony-mcp │
|
|
321
|
+
│ Cursor │ │ (local server) │
|
|
322
|
+
│ Windsurf │ └────────┬─────────┘
|
|
323
|
+
│ Codex │ │
|
|
324
|
+
└─────────────────┘ │ API Key Auth
|
|
325
|
+
▼
|
|
326
|
+
┌──────────────────┐
|
|
327
|
+
│ Harmony API │
|
|
328
|
+
│ (Edge Function) │
|
|
329
|
+
└────────┬─────────┘
|
|
330
|
+
│
|
|
331
|
+
▼
|
|
332
|
+
┌──────────────────┐
|
|
333
|
+
│ Database │
|
|
334
|
+
│ (Supabase) │
|
|
335
|
+
└──────────────────┘
|
|
336
|
+
```
|
|
337
|
+
|
|
338
|
+
**Key Benefits:**
|
|
339
|
+
|
|
340
|
+
- No database credentials needed - just a Harmony API key
|
|
341
|
+
- Any Harmony user can use it
|
|
342
|
+
- Business logic stays in Harmony
|
|
343
|
+
- Centralized security and rate limiting
|