agent-planner-mcp 0.3.1 → 0.5.1
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/AGENT_GUIDE.md +257 -0
- package/LICENSE +21 -0
- package/README.md +128 -247
- package/SKILL.md +438 -0
- package/package.json +24 -7
- package/src/api-client.js +506 -115
- package/src/index.js +60 -27
- package/src/integrations/search-integration.js +3 -5
- package/src/server-http.js +569 -0
- package/src/session-manager.js +223 -0
- package/src/setup.js +1 -1
- package/src/tools/search-wrapper.js +12 -6
- package/src/tools.js +1983 -159
- package/claude-code/AUTONOMOUS_EXECUTION_GUIDE.md +0 -335
- package/claude-code/commands/README.md +0 -112
- package/claude-code/commands/create-plan.md +0 -174
- package/claude-code/commands/execute-plan.md +0 -202
- package/claude-code/commands/plan-status.md +0 -145
- package/claude-code/settings.template.json +0 -12
package/README.md
CHANGED
|
@@ -1,324 +1,205 @@
|
|
|
1
|
-
#
|
|
1
|
+
# AgentPlanner MCP Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
[](https://www.npmjs.com/package/agent-planner-mcp)
|
|
4
|
+
[](https://modelcontextprotocol.io)
|
|
5
|
+
[](LICENSE)
|
|
4
6
|
|
|
5
|
-
|
|
7
|
+
MCP server for [AgentPlanner](https://agentplanner.io) — AI agent orchestration with planning, dependencies, knowledge graphs, and human oversight. Works with Claude Desktop, Claude Code, ChatGPT, Cursor, Windsurf, Cline, and any MCP-compatible client.
|
|
6
8
|
|
|
7
|
-
|
|
9
|
+
## Prerequisites
|
|
8
10
|
|
|
9
|
-
|
|
11
|
+
- An AgentPlanner account at [agentplanner.io](https://agentplanner.io)
|
|
12
|
+
- An API token (Settings > API Tokens in the AgentPlanner UI)
|
|
10
13
|
|
|
11
|
-
|
|
12
|
-
- **Full CRUD Operations**: Create, read, update, and delete plans, nodes, and artifacts
|
|
13
|
-
- **Unified Search**: Single powerful search tool for all contexts (global, plans, nodes)
|
|
14
|
-
- **Batch Operations**: Update multiple nodes or retrieve multiple artifacts efficiently
|
|
15
|
-
- **Rich Context**: Get comprehensive node context including ancestry, children, logs, and artifacts
|
|
16
|
-
- **Structured Responses**: Clean JSON data for easy agent processing
|
|
14
|
+
## Setup
|
|
17
15
|
|
|
18
|
-
###
|
|
16
|
+
### Claude Desktop
|
|
19
17
|
|
|
20
|
-
|
|
21
|
-
- `search` - Universal search across all scopes with filters
|
|
22
|
-
- `create_plan` - Create new plans
|
|
23
|
-
- `update_plan` - Update plan properties
|
|
24
|
-
- `delete_plan` - Delete entire plans
|
|
25
|
-
- `get_plan_structure` - Get hierarchical plan structure
|
|
26
|
-
- `get_plan_summary` - Get comprehensive statistics and summary
|
|
27
|
-
|
|
28
|
-
#### Node Management
|
|
29
|
-
- `create_node` - Create phases, tasks, or milestones
|
|
30
|
-
- `update_node` - Update any node properties
|
|
31
|
-
- `delete_node` - Delete nodes and their children
|
|
32
|
-
- `move_node` - Reorder or reparent nodes
|
|
33
|
-
- `get_node_context` - Get rich contextual information
|
|
34
|
-
- `get_node_ancestry` - Get path from root to node
|
|
35
|
-
- `batch_update_nodes` - Update multiple nodes at once
|
|
36
|
-
|
|
37
|
-
#### Collaboration & Tracking
|
|
38
|
-
- `add_log` - Add log entries (including comments, progress, reasoning, etc.)
|
|
39
|
-
- `get_logs` - Retrieve filtered log entries
|
|
40
|
-
- `manage_artifact` - Add, get, search, or list artifacts
|
|
41
|
-
- `batch_get_artifacts` - Retrieve multiple artifacts efficiently
|
|
42
|
-
|
|
43
|
-
## Getting Started
|
|
44
|
-
|
|
45
|
-
### Prerequisites
|
|
46
|
-
|
|
47
|
-
- Node.js 16+
|
|
48
|
-
- npm or yarn
|
|
49
|
-
- Access to a running Planning System API
|
|
50
|
-
- API token for authentication
|
|
51
|
-
|
|
52
|
-
### Quick Setup (Recommended)
|
|
53
|
-
|
|
54
|
-
1. Install dependencies
|
|
55
|
-
```bash
|
|
56
|
-
npm install
|
|
57
|
-
```
|
|
18
|
+
Add to your `claude_desktop_config.json`:
|
|
58
19
|
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
20
|
+
```json
|
|
21
|
+
{
|
|
22
|
+
"mcpServers": {
|
|
23
|
+
"agent-planner": {
|
|
24
|
+
"command": "npx",
|
|
25
|
+
"args": ["-y", "agent-planner-mcp"],
|
|
26
|
+
"env": {
|
|
27
|
+
"USER_API_TOKEN": "your-token",
|
|
28
|
+
"API_URL": "https://agentplanner.io/api"
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
62
33
|
```
|
|
63
34
|
|
|
64
|
-
|
|
65
|
-
- Check API server connectivity
|
|
66
|
-
- Guide you through creating an API token in the UI
|
|
67
|
-
- Create your `.env` file
|
|
68
|
-
- Detect and update your Claude Desktop config
|
|
69
|
-
- Test the connection
|
|
70
|
-
|
|
71
|
-
That's it! Restart Claude Desktop and you're ready to go.
|
|
35
|
+
Config location: `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) | `%APPDATA%\Claude\claude_desktop_config.json` (Windows)
|
|
72
36
|
|
|
73
|
-
###
|
|
37
|
+
### Claude Code
|
|
74
38
|
|
|
75
|
-
If you prefer manual setup or the wizard doesn't work for your setup:
|
|
76
|
-
|
|
77
|
-
1. Clone the repository
|
|
78
39
|
```bash
|
|
79
|
-
|
|
80
|
-
cd agent-planner-mcp
|
|
40
|
+
claude mcp add agent-planner -- npx -y agent-planner-mcp
|
|
81
41
|
```
|
|
82
42
|
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
npm install
|
|
86
|
-
```
|
|
43
|
+
Then set the env vars `USER_API_TOKEN` and `API_URL=https://agentplanner.io/api`.
|
|
87
44
|
|
|
88
|
-
|
|
89
|
-
- Open http://localhost:3001/app/settings in your browser
|
|
90
|
-
- Navigate to "API Tokens" section
|
|
91
|
-
- Click "Create MCP Token"
|
|
92
|
-
- Copy the generated token
|
|
45
|
+
### ChatGPT
|
|
93
46
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
```
|
|
47
|
+
1. Settings > Apps > Advanced > Developer mode
|
|
48
|
+
2. Add MCP Server > URL: `https://agentplanner.io/mcp`
|
|
49
|
+
3. Auth type: API Key > enter your token from agentplanner.io Settings
|
|
98
50
|
|
|
99
|
-
|
|
100
|
-
```
|
|
101
|
-
API_URL=http://localhost:3000
|
|
102
|
-
USER_API_TOKEN=your_api_token_here
|
|
103
|
-
MCP_SERVER_NAME=planning-system
|
|
104
|
-
MCP_SERVER_VERSION=0.2.0
|
|
105
|
-
NODE_ENV=production
|
|
106
|
-
```
|
|
107
|
-
|
|
108
|
-
5. Configure Claude Desktop manually (see "Using with Claude Desktop" section below)
|
|
109
|
-
|
|
110
|
-
6. Start the server
|
|
111
|
-
```bash
|
|
112
|
-
npm start
|
|
113
|
-
```
|
|
114
|
-
|
|
115
|
-
## Using with Claude Desktop
|
|
51
|
+
### Cursor
|
|
116
52
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
Add to your `claude_desktop_config.json`:
|
|
53
|
+
Add to `.cursor/mcp.json` in your project root:
|
|
120
54
|
|
|
121
55
|
```json
|
|
122
56
|
{
|
|
123
57
|
"mcpServers": {
|
|
124
|
-
"
|
|
58
|
+
"agent-planner": {
|
|
125
59
|
"command": "npx",
|
|
126
|
-
"args": [
|
|
127
|
-
"-y",
|
|
128
|
-
"agent-planner-mcp"
|
|
129
|
-
],
|
|
60
|
+
"args": ["-y", "agent-planner-mcp"],
|
|
130
61
|
"env": {
|
|
131
|
-
"
|
|
132
|
-
"
|
|
62
|
+
"USER_API_TOKEN": "your-token",
|
|
63
|
+
"API_URL": "https://agentplanner.io/api"
|
|
133
64
|
}
|
|
134
65
|
}
|
|
135
66
|
}
|
|
136
67
|
}
|
|
137
68
|
```
|
|
138
69
|
|
|
139
|
-
|
|
140
|
-
- No need to clone the repository
|
|
141
|
-
- Always uses the latest published version
|
|
142
|
-
- Simplest configuration
|
|
70
|
+
### Windsurf
|
|
143
71
|
|
|
144
|
-
|
|
145
|
-
```json
|
|
146
|
-
"API_URL": "http://localhost:3000"
|
|
147
|
-
```
|
|
148
|
-
|
|
149
|
-
### Option 2: Using Local Installation
|
|
150
|
-
|
|
151
|
-
If you prefer to run from a local clone:
|
|
72
|
+
Add to `~/.codeium/windsurf/mcp_config.json`:
|
|
152
73
|
|
|
153
74
|
```json
|
|
154
75
|
{
|
|
155
76
|
"mcpServers": {
|
|
156
|
-
"
|
|
157
|
-
"command": "
|
|
158
|
-
"args": [
|
|
159
|
-
"/path/to/agent-planner-mcp/src/index.js"
|
|
160
|
-
],
|
|
77
|
+
"agent-planner": {
|
|
78
|
+
"command": "npx",
|
|
79
|
+
"args": ["-y", "agent-planner-mcp"],
|
|
161
80
|
"env": {
|
|
162
|
-
"
|
|
163
|
-
"
|
|
81
|
+
"USER_API_TOKEN": "your-token",
|
|
82
|
+
"API_URL": "https://agentplanner.io/api"
|
|
164
83
|
}
|
|
165
84
|
}
|
|
166
85
|
}
|
|
167
86
|
}
|
|
168
87
|
```
|
|
169
88
|
|
|
170
|
-
|
|
89
|
+
### Cline (VS Code)
|
|
171
90
|
|
|
172
|
-
|
|
91
|
+
Add the same JSON config to your Cline MCP settings in VS Code.
|
|
173
92
|
|
|
174
|
-
###
|
|
93
|
+
### Any HTTP MCP Client
|
|
175
94
|
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
query: "API integration",
|
|
181
|
-
filters: { type: "task", status: "in_progress" }
|
|
182
|
-
})
|
|
95
|
+
- Endpoint: `https://agentplanner.io/mcp`
|
|
96
|
+
- Discovery: `https://agentplanner.io/.well-known/mcp.json`
|
|
97
|
+
- Auth header: `Authorization: ApiKey <your-token>`
|
|
98
|
+
- Transport: Streamable HTTP (MCP 2025-03-26)
|
|
183
99
|
|
|
184
|
-
|
|
185
|
-
search({
|
|
186
|
-
scope: "plan",
|
|
187
|
-
scope_id: "plan-123",
|
|
188
|
-
query: "testing"
|
|
189
|
-
})
|
|
190
|
-
```
|
|
100
|
+
## Key Features
|
|
191
101
|
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
})
|
|
201
|
-
|
|
202
|
-
// Add nodes to the plan
|
|
203
|
-
create_node({
|
|
204
|
-
plan_id: "plan-123",
|
|
205
|
-
node_type: "phase",
|
|
206
|
-
title: "Market Research",
|
|
207
|
-
description: "Initial market analysis and competitor research"
|
|
208
|
-
})
|
|
209
|
-
```
|
|
102
|
+
- **60+ tools** for planning, task management, dependencies, and knowledge
|
|
103
|
+
- **Dependency graph** with cycle detection, impact analysis, and critical path
|
|
104
|
+
- **Progressive context** — 4-layer context assembly with token budgeting
|
|
105
|
+
- **Knowledge graph** — temporal knowledge via Graphiti (entities, facts, contradictions)
|
|
106
|
+
- **RPI chains** — Research > Plan > Implement task decomposition
|
|
107
|
+
- **Goal tracking** — health dashboard, briefings, bottleneck detection
|
|
108
|
+
- **Task claims** — TTL-based locking for multi-agent coordination
|
|
109
|
+
- **Organizations** — multi-tenant isolation
|
|
210
110
|
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
```javascript
|
|
214
|
-
// Update multiple nodes efficiently
|
|
215
|
-
batch_update_nodes({
|
|
216
|
-
plan_id: "plan-123",
|
|
217
|
-
updates: [
|
|
218
|
-
{ node_id: "node-1", status: "completed" },
|
|
219
|
-
{ node_id: "node-2", status: "in_progress" },
|
|
220
|
-
{ node_id: "node-3", description: "Updated requirements" }
|
|
221
|
-
]
|
|
222
|
-
})
|
|
223
|
-
|
|
224
|
-
// Get multiple artifacts at once
|
|
225
|
-
batch_get_artifacts({
|
|
226
|
-
plan_id: "plan-123",
|
|
227
|
-
artifact_requests: [
|
|
228
|
-
{ node_id: "node-1", artifact_id: "art-1" },
|
|
229
|
-
{ node_id: "node-2", artifact_id: "art-2" }
|
|
230
|
-
]
|
|
231
|
-
})
|
|
232
|
-
```
|
|
111
|
+
## Available Tools
|
|
233
112
|
|
|
234
|
-
###
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
plan_id: "plan-123",
|
|
240
|
-
node_id: "node-456"
|
|
241
|
-
})
|
|
242
|
-
// Returns: node details, children, logs, artifacts, plan info
|
|
243
|
-
|
|
244
|
-
// Track node ancestry
|
|
245
|
-
get_node_ancestry({
|
|
246
|
-
plan_id: "plan-123",
|
|
247
|
-
node_id: "node-456"
|
|
248
|
-
})
|
|
249
|
-
// Returns: path from root to node
|
|
250
|
-
```
|
|
113
|
+
### Planning & Search
|
|
114
|
+
- `search` - Universal search across all scopes with filters
|
|
115
|
+
- `create_plan` / `update_plan` / `delete_plan` - Plan CRUD
|
|
116
|
+
- `get_plan_structure` - Hierarchical plan tree
|
|
117
|
+
- `get_plan_summary` - Statistics and summary
|
|
251
118
|
|
|
252
|
-
|
|
119
|
+
### Node Management
|
|
120
|
+
- `create_node` / `update_node` / `delete_node` - Node CRUD
|
|
121
|
+
- `move_node` - Reorder or reparent nodes
|
|
122
|
+
- `batch_update_nodes` - Update multiple nodes at once
|
|
123
|
+
- `get_node_context` / `get_node_ancestry` - Rich context
|
|
253
124
|
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
└── search-wrapper.js # Search functionality wrapper
|
|
261
|
-
```
|
|
125
|
+
### Dependencies & Analysis
|
|
126
|
+
- `create_dependency` / `delete_dependency` - Manage edges
|
|
127
|
+
- `list_dependencies` / `get_node_dependencies` - Query graph
|
|
128
|
+
- `analyze_impact` - Delay/block/remove scenario analysis
|
|
129
|
+
- `get_critical_path` - Longest blocking chain
|
|
130
|
+
- `create_rpi_chain` - Research > Plan > Implement chain
|
|
262
131
|
|
|
263
|
-
|
|
132
|
+
### Progressive Context
|
|
133
|
+
- `get_task_context` - Primary context tool (depth 1-4, token budget)
|
|
134
|
+
- `suggest_next_tasks` - Dependency-aware suggestions
|
|
135
|
+
- `get_agent_context` / `get_plan_context` - Focused views
|
|
264
136
|
|
|
265
|
-
###
|
|
137
|
+
### Knowledge Graph
|
|
138
|
+
- `add_learning` / `recall_knowledge` - Learn and retrieve
|
|
139
|
+
- `find_entities` / `check_contradictions` - Graph queries
|
|
140
|
+
- `get_recent_episodes` - Temporal episodes
|
|
266
141
|
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
142
|
+
### Goals & Organizations
|
|
143
|
+
- `create_goal` / `update_goal` / `list_goals` / `get_goal` - Goal management
|
|
144
|
+
- `check_goals_health` - Health dashboard
|
|
145
|
+
- `create_organization` / `get_organization` / `list_organizations` / `update_organization`
|
|
270
146
|
|
|
271
|
-
###
|
|
147
|
+
### Collaboration
|
|
148
|
+
- `add_log` / `get_logs` - Log entries (comments, progress, reasoning)
|
|
149
|
+
- `claim_task` / `release_task` - Task locking
|
|
150
|
+
- `share_plan` - Collaboration management
|
|
272
151
|
|
|
273
|
-
|
|
274
|
-
- `USER_API_TOKEN` - Authentication token
|
|
275
|
-
- `MCP_SERVER_NAME` - Server name (default: planning-system-mcp)
|
|
276
|
-
- `MCP_SERVER_VERSION` - Server version (default: 0.2.0)
|
|
277
|
-
- `NODE_ENV` - Environment (development/production)
|
|
152
|
+
## LLM Skill Reference
|
|
278
153
|
|
|
279
|
-
|
|
154
|
+
See **[SKILL.md](./SKILL.md)** for a complete reference designed to be consumed by LLMs. Include it in system prompts or agent configurations to give any LLM full knowledge of how to use AgentPlanner tools effectively.
|
|
280
155
|
|
|
281
|
-
|
|
282
|
-
// Test search functionality
|
|
283
|
-
search({ scope: "global", query: "test" })
|
|
156
|
+
See **[AGENT_GUIDE.md](./AGENT_GUIDE.md)** for a quick reference card.
|
|
284
157
|
|
|
285
|
-
|
|
286
|
-
create_node({ plan_id: "...", node_type: "task", title: "Test" })
|
|
287
|
-
update_node({ plan_id: "...", node_id: "...", status: "completed" })
|
|
288
|
-
delete_node({ plan_id: "...", node_id: "..." })
|
|
158
|
+
## Transport Modes
|
|
289
159
|
|
|
290
|
-
|
|
291
|
-
|
|
160
|
+
### stdio (default)
|
|
161
|
+
For local use with Claude Desktop, Claude Code, Cursor, Windsurf, Cline:
|
|
162
|
+
```bash
|
|
163
|
+
npx agent-planner-mcp
|
|
292
164
|
```
|
|
293
165
|
|
|
294
|
-
|
|
166
|
+
### HTTP/SSE
|
|
167
|
+
For remote access (ChatGPT, cloud deployments, multi-agent systems):
|
|
168
|
+
```bash
|
|
169
|
+
MCP_TRANSPORT=http npx agent-planner-mcp
|
|
170
|
+
# Listens on http://127.0.0.1:3100
|
|
171
|
+
```
|
|
295
172
|
|
|
296
|
-
|
|
173
|
+
Production endpoint: `https://agentplanner.io/mcp`
|
|
297
174
|
|
|
298
|
-
|
|
299
|
-
- **Authentication errors**: Verify your USER_API_TOKEN is valid
|
|
300
|
-
- **Tool errors**: Check error messages in console output
|
|
175
|
+
See [HTTP_MODE.md](./HTTP_MODE.md) for details.
|
|
301
176
|
|
|
302
|
-
|
|
177
|
+
## Local Development
|
|
303
178
|
|
|
304
|
-
Enable verbose logging:
|
|
305
179
|
```bash
|
|
306
|
-
|
|
180
|
+
git clone https://github.com/TAgents/agent-planner-mcp.git
|
|
181
|
+
cd agent-planner-mcp
|
|
182
|
+
npm install
|
|
183
|
+
npm run setup # Interactive setup wizard
|
|
184
|
+
npm run dev # Dev server with hot reload
|
|
307
185
|
```
|
|
308
186
|
|
|
309
|
-
|
|
187
|
+
### Environment Variables
|
|
310
188
|
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
189
|
+
| Variable | Description | Default |
|
|
190
|
+
|----------|-------------|---------|
|
|
191
|
+
| `API_URL` | AgentPlanner API URL | `http://localhost:3000` |
|
|
192
|
+
| `USER_API_TOKEN` | API token (required) | — |
|
|
193
|
+
| `MCP_TRANSPORT` | `stdio` or `http` | `stdio` |
|
|
194
|
+
| `PORT` | HTTP mode port | `3100` |
|
|
195
|
+
| `NODE_ENV` | Environment | `production` |
|
|
315
196
|
|
|
316
197
|
## License
|
|
317
198
|
|
|
318
|
-
MIT License - see LICENSE
|
|
199
|
+
MIT License - see [LICENSE](./LICENSE) for details.
|
|
319
200
|
|
|
320
201
|
## Support
|
|
321
202
|
|
|
322
|
-
-
|
|
323
|
-
-
|
|
324
|
-
-
|
|
203
|
+
- [GitHub Issues](https://github.com/TAgents/agent-planner-mcp/issues)
|
|
204
|
+
- [CHANGELOG.md](./CHANGELOG.md) for version history
|
|
205
|
+
- [PDR.md](./PDR.md) for technical design
|