@monadsag/productive-mcp 1.2.48

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 (63) hide show
  1. package/LICENSE +190 -0
  2. package/NOTICE +6 -0
  3. package/README.md +353 -0
  4. package/build/api/bookings-client.js +249 -0
  5. package/build/api/capacity.js +279 -0
  6. package/build/api/client.js +1296 -0
  7. package/build/api/errors.js +50 -0
  8. package/build/api/invoice-time-entries.js +256 -0
  9. package/build/api/pages-tree.js +106 -0
  10. package/build/api/time-entry-notes.js +75 -0
  11. package/build/api/types.js +1 -0
  12. package/build/auth/logo.js +21 -0
  13. package/build/auth/self-resolver.js +61 -0
  14. package/build/config/index.js +24 -0
  15. package/build/index.js +15 -0
  16. package/build/prompts/timesheet.js +285 -0
  17. package/build/server.js +55 -0
  18. package/build/tools/absences.js +502 -0
  19. package/build/tools/activities.js +140 -0
  20. package/build/tools/bookings.js +531 -0
  21. package/build/tools/budget-services.js +168 -0
  22. package/build/tools/budgets.js +276 -0
  23. package/build/tools/capacity.js +281 -0
  24. package/build/tools/changeset.js +41 -0
  25. package/build/tools/comments.js +469 -0
  26. package/build/tools/companies.js +73 -0
  27. package/build/tools/custom-field-resolver.js +92 -0
  28. package/build/tools/custom-fields.js +155 -0
  29. package/build/tools/folders.js +516 -0
  30. package/build/tools/include-resolver.js +45 -0
  31. package/build/tools/invoice-actions.js +476 -0
  32. package/build/tools/invoice-defaults.js +65 -0
  33. package/build/tools/invoice-time-entries.js +320 -0
  34. package/build/tools/invoices.js +657 -0
  35. package/build/tools/my-tasks.js +100 -0
  36. package/build/tools/page-children.js +129 -0
  37. package/build/tools/pages.js +466 -0
  38. package/build/tools/people.js +147 -0
  39. package/build/tools/projects.js +77 -0
  40. package/build/tools/recent-updates.js +112 -0
  41. package/build/tools/registry.js +409 -0
  42. package/build/tools/subtasks.js +245 -0
  43. package/build/tools/task-backlog.js +106 -0
  44. package/build/tools/task-dependencies.js +244 -0
  45. package/build/tools/task-list-move.js +65 -0
  46. package/build/tools/task-lists.js +535 -0
  47. package/build/tools/task-reposition.js +199 -0
  48. package/build/tools/task-status.js +178 -0
  49. package/build/tools/tasks.js +738 -0
  50. package/build/tools/time-entries.js +736 -0
  51. package/build/tools/time-entry-approval.js +103 -0
  52. package/build/tools/time-entry-delete.js +72 -0
  53. package/build/tools/time-entry-update.js +126 -0
  54. package/build/tools/timers.js +195 -0
  55. package/build/tools/todos.js +342 -0
  56. package/build/tools/tool-helpers.js +114 -0
  57. package/build/tools/toolsets.js +153 -0
  58. package/build/tools/whoami.js +64 -0
  59. package/build/tools/workflow-statuses.js +81 -0
  60. package/build/utils/errors.js +67 -0
  61. package/build/utils/mentions.js +98 -0
  62. package/npm-shrinkwrap.json +1159 -0
  63. package/package.json +79 -0
package/LICENSE ADDED
@@ -0,0 +1,190 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to the Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by the Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding any notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ Copyright 2026 Monads AG
179
+
180
+ Licensed under the Apache License, Version 2.0 (the "License");
181
+ you may not use this file except in compliance with the License.
182
+ You may obtain a copy of the License at
183
+
184
+ http://www.apache.org/licenses/LICENSE-2.0
185
+
186
+ Unless required by applicable law or agreed to in writing, software
187
+ distributed under the License is distributed on an "AS IS" BASIS,
188
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
189
+ See the License for the specific language governing permissions and
190
+ limitations under the License.
package/NOTICE ADDED
@@ -0,0 +1,6 @@
1
+ Productive.io Remote MCP Server
2
+ Copyright 2026 Monads AG
3
+
4
+ This product includes software originally developed as "productive-mcp"
5
+ by jayat3dn (https://github.com/berwickgeek/productive-mcp),
6
+ licensed under the ISC License.
package/README.md ADDED
@@ -0,0 +1,353 @@
1
+ # Productive.io Remote MCP Server
2
+
3
+ A **remote MCP server** for [Productive.io](https://productive.io) running on **Cloudflare Workers**. Connects Claude Desktop, Claude Code, and other MCP-compatible clients to your Productive.io workspace — no local installation, no API keys on client machines.
4
+
5
+ ## Highlights
6
+
7
+ - **Remote-first** — runs on Cloudflare Workers, clients connect via URL
8
+ - **Microsoft Entra ID** — OAuth 2.1 with your organization's identity provider (SSO + MFA)
9
+ - **Per-user authorization (BYOT)** — every call uses the user's own Productive token, encrypted at rest; no shared admin token ([details](#per-user-tokens-byot))
10
+ - **Auto user resolution** — maps Entra email to Productive user ID automatically
11
+ - **Name resolution** — people, companies, projects, tasks, and deals are shown by name, not raw ID
12
+ - **70+ tools** — projects, tasks, time tracking, invoicing, comments, pages, and more
13
+ - **Zero client setup** — just add one URL to Claude Desktop or Claude Code
14
+
15
+ ## Quick Start
16
+
17
+ If someone in your organization has already deployed this server, you only need to configure your MCP client:
18
+
19
+ ### Claude Desktop
20
+
21
+ Add to `~/Library/Application Support/Claude/claude_desktop_config.json`:
22
+
23
+ ```json
24
+ {
25
+ "mcpServers": {
26
+ "productive": {
27
+ "command": "npx",
28
+ "args": ["-y", "mcp-remote", "https://<your-worker>.<your-subdomain>.workers.dev/mcp"]
29
+ }
30
+ }
31
+ }
32
+ ```
33
+
34
+ Restart Claude Desktop. A browser window opens for Entra ID login on first connect. The session persists — you only sign in once.
35
+
36
+ ### Claude Code
37
+
38
+ ```bash
39
+ claude mcp add productive -- npx -y mcp-remote https://<your-worker>.<your-subdomain>.workers.dev/mcp
40
+ ```
41
+
42
+ ## Deploy Your Own
43
+
44
+ ### Prerequisites
45
+
46
+ - [Cloudflare account](https://dash.cloudflare.com/sign-up) with Workers (free tier works)
47
+ - [Microsoft Entra ID](https://entra.microsoft.com) tenant with App Registration rights
48
+ - Node.js 18+ and npm
49
+
50
+ ### 1. Clone and install
51
+
52
+ ```bash
53
+ git clone https://github.com/MonadsAG/monads-mcp-productive.git
54
+ cd monads-mcp-productive
55
+ npm install
56
+ ```
57
+
58
+ ### 2. Create Cloudflare KV namespaces
59
+
60
+ ```bash
61
+ npx wrangler login
62
+ npx wrangler kv namespace create "OAUTH_KV"
63
+ npx wrangler kv namespace create "USER_MAPPING_KV"
64
+ npx wrangler kv namespace create "USER_PAT_KV"
65
+ ```
66
+
67
+ Copy the namespace IDs into `wrangler.jsonc`. (`USER_PAT_KV` stores each user's
68
+ encrypted Productive token — see [Per-user tokens](#per-user-tokens-byot).)
69
+
70
+ ### 3. Register an Entra ID application
71
+
72
+ ```bash
73
+ # Login to your Entra tenant
74
+ az login --tenant <your-tenant-id> --allow-no-subscriptions
75
+
76
+ # Create the app registration (single tenant).
77
+ # Register BOTH redirect URIs: /callback (MCP login) and /settings/callback (token settings page).
78
+ az ad app create \
79
+ --display-name "Productive MCP" \
80
+ --sign-in-audience "AzureADMyOrg" \
81
+ --web-redirect-uris \
82
+ "https://<your-worker>.<your-subdomain>.workers.dev/callback" \
83
+ "https://<your-worker>.<your-subdomain>.workers.dev/settings/callback"
84
+
85
+ # Note the appId from the output, then add API permissions
86
+ az ad app permission add \
87
+ --id <app-id> \
88
+ --api 00000003-0000-0000-c000-000000000000 \
89
+ --api-permissions \
90
+ 37f7f235-527c-4136-accd-4a02d197296e=Scope \
91
+ 14dad69e-099b-42c9-810b-d002981feec1=Scope \
92
+ 64a6cdd6-aab1-4aaf-94b8-3cc8405e90d0=Scope \
93
+ e1fe6dd8-ba31-4d61-89e7-88639da4683d=Scope
94
+
95
+ # Grant admin consent
96
+ az ad app permission admin-consent --id <app-id>
97
+
98
+ # Generate a client secret (2-year expiry)
99
+ az ad app credential reset \
100
+ --id <app-id> \
101
+ --append \
102
+ --display-name "Cloudflare Worker" \
103
+ --years 2
104
+ ```
105
+
106
+ The permission IDs correspond to: `openid`, `profile`, `email`, `User.Read` (delegated).
107
+
108
+ ### 4. Set Cloudflare secrets
109
+
110
+ ```bash
111
+ npx wrangler secret put PRODUCTIVE_ORG_ID # your org ID with slug (e.g. 12345-company-name)
112
+ npx wrangler secret put PRODUCTIVE_API_BASE_URL # https://api.productive.io/api/v2/ (or sandbox URL)
113
+ npx wrangler secret put PRODUCTIVE_TOOLSETS # optional, comma-separated toolset names (default: all tools)
114
+ npx wrangler secret put ENTRA_CLIENT_ID # app (client) ID from step 3
115
+ npx wrangler secret put ENTRA_CLIENT_SECRET # client secret from step 3
116
+ npx wrangler secret put ENTRA_TENANT_ID # your Entra directory (tenant) ID
117
+ openssl rand -hex 32 | npx wrangler secret put COOKIE_ENCRYPTION_KEY # signs session/CSRF cookies
118
+ openssl rand -hex 32 | npx wrangler secret put PAT_ENC_KEY # encrypts per-user PATs at rest (AES-256-GCM)
119
+ ```
120
+
121
+ > **No shared Productive token.** Each user supplies their own Productive PAT via the
122
+ > `/settings` page (see [Per-user tokens](#per-user-tokens-byot)), so `PRODUCTIVE_API_TOKEN`
123
+ > is **not** needed by the Worker. It remains only for the legacy local stdio entrypoint
124
+ > (set it in `.env`, not as a Worker secret). There, `PRODUCTIVE_API_TOKEN` and
125
+ > `PRODUCTIVE_ORG_ID` are enough: the person ID behind "me" is resolved from the token at
126
+ > startup, so `PRODUCTIVE_USER_ID` is only needed to override it.
127
+
128
+ ### 5. Deploy
129
+
130
+ ```bash
131
+ npm run worker:deploy
132
+ ```
133
+
134
+ ### 6. Connect
135
+
136
+ Configure Claude Desktop or Claude Code as shown in [Quick Start](#quick-start), replacing the placeholder URL with your Worker URL.
137
+
138
+ ## Per-user tokens (BYOT)
139
+
140
+ Every Productive API call runs with the **requesting user's own Personal Access Token**
141
+ (Bring Your Own Token), so Productive enforces each user's real permissions — there is no
142
+ shared admin token. Identity still comes from Microsoft Entra ID; only the upstream
143
+ credential is now per-user.
144
+
145
+ After connecting the MCP, each user opens the settings page once to store their token:
146
+
147
+ ```
148
+ https://<your-worker>.<your-subdomain>.workers.dev/settings
149
+ ```
150
+
151
+ The page signs the user in with Entra ID, then lets them **set, rotate, or delete** their
152
+ Productive PAT — no MCP reconnect required. The token is validated against Productive,
153
+ encrypted with AES-256-GCM (`PAT_ENC_KEY`) before being written to `USER_PAT_KV` (keyed by
154
+ the user's stable Entra object ID), and never displayed, logged, or sent through the model.
155
+
156
+ Until a user stores a token, their tool calls return a friendly message linking to
157
+ `/settings` instead of any data.
158
+
159
+ The settings page and the sign-in dialog render in **German or English automatically**, based on
160
+ the browser's `Accept-Language` (default English); append `?lang=de` / `?lang=en` to force one.
161
+
162
+ ## Architecture
163
+
164
+ ```
165
+ ┌─────────────────┐ Streamable HTTP ┌──────────────────────────────┐
166
+ │ Claude Desktop │ ◄──────────────────► │ Cloudflare Worker │
167
+ │ / Claude Code │ │ │
168
+ │ (via mcp-remote)│ │ OAuthProvider (OAuth 2.1) │
169
+ └─────────────────┘ │ ↓ │
170
+ │ Entra ID (OIDC login) │
171
+ Browser ←── login redirect ───────→│ ↓ │
172
+ │ McpAgent (Durable Object) │
173
+ │ ↓ │
174
+ │ ProductiveAPIClient │
175
+ └──────────────┬───────────────┘
176
+ ↓
177
+ Productive.io API
178
+ ```
179
+
180
+ ## Available Tools
181
+
182
+ ### Company & Project
183
+
184
+ | Tool | Description |
185
+ | ---------------- | ----------------------------------- |
186
+ | `whoami` | Get current user context |
187
+ | `list_companies` | List companies/customers |
188
+ | `list_projects` | List projects with status filtering |
189
+
190
+ ### Folders (Boards) & Task Lists
191
+
192
+ Productive's UI calls this resource a "folder"; the API models it as a "board" (tasks and task lists reference their parent via a `board`/`board_id` relationship). One tool set covers it -- there is no separate "board" tool.
193
+
194
+ | Tool | Description |
195
+ | -------------------------------------------------------------------------------------------------------- | ------------------------------ |
196
+ | `list_folders` / `get_folder` / `create_folder` / `update_folder` | Folder CRUD |
197
+ | `archive_folder` / `restore_folder` / `copy_folder` / `move_folder` / `reposition_folder` | Folder lifecycle & positioning |
198
+ | `list_task_lists` / `create_task_list` / `get_task_list` / `update_task_list` | Task list CRUD |
199
+ | `archive_task_list` / `restore_task_list` / `copy_task_list` / `move_task_list` / `reposition_task_list` | Task list operations |
200
+
201
+ ### Tasks
202
+
203
+ | Tool | Description |
204
+ | ------------------------------------------------------------------------------ | ---------------------- |
205
+ | `list_tasks` / `get_task` / `get_project_tasks` / `my_tasks` | Query tasks |
206
+ | `create_task` / `update_task` / `delete_task` | Task CRUD |
207
+ | `update_task_status` | Task state changes |
208
+ | `list_custom_fields` / `list_custom_field_options` | Custom field discovery |
209
+ | `move_task_to_list` / `add_to_backlog` / `reposition_task` | Task positioning |
210
+ | `list_subtasks` / `create_subtask` | Subtask management |
211
+ | `list_task_dependencies` / `create_task_dependency` / `delete_task_dependency` | Dependencies |
212
+
213
+ ### Comments & Todos
214
+
215
+ | Tool | Description |
216
+ | ------------------------------------------------------------------------------------------ | --------------- |
217
+ | `add_task_comment` / `list_comments` / `get_comment` / `update_comment` / `delete_comment` | Comment CRUD |
218
+ | `pin_comment` / `unpin_comment` / `add_comment_reaction` | Comment actions |
219
+ | `list_todos` / `get_todo` / `create_todo` / `update_todo` / `delete_todo` | Todo management |
220
+
221
+ ### Pages & Documents
222
+
223
+ | Tool | Description |
224
+ | ------------------------------------------------------------------------- | --------------- |
225
+ | `list_pages` / `get_page` / `create_page` / `update_page` / `delete_page` | Page CRUD |
226
+ | `list_page_children` | Page hierarchy |
227
+ | `move_page` / `copy_page` | Page operations |
228
+
229
+ ### Time Tracking
230
+
231
+ | Tool | Description |
232
+ | -------------------------------------------------------------------------------------- | -------------------------------- |
233
+ | `list_time_entries` / `create_time_entry` / `update_time_entry` | Time entry CRUD |
234
+ | `set_time_entry_approval` | Approval workflow (action param) |
235
+ | `start_timer` / `stop_timer` / `get_timer` | Real-time timers |
236
+ | `list_services` / `get_project_services` / `list_project_deals` / `list_deal_services` | Budget & service lookup |
237
+ | `create_budget_service` / `update_budget_service` | Budget service (line item) CRUD |
238
+
239
+ ### Invoicing
240
+
241
+ | Tool | Description |
242
+ | ---------------------------------------------------------------------------------------- | ------------------------ |
243
+ | `list_invoices` / `get_invoice` / `create_invoice` / `update_invoice` / `delete_invoice` | Invoice CRUD |
244
+ | `list_company_budgets` / `create_budget` / `update_budget` / `create_budget_from_deal` | Budget CRUD & derivation |
245
+ | `generate_line_items` / `finalize_invoice` / `mark_invoice_paid` | Invoice workflow |
246
+ | `get_invoice_pdf_url` / `get_timesheet_report_url` | Document URLs |
247
+
248
+ ### Activity & Workflow
249
+
250
+ | Tool | Description |
251
+ | ------------------------ | ---------------------------- |
252
+ | `list_activities` | List activities with filters |
253
+ | `get_recent_updates` | Get recent updates |
254
+ | `list_workflow_statuses` | List workflow statuses |
255
+
256
+ ## Common Workflows
257
+
258
+ ### Time Entry
259
+
260
+ Follow the hierarchy: Project → Deal/Budget → Service → Time Entry.
261
+
262
+ ```
263
+ list_projects → list_project_deals → list_deal_services → create_time_entry
264
+ ```
265
+
266
+ ### Task Status Update
267
+
268
+ Update by name — no ID lookup needed:
269
+
270
+ ```json
271
+ { "task_id": "123", "status_name": "In Progress" }
272
+ ```
273
+
274
+ ### Invoice
275
+
276
+ ```
277
+ list_companies → list_company_budgets → create_invoice → generate_line_items → finalize_invoice → mark_invoice_paid
278
+ ```
279
+
280
+ ### Budget
281
+
282
+ Direct creation:
283
+
284
+ ```
285
+ list_companies → create_budget → update_budget (optional)
286
+ ```
287
+
288
+ Derived from an existing deal/contract (the deal must be in a "Won" status):
289
+
290
+ ```
291
+ list_project_deals → create_budget_from_deal
292
+ ```
293
+
294
+ ### Budget Services
295
+
296
+ Attach services (line items) to a budget:
297
+
298
+ ```
299
+ create_budget → create_budget_service → update_budget_service (optional)
300
+ ```
301
+
302
+ ```json
303
+ { "budget_id": "123", "name": "Consulting Hours", "price": 150, "quantity": 20 }
304
+ ```
305
+
306
+ `unit_id` (1=Hour, 2=Piece, 3=Day) defaults to `1`; `billing_type_id` (1=Fixed, 2=Actuals, 3=None, 4=Percentage) defaults to `2`.
307
+
308
+ ## npm package / MCP hub
309
+
310
+ The stdio entry point is also published to npm as
311
+ [`@monadsag/productive-mcp`](https://www.npmjs.com/package/@monadsag/productive-mcp), for hosts
312
+ that start MCP servers as local processes (such as the Monads MCP hub). Every push to `main`
313
+ publishes a new version from CI with npm provenance: major and minor come from `package.json`,
314
+ the patch is the CI run number. There is no manual release step. Each release ships an
315
+ `npm-shrinkwrap.json`, so every install gets exactly the dependency tree CI tested.
316
+
317
+ ```bash
318
+ npx -y @monadsag/productive-mcp@latest
319
+ ```
320
+
321
+ | Variable | Required | Description |
322
+ | ---------------------- | -------- | ------------------------------------------------------- |
323
+ | `PRODUCTIVE_API_TOKEN` | yes | The user's own Productive API token |
324
+ | `PRODUCTIVE_ORG_ID` | yes | Organization ID with slug, e.g. `12345-company-name` |
325
+ | `PRODUCTIVE_USER_ID` | no | Person ID behind "me"; resolved from the token if unset |
326
+ | `PRODUCTIVE_TOOLSETS` | no | Comma-separated toolsets to enable (default: all) |
327
+
328
+ The server speaks MCP on stdout and logs to stderr only. Note that the unscoped
329
+ `productive-mcp` on npm is the upstream original by berwickgeek, not this fork.
330
+
331
+ `npm run build && npm run package:smoke` packs the package, serves it from a throwaway local
332
+ registry and starts it with `npx` over stdio, the same way the hub does.
333
+
334
+ ## Development
335
+
336
+ ```bash
337
+ npm run worker:dev # local dev on port 8788 (requires .dev.vars with secrets)
338
+ npm run worker:deploy # deploy to Cloudflare
339
+ npm run build # compile TypeScript (for local stdio fallback)
340
+ npm run format # prettier
341
+ ```
342
+
343
+ Create a `.dev.vars` file (gitignored) with the same variables as the Cloudflare secrets for local development — including `PAT_ENC_KEY` (a 64-char hex string, e.g. `openssl rand -hex 32`). `wrangler dev` provisions local KV namespaces automatically.
344
+
345
+ ## License
346
+
347
+ [Apache 2.0](LICENSE)
348
+
349
+ Originally based on [productive-mcp](https://github.com/berwickgeek/productive-mcp) by [jayat3dn](https://github.com/berwickgeek) (ISC). See [NOTICE](NOTICE) for attribution details.
350
+
351
+ ---
352
+
353
+ Maintained by [Monads AG](https://monads.ch)