agent-planner-mcp 0.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 ADDED
@@ -0,0 +1,324 @@
1
+ # Planning System MCP Server
2
+
3
+ A Model Context Protocol (MCP) server interface for the Planning System API, enabling AI agents to interact with planning data through powerful, efficient tools.
4
+
5
+ ## Overview
6
+
7
+ This MCP server connects to the Planning System API, providing AI agents with comprehensive planning capabilities through a clean, structured interface. All interactions use JSON responses for easy parsing and processing.
8
+
9
+ ## ✨ Key Features
10
+
11
+ ### Core Capabilities
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
17
+
18
+ ### Available Tools
19
+
20
+ #### Planning & Search
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
+ ```
58
+
59
+ 2. Run the automated setup wizard
60
+ ```bash
61
+ npm run setup
62
+ ```
63
+
64
+ The wizard will:
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.
72
+
73
+ ### Manual Installation (Advanced)
74
+
75
+ If you prefer manual setup or the wizard doesn't work for your setup:
76
+
77
+ 1. Clone the repository
78
+ ```bash
79
+ git clone https://github.com/talkingagents/agent-planner-mcp.git
80
+ cd agent-planner-mcp
81
+ ```
82
+
83
+ 2. Install dependencies
84
+ ```bash
85
+ npm install
86
+ ```
87
+
88
+ 3. Create an API token:
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
93
+
94
+ 4. Create `.env` file:
95
+ ```bash
96
+ cp .env.example .env
97
+ ```
98
+
99
+ Edit the `.env` file:
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
116
+
117
+ ### Option 1: Using npx (Recommended - Simplest Setup)
118
+
119
+ Add to your `claude_desktop_config.json`:
120
+
121
+ ```json
122
+ {
123
+ "mcpServers": {
124
+ "planning-system": {
125
+ "command": "npx",
126
+ "args": [
127
+ "-y",
128
+ "agent-planner-mcp"
129
+ ],
130
+ "env": {
131
+ "API_URL": "https://api.agentplanner.io",
132
+ "USER_API_TOKEN": "your_api_token_here"
133
+ }
134
+ }
135
+ }
136
+ }
137
+ ```
138
+
139
+ **Benefits:**
140
+ - No need to clone the repository
141
+ - Always uses the latest published version
142
+ - Simplest configuration
143
+
144
+ **For local development**, use `http://localhost:3000` instead:
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:
152
+
153
+ ```json
154
+ {
155
+ "mcpServers": {
156
+ "planning-system": {
157
+ "command": "node",
158
+ "args": [
159
+ "/path/to/agent-planner-mcp/src/index.js"
160
+ ],
161
+ "env": {
162
+ "API_URL": "https://api.agentplanner.io",
163
+ "USER_API_TOKEN": "your_api_token_here"
164
+ }
165
+ }
166
+ }
167
+ }
168
+ ```
169
+
170
+ Then restart Claude Desktop to load the planning tools.
171
+
172
+ ## Example Usage
173
+
174
+ ### Search Examples
175
+
176
+ ```javascript
177
+ // Global search
178
+ search({
179
+ scope: "global",
180
+ query: "API integration",
181
+ filters: { type: "task", status: "in_progress" }
182
+ })
183
+
184
+ // Search within a specific plan
185
+ search({
186
+ scope: "plan",
187
+ scope_id: "plan-123",
188
+ query: "testing"
189
+ })
190
+ ```
191
+
192
+ ### Plan Management
193
+
194
+ ```javascript
195
+ // Create a plan with initial structure
196
+ create_plan({
197
+ title: "Product Launch Q1 2025",
198
+ description: "Complete product launch plan",
199
+ status: "active"
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
+ ```
210
+
211
+ ### Batch Operations
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
+ ```
233
+
234
+ ### Rich Context
235
+
236
+ ```javascript
237
+ // Get comprehensive node information
238
+ get_node_context({
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
+ ```
251
+
252
+ ## Project Structure
253
+
254
+ ```
255
+ src/
256
+ ├── index.js # Main entry point
257
+ ├── tools.js # Tool implementations
258
+ ├── api-client.js # API client with axios
259
+ └── tools/
260
+ └── search-wrapper.js # Search functionality wrapper
261
+ ```
262
+
263
+ ## Development
264
+
265
+ ### Running in Development Mode
266
+
267
+ ```bash
268
+ npm run dev # Auto-restart on changes
269
+ ```
270
+
271
+ ### Environment Variables
272
+
273
+ - `API_URL` - Planning System API URL
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)
278
+
279
+ ### Testing Tools
280
+
281
+ ```javascript
282
+ // Test search functionality
283
+ search({ scope: "global", query: "test" })
284
+
285
+ // Test node operations
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: "..." })
289
+
290
+ // Test batch operations
291
+ batch_update_nodes({ plan_id: "...", updates: [...] })
292
+ ```
293
+
294
+ ## Troubleshooting
295
+
296
+ ### Common Issues
297
+
298
+ - **Connection errors**: Ensure the Planning System API is running
299
+ - **Authentication errors**: Verify your USER_API_TOKEN is valid
300
+ - **Tool errors**: Check error messages in console output
301
+
302
+ ### Debug Mode
303
+
304
+ Enable verbose logging:
305
+ ```bash
306
+ NODE_ENV=development npm start
307
+ ```
308
+
309
+ ## Performance Tips
310
+
311
+ 1. Use batch operations when updating multiple items
312
+ 2. Use appropriate search scopes to minimize API calls
313
+ 3. Cache plan structures when making multiple operations
314
+ 4. Apply filters to limit result sets
315
+
316
+ ## License
317
+
318
+ MIT License - see LICENSE file for details.
319
+
320
+ ## Support
321
+
322
+ - Report bugs via GitHub Issues
323
+ - See [PDR.md](./PDR.md) for technical design details
324
+ - Check [CHANGELOG.md](./CHANGELOG.md) for version history
package/package.json ADDED
@@ -0,0 +1,53 @@
1
+ {
2
+ "name": "agent-planner-mcp",
3
+ "version": "0.2.0",
4
+ "description": "MCP server interface for the Planning System API",
5
+ "main": "src/index.js",
6
+ "bin": {
7
+ "agent-planner-mcp": "src/index.js"
8
+ },
9
+ "scripts": {
10
+ "start": "node src/index.js",
11
+ "dev": "nodemon src/index.js",
12
+ "test": "jest",
13
+ "test:tools": "node test-tools.js",
14
+ "setup": "node src/setup.js",
15
+ "prepublishOnly": "echo 'Ready to publish agent-planner-mcp'"
16
+ },
17
+ "keywords": [
18
+ "mcp",
19
+ "model-context-protocol",
20
+ "planning",
21
+ "claude",
22
+ "ai",
23
+ "agent-planner"
24
+ ],
25
+ "author": "TalkingAgents",
26
+ "license": "MIT",
27
+ "repository": {
28
+ "type": "git",
29
+ "url": "https://github.com/talkingagents/agent-planner-mcp.git"
30
+ },
31
+ "homepage": "https://agentplanner.io",
32
+ "bugs": {
33
+ "url": "https://github.com/talkingagents/agent-planner-mcp/issues"
34
+ },
35
+ "dependencies": {
36
+ "@modelcontextprotocol/sdk": "^1.8.0",
37
+ "axios": "^1.6.2",
38
+ "dotenv": "^16.3.1",
39
+ "ignore": "^7.0.3"
40
+ },
41
+ "devDependencies": {
42
+ "jest": "^29.7.0",
43
+ "nodemon": "^3.0.1"
44
+ },
45
+ "engines": {
46
+ "node": ">=16.0.0"
47
+ },
48
+ "files": [
49
+ "src/",
50
+ "README.md",
51
+ "LICENSE"
52
+ ]
53
+ }