@devpad/mcp 2.0.0 → 2.0.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.
Files changed (3) hide show
  1. package/README.md +48 -43
  2. package/dist/index.js +27 -21
  3. package/package.json +2 -4
package/README.md CHANGED
@@ -2,24 +2,17 @@
2
2
 
3
3
  MCP (Model Context Protocol) server for devpad - exposes devpad API functionality for AI assistants like Claude.
4
4
 
5
- ## Installation
6
-
7
- ```bash
8
- npm install -g @devpad/mcp
9
- # or
10
- bunx @devpad/mcp
11
- ```
5
+ ## Get an API Key
12
6
 
13
- ## Usage
7
+ 1. Sign up at [devpad.tools](https://devpad.tools)
8
+ 2. Go to [devpad.tools/account](https://devpad.tools/account)
9
+ 3. Generate an API key
14
10
 
15
- ### Environment Variables
16
-
17
- - `DEVPAD_API_KEY` (required): Your devpad API key from https://devpad.tools/account
18
- - `DEVPAD_BASE_URL` (optional): Base URL for devpad API (defaults to https://devpad.tools/api/v1)
11
+ ## Installation
19
12
 
20
- ### Claude Desktop Configuration
13
+ ### Claude Desktop
21
14
 
22
- Add this to your Claude Desktop configuration file (`~/Library/Application Support/Claude/claude_desktop_config.json` on macOS):
15
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
23
16
 
24
17
  ```json
25
18
  {
@@ -28,80 +21,92 @@ Add this to your Claude Desktop configuration file (`~/Library/Application Suppo
28
21
  "command": "bunx",
29
22
  "args": ["@devpad/mcp"],
30
23
  "env": {
31
- "DEVPAD_API_KEY": "your-api-key-here"
24
+ "DEVPAD_API_KEY": "your-api-key"
32
25
  }
33
26
  }
34
27
  }
35
28
  }
36
29
  ```
37
30
 
38
- Or if you have the package installed locally:
31
+ ### opencode
32
+
33
+ Add to `~/.config/opencode/opencode.json`:
39
34
 
40
35
  ```json
41
36
  {
42
- "mcpServers": {
37
+ "mcp": {
43
38
  "devpad": {
44
- "command": "node",
45
- "args": ["path/to/devpad/packages/mcp/dist/index.js"],
46
- "env": {
47
- "DEVPAD_API_KEY": "your-api-key-here"
39
+ "type": "local",
40
+ "command": ["bunx", "@devpad/mcp"],
41
+ "environment": {
42
+ "DEVPAD_API_KEY": "your-api-key"
48
43
  }
49
44
  }
50
45
  }
51
46
  }
52
47
  ```
53
48
 
49
+ ### Other MCP Clients
50
+
51
+ Run the server directly:
52
+
53
+ ```bash
54
+ export DEVPAD_API_KEY="your-api-key"
55
+ bunx @devpad/mcp
56
+ ```
57
+
58
+ ## Environment Variables
59
+
60
+ | Variable | Required | Description |
61
+ |----------|----------|-------------|
62
+ | `DEVPAD_API_KEY` | Yes | Your API key from devpad.tools/account |
63
+ | `DEVPAD_BASE_URL` | No | API base URL (default: https://devpad.tools/api/v1) |
64
+
54
65
  ## Available Tools
55
66
 
56
- The MCP server exposes all devpad API functionality as tools:
67
+ The MCP server exposes 46 tools for managing your devpad data:
57
68
 
58
69
  ### Projects
59
70
  - `devpad_projects_list` - List all projects
60
- - `devpad_projects_create` - Create a new project
61
71
  - `devpad_projects_get` - Get project by ID or name
62
- - `devpad_projects_update` - Update an existing project
72
+ - `devpad_projects_upsert` - Create or update a project
63
73
 
64
74
  ### Tasks
65
- - `devpad_tasks_list` - List tasks (with optional filters)
66
- - `devpad_tasks_create` - Create a new task
67
- - `devpad_tasks_update` - Update an existing task
75
+ - `devpad_tasks_list` - List tasks with optional filters
68
76
  - `devpad_tasks_get` - Get task by ID
77
+ - `devpad_tasks_upsert` - Create or update a task
78
+ - `devpad_tasks_delete` - Delete a task
79
+ - `devpad_tasks_history` - Get task edit history
69
80
 
70
81
  ### Milestones
71
82
  - `devpad_milestones_list` - List milestones
72
- - `devpad_milestones_create` - Create a new milestone
73
- - `devpad_milestones_update` - Update an existing milestone
83
+ - `devpad_milestones_upsert` - Create or update a milestone
74
84
 
75
85
  ### Goals
76
86
  - `devpad_goals_list` - List goals
77
- - `devpad_goals_create` - Create a new goal
87
+ - `devpad_goals_upsert` - Create or update a goal
78
88
 
79
89
  ### Tags
80
- - `devpad_tags_list` - List tags
90
+ - `devpad_tags_list` - List all tags
81
91
 
82
92
  ### GitHub Integration
83
- - `devpad_github_repos` - List GitHub repositories
93
+ - `devpad_github_repos` - List linked GitHub repositories
84
94
  - `devpad_github_branches` - List branches for a repository
85
95
 
86
- ## Example Usage in Claude
96
+ ## Example Prompts
87
97
 
88
- Once configured, you can use natural language in Claude:
98
+ Once configured, use natural language with your AI assistant:
89
99
 
90
100
  - "List my devpad projects"
91
- - "Create a new project called 'My App' with description 'A cool new app'"
92
- - "Show me all tasks for project XYZ"
93
- - "Create a milestone for Q1 2024"
94
- - "What are my current goals?"
101
+ - "Show me all tasks for the devpad project"
102
+ - "Create a task called 'Fix login bug' in project X with high priority"
103
+ - "What milestones do I have?"
104
+ - "Mark task ABC as done"
95
105
 
96
106
  ## Development
97
107
 
98
108
  ```bash
99
- # Install dependencies
100
109
  bun install
101
-
102
- # Build
103
110
  bun run build
104
-
105
- # Run locally for testing
106
111
  DEVPAD_API_KEY=your-key bun run dev
107
112
  ```
package/dist/index.js CHANGED
@@ -12153,6 +12153,7 @@ class ApiClient {
12153
12153
  this.default_headers = options.default_headers ?? {};
12154
12154
  this.custom_fetch = options.custom_fetch;
12155
12155
  this.request_history = new ArrayBufferedQueue(options.max_history_size ?? 5);
12156
+ this.debug = options.debug ?? false;
12156
12157
  }
12157
12158
  buildUrl(path, query) {
12158
12159
  const url = new URL(`${this.base_url}${path}`);
@@ -12173,10 +12174,9 @@ class ApiClient {
12173
12174
  const requestId = this.generateRequestId();
12174
12175
  const startTime = Date.now();
12175
12176
  const timestamp = new Date().toISOString();
12176
- console.log(`[DEBUG][${this.category}] ${method} ${path} [${requestId}]`, {
12177
- body,
12178
- query
12179
- });
12177
+ if (this.debug) {
12178
+ console.log(`[DEBUG][${this.category}] ${method} ${path} [${requestId}]`, { body, query });
12179
+ }
12180
12180
  const request_headers = {
12181
12181
  "Content-Type": "application/json",
12182
12182
  "X-Request-ID": requestId,
@@ -12214,12 +12214,14 @@ class ApiClient {
12214
12214
  historyEntry.status = response.status;
12215
12215
  historyEntry.duration = duration;
12216
12216
  if (!response.ok) {
12217
- console.log(`[ERROR][${this.category}] ${method} ${path} [${requestId}] failed`, {
12218
- status: response.status,
12219
- duration: `${duration}ms`,
12220
- body,
12221
- query
12222
- });
12217
+ if (this.debug) {
12218
+ console.log(`[ERROR][${this.category}] ${method} ${path} [${requestId}] failed`, {
12219
+ status: response.status,
12220
+ duration: `${duration}ms`,
12221
+ body,
12222
+ query
12223
+ });
12224
+ }
12223
12225
  try {
12224
12226
  handleHttpResponse(response);
12225
12227
  await handleResponseError(response);
@@ -12246,20 +12248,24 @@ class ApiClient {
12246
12248
  }
12247
12249
  }
12248
12250
  }
12249
- console.log(`[INFO][${this.category}] ${method} ${path} [${requestId}] completed`, {
12250
- status: response.status,
12251
- duration: `${duration}ms`
12252
- });
12251
+ if (this.debug) {
12252
+ console.log(`[INFO][${this.category}] ${method} ${path} [${requestId}] completed`, {
12253
+ status: response.status,
12254
+ duration: `${duration}ms`
12255
+ });
12256
+ }
12253
12257
  return result;
12254
12258
  } catch (error) {
12255
12259
  const duration = Date.now() - startTime;
12256
- console.log(`[ERROR][${this.category}] ${method} ${path} [${requestId}] failed`, {
12257
- url,
12258
- duration: `${duration}ms`,
12259
- error: error instanceof Error ? error.message : String(error),
12260
- body,
12261
- query
12262
- });
12260
+ if (this.debug) {
12261
+ console.log(`[ERROR][${this.category}] ${method} ${path} [${requestId}] failed`, {
12262
+ url,
12263
+ duration: `${duration}ms`,
12264
+ error: error instanceof Error ? error.message : String(error),
12265
+ body,
12266
+ query
12267
+ });
12268
+ }
12263
12269
  if (error instanceof ApiError || error instanceof AuthenticationError) {
12264
12270
  throw error;
12265
12271
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@devpad/mcp",
3
- "version": "2.0.0",
3
+ "version": "2.0.1",
4
4
  "description": "MCP server for devpad - exposes devpad API functionality via Model Context Protocol",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -8,14 +8,12 @@
8
8
  "devpad-mcp": "dist/index.js"
9
9
  },
10
10
  "scripts": {
11
- "build": "bun build src/index.ts --outdir dist --target node",
11
+ "build": "bun build src/index.ts --outdir dist --target node --packages=bundle",
12
12
  "dev": "bun run src/index.ts",
13
13
  "clean": "rm -rf dist",
14
14
  "prepublishOnly": "bun run build"
15
15
  },
16
16
  "dependencies": {
17
- "@devpad/api": "^2.0.0",
18
- "@devpad/schema": "^2.0.0",
19
17
  "@modelcontextprotocol/sdk": "^1.17.5",
20
18
  "zod": "^3.22.4",
21
19
  "zod-to-json-schema": "^3.24.6"