paperclip-mcp 2.0.0 → 2.1.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 +155 -136
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -1,36 +1,18 @@
|
|
|
1
1
|
# paperclip-mcp
|
|
2
2
|
|
|
3
|
-
[
|
|
4
|
-
[](./LICENSE)
|
|
5
|
-
[](https://nodejs.org)
|
|
3
|
+
MCP server that exposes the [Paperclip](https://paperclip.ing) control plane API as tools for Claude Code agents — manage issues, coordinate agents, post comments, and orchestrate work without direct API calls.
|
|
6
4
|
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
---
|
|
5
|
+
[](https://www.npmjs.com/package/paperclip-mcp)
|
|
6
|
+
[](https://modelcontextprotocol.io)
|
|
7
|
+
[](LICENSE)
|
|
12
8
|
|
|
13
9
|
## Quickstart
|
|
14
10
|
|
|
15
|
-
**Install and run via npx (no global install needed):**
|
|
16
|
-
|
|
17
11
|
```bash
|
|
18
12
|
npx paperclip-mcp
|
|
19
13
|
```
|
|
20
14
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
npm install -g paperclip-mcp
|
|
25
|
-
```
|
|
26
|
-
|
|
27
|
-
**Docker / Podman:** see [`docs/guides/docker.md`](docs/guides/docker.md) for the production image (`paperclip-mcp:2.0.0`), `.mcp.json` snippet, and security notes.
|
|
28
|
-
|
|
29
|
-
---
|
|
30
|
-
|
|
31
|
-
## Claude Code setup
|
|
32
|
-
|
|
33
|
-
Add the server to your Claude Code MCP config. The recommended location is `~/.config/claude/settings.json` for user-wide access, or `.claude/settings.json` for project-local config.
|
|
15
|
+
Add to `.claude/settings.json`:
|
|
34
16
|
|
|
35
17
|
```json
|
|
36
18
|
{
|
|
@@ -40,174 +22,211 @@ Add the server to your Claude Code MCP config. The recommended location is `~/.c
|
|
|
40
22
|
"args": ["paperclip-mcp"],
|
|
41
23
|
"env": {
|
|
42
24
|
"PAPERCLIP_API_URL": "http://127.0.0.1:3100",
|
|
43
|
-
"PAPERCLIP_API_KEY": "<your-
|
|
44
|
-
"PAPERCLIP_AGENT_ID": "<your-agent-
|
|
45
|
-
"PAPERCLIP_COMPANY_ID": "<your-company-
|
|
25
|
+
"PAPERCLIP_API_KEY": "<your-api-key>",
|
|
26
|
+
"PAPERCLIP_AGENT_ID": "<your-agent-id>",
|
|
27
|
+
"PAPERCLIP_COMPANY_ID": "<your-company-id>"
|
|
46
28
|
}
|
|
47
29
|
}
|
|
48
30
|
}
|
|
49
31
|
}
|
|
50
32
|
```
|
|
51
33
|
|
|
52
|
-
|
|
34
|
+
For heartbeat runs, Paperclip injects all required env vars automatically.
|
|
53
35
|
|
|
54
|
-
|
|
36
|
+
## Installation
|
|
55
37
|
|
|
56
|
-
|
|
38
|
+
Three first-class variants:
|
|
57
39
|
|
|
58
|
-
|
|
59
|
-
| ------------------------------ | -------- | ------------------------------------------------------------ |
|
|
60
|
-
| `PAPERCLIP_API_KEY` | Yes | Bearer token for API authentication |
|
|
61
|
-
| `PAPERCLIP_API_URL` | Yes | Base URL of the Paperclip API (e.g. `http://127.0.0.1:3100`) |
|
|
62
|
-
| `PAPERCLIP_AGENT_ID` | Yes | UUID of the agent running this server |
|
|
63
|
-
| `PAPERCLIP_COMPANY_ID` | Yes | UUID of the company (for company-scoped endpoints) |
|
|
64
|
-
| `PAPERCLIP_RUN_ID` | No | Heartbeat run ID — injected by Paperclip during agent runs |
|
|
65
|
-
| `PAPERCLIP_REQUEST_TIMEOUT_MS` | No | Per-request timeout in ms (default: `30000`) |
|
|
40
|
+
### npm
|
|
66
41
|
|
|
67
|
-
|
|
42
|
+
```bash
|
|
43
|
+
# one-shot (no install)
|
|
44
|
+
npx paperclip-mcp
|
|
68
45
|
|
|
69
|
-
|
|
46
|
+
# global install
|
|
47
|
+
npm install -g paperclip-mcp
|
|
48
|
+
```
|
|
70
49
|
|
|
71
|
-
|
|
50
|
+
### Docker / Podman
|
|
72
51
|
|
|
73
|
-
|
|
52
|
+
```bash
|
|
53
|
+
# Docker
|
|
54
|
+
docker run --rm -i \
|
|
55
|
+
-e PAPERCLIP_API_URL=http://host.docker.internal:3100 \
|
|
56
|
+
-e PAPERCLIP_API_KEY=<your-api-key> \
|
|
57
|
+
-e PAPERCLIP_AGENT_ID=<your-agent-id> \
|
|
58
|
+
-e PAPERCLIP_COMPANY_ID=<your-company-id> \
|
|
59
|
+
ghcr.io/bruhsb/paperclip-mcp:2.1.0
|
|
60
|
+
|
|
61
|
+
# Podman (same flags, replace docker → podman)
|
|
62
|
+
podman run --rm -i \
|
|
63
|
+
-e PAPERCLIP_API_URL=http://host.containers.internal:3100 \
|
|
64
|
+
-e PAPERCLIP_API_KEY=<your-api-key> \
|
|
65
|
+
-e PAPERCLIP_AGENT_ID=<your-agent-id> \
|
|
66
|
+
-e PAPERCLIP_COMPANY_ID=<your-company-id> \
|
|
67
|
+
ghcr.io/bruhsb/paperclip-mcp:2.1.0
|
|
68
|
+
```
|
|
74
69
|
|
|
75
|
-
|
|
70
|
+
### Compose stack (v2.1.0+)
|
|
76
71
|
|
|
77
|
-
Paperclip
|
|
72
|
+
Run the full Paperclip server + MCP server together via `podman-compose` (or `docker-compose`):
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
podman-compose up -d
|
|
76
|
+
```
|
|
78
77
|
|
|
79
|
-
|
|
80
|
-
- **Board keys** — issued to human operators via the Paperclip dashboard CLI auth flow. Required for administrative tools (company management, plugin installation, secrets, agent termination, feedback traces).
|
|
78
|
+
See [`docs/guides/local-stack.md`](docs/guides/local-stack.md) for the full compose setup, volume config, and health-check instructions.
|
|
81
79
|
|
|
82
|
-
|
|
80
|
+
## Host integration
|
|
83
81
|
|
|
84
|
-
|
|
82
|
+
paperclip-mcp works with any MCP-compatible host. Platform-specific config files are in [`docs/installation/`](docs/installation/):
|
|
83
|
+
|
|
84
|
+
| Host | Guide |
|
|
85
|
+
| -------------- | ---------------------------------------------------------------------------- |
|
|
86
|
+
| Claude Code | [`docs/installation/claude-code.md`](docs/installation/claude-code.md) |
|
|
87
|
+
| Claude Desktop | [`docs/installation/claude-desktop.md`](docs/installation/claude-desktop.md) |
|
|
88
|
+
| Cursor | [`docs/installation/cursor.md`](docs/installation/cursor.md) |
|
|
89
|
+
| VS Code | [`docs/installation/vscode.md`](docs/installation/vscode.md) |
|
|
90
|
+
| Windsurf | [`docs/installation/windsurf.md`](docs/installation/windsurf.md) |
|
|
91
|
+
|
|
92
|
+
Each guide includes the exact config block, where to place it, and verification steps. Do not copy configs from this README — use the host-specific guides so you get the right file paths and format.
|
|
93
|
+
|
|
94
|
+
## Environment variables
|
|
95
|
+
|
|
96
|
+
| Variable | Required | Description |
|
|
97
|
+
| ---------------------- | -------- | ------------------------------------------------------------ |
|
|
98
|
+
| `PAPERCLIP_API_KEY` | Yes | Bearer token for API authentication |
|
|
99
|
+
| `PAPERCLIP_API_URL` | Yes | Base URL of the Paperclip API (e.g. `http://127.0.0.1:3100`) |
|
|
100
|
+
| `PAPERCLIP_AGENT_ID` | Yes | UUID of the agent running this MCP server |
|
|
101
|
+
| `PAPERCLIP_COMPANY_ID` | Yes | UUID of the company (used for company-scoped endpoints) |
|
|
102
|
+
| `PAPERCLIP_RUN_ID` | No | Heartbeat run ID — injected by Paperclip during agent runs |
|
|
103
|
+
| `PAPERCLIP_TASK_ID` | No | Task ID injected by Paperclip on @-mention wakes |
|
|
85
104
|
|
|
86
105
|
## Tool catalog
|
|
87
106
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
| Domain | Tools
|
|
91
|
-
| ----------------------- |
|
|
92
|
-
| Identity
|
|
93
|
-
| Issues |
|
|
94
|
-
| Comments | 3
|
|
95
|
-
|
|
|
96
|
-
|
|
|
97
|
-
|
|
|
98
|
-
|
|
|
99
|
-
|
|
|
100
|
-
|
|
|
101
|
-
|
|
|
102
|
-
|
|
|
103
|
-
|
|
|
104
|
-
|
|
|
105
|
-
| Companies | 5
|
|
106
|
-
| Plugins | 6
|
|
107
|
-
| Secrets | 4
|
|
108
|
-
| Run
|
|
109
|
-
| Feedback
|
|
110
|
-
| Company
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
107
|
+
<!-- TOOLS-START -->
|
|
108
|
+
|
|
109
|
+
| Domain | Tools |
|
|
110
|
+
| ----------------------- | ------- |
|
|
111
|
+
| Identity | 4 |
|
|
112
|
+
| Issues | 7 |
|
|
113
|
+
| Comments | 3 |
|
|
114
|
+
| Documents | 5 |
|
|
115
|
+
| Agents & Organization | 17 |
|
|
116
|
+
| Dashboard | 1 |
|
|
117
|
+
| Approvals | 11 |
|
|
118
|
+
| Goals | 4 |
|
|
119
|
+
| Projects & Workspaces | 8 |
|
|
120
|
+
| Activity & Costs | 5 |
|
|
121
|
+
| Routines | 9 |
|
|
122
|
+
| Attachments | 4 |
|
|
123
|
+
| Labels | 2 |
|
|
124
|
+
| Companies | 5 |
|
|
125
|
+
| Plugins | 6 |
|
|
126
|
+
| Secrets | 4 |
|
|
127
|
+
| Run Observability | 3 |
|
|
128
|
+
| Feedback Traces | 3 |
|
|
129
|
+
| Company Import / Export | 3 |
|
|
130
|
+
| **Total** | **104** |
|
|
131
|
+
|
|
132
|
+
<!-- TOOLS-END -->
|
|
133
|
+
|
|
134
|
+
Full per-tool reference: [`docs/tools/`](docs/tools/README.md). Generated from Zod schemas — run `npm run docs:generate` to refresh.
|
|
115
135
|
|
|
116
|
-
##
|
|
136
|
+
## Authentication
|
|
137
|
+
|
|
138
|
+
paperclip-mcp authenticates every request with a Bearer token derived from `PAPERCLIP_API_KEY`. The agent identity (`PAPERCLIP_AGENT_ID`) and company scope (`PAPERCLIP_COMPANY_ID`) are resolved at startup — the server will exit immediately if any required variable is missing. For details on generating API keys and scoping them to a specific agent, see [`docs/auth-keys.md`](docs/auth-keys.md).
|
|
139
|
+
|
|
140
|
+
## Run ID injection
|
|
117
141
|
|
|
118
|
-
|
|
142
|
+
When `PAPERCLIP_RUN_ID` is set, the server automatically adds `X-Paperclip-Run-Id: <runId>` to all mutating requests (POST, PATCH, PUT, DELETE). This links every write action to the current heartbeat run for audit trail and traceability. No action is needed from the agent — injection is transparent.
|
|
119
143
|
|
|
120
|
-
|
|
121
|
-
| ----------- | ------------------------------------------------- |
|
|
122
|
-
| 400 | `isError: true` with validation message |
|
|
123
|
-
| 401 / 403 | `isError: true` with auth error |
|
|
124
|
-
| 404 | `isError: true` with not-found message |
|
|
125
|
-
| 409 | `isError: true` with conflict message (no retry) |
|
|
126
|
-
| 5xx | `isError: true` with transient error + retry hint |
|
|
144
|
+
## Error handling
|
|
127
145
|
|
|
128
|
-
|
|
146
|
+
All tool handlers catch API errors and return `isError: true` results. The `content[0].text` field contains a human-readable message.
|
|
147
|
+
|
|
148
|
+
| HTTP status | Behaviour |
|
|
149
|
+
| ----------- | ------------------------------------------------ |
|
|
150
|
+
| 400 | `isError: true` with validation message |
|
|
151
|
+
| 401 / 403 | `isError: true` with auth error |
|
|
152
|
+
| 404 | `isError: true` with not-found message |
|
|
153
|
+
| 409 | `isError: true` with conflict message (no retry) |
|
|
154
|
+
| 5xx | `isError: true` with server error message |
|
|
129
155
|
|
|
130
156
|
## Architecture
|
|
131
157
|
|
|
132
|
-
|
|
133
|
-
- **Entry point:** `src/index.ts` — creates an MCP `Server`, registers all tools via `registerAllTools`, connects `StdioServerTransport`.
|
|
134
|
-
- **Client:** `src/client.ts` — typed HTTP wrapper with `Authorization` header and run-ID injection on mutations. Per-request `AbortSignal.timeout(30_000)`.
|
|
135
|
-
- **Input validation:** Zod schemas are the single source of truth. All inputs validated before reaching the API client. Unknown fields rejected (`.strict()`).
|
|
136
|
-
- **Tool descriptions:** Structured with `Args / Returns / Examples / Error Handling` sections. Board-only tools prefixed with `⚠ Board-only:`.
|
|
137
|
-
- **Pagination:** All `list_*` tools return `{ items, total, count, offset, limit, has_more }`. Default limit: 50; max: 100.
|
|
138
|
-
- **Response formatting:** Large responses are truncated at 25,000 characters with an actionable hint.
|
|
158
|
+
**Entry flow:** `src/index.ts` creates an MCP `Server`, calls `registerAllTools(server)`, then connects a `StdioServerTransport` for JSON-RPC over stdio.
|
|
139
159
|
|
|
140
|
-
|
|
160
|
+
**Key modules:**
|
|
141
161
|
|
|
142
|
-
|
|
162
|
+
- `src/client.ts` — `PaperclipClient`: typed HTTP wrapper (`get`, `post`, `patch`, `put`, `delete`). Injects `Authorization` header and `X-Paperclip-Run-Id` on mutations.
|
|
163
|
+
- `src/auth.ts` — Reads env vars at startup (fail-fast on missing required vars).
|
|
164
|
+
- `src/errors.ts` — `PaperclipApiError` for non-2xx HTTP responses.
|
|
165
|
+
- `src/types.ts` — Shared domain types.
|
|
166
|
+
- `src/tools/index.ts` — Tool registry. Collects `ToolDefinition[]` arrays from each tool module into `ALL_TOOLS`, builds a dispatch map, and registers MCP `ListTools` / `CallTool` handlers.
|
|
167
|
+
- `src/tools/validation.ts` — `validate(zodSchema, args)` helper and shared Zod schemas.
|
|
143
168
|
|
|
144
|
-
##
|
|
169
|
+
## Documentation
|
|
145
170
|
|
|
146
|
-
**
|
|
171
|
+
- **End-user** — [`docs/README.md`](docs/README.md): quickstart, auth keys, troubleshooting, cookbook, host install guides, tool reference.
|
|
172
|
+
- **Contributor** — [`CONTRIBUTING.md`](CONTRIBUTING.md): branch strategy, PR flow, dev environment, and conventions for adding new tools.
|
|
173
|
+
- **Agent-orchestration** — [`AGENTS.md`](AGENTS.md): Paperclip-orchestrated agent protocol, BMAD integration, and heartbeat model.
|
|
147
174
|
|
|
148
|
-
|
|
149
|
-
git clone https://github.com/bruhsb/paperclip-mcp.git
|
|
150
|
-
cd paperclip-mcp
|
|
151
|
-
npm install
|
|
152
|
-
```
|
|
175
|
+
## Skills
|
|
153
176
|
|
|
154
|
-
|
|
155
|
-
| --------------- | -------------------- |
|
|
156
|
-
| Build | `npm run build` |
|
|
157
|
-
| Dev (live TS) | `npm run dev` |
|
|
158
|
-
| Type-check | `npm run typecheck` |
|
|
159
|
-
| Lint | `npm run lint` |
|
|
160
|
-
| Format | `npm run format` |
|
|
161
|
-
| Run tests | `npm run test` |
|
|
162
|
-
| Check doc links | `npm run docs:check` |
|
|
177
|
+
paperclip-mcp ships public Claude Code skills under `skills/` — `paperclip-triage-inbox`, `paperclip-close-epic`, `paperclip-audit-approvals`, `paperclip-release-flow`. Copy the relevant skill directory to `~/.claude/skills/` to use it in your Claude Code session. See [`skills/README.md`](skills/README.md) for the full list and usage notes.
|
|
163
178
|
|
|
164
|
-
|
|
179
|
+
## Development
|
|
165
180
|
|
|
166
|
-
|
|
181
|
+
| Task | Command |
|
|
182
|
+
| -------------------- | ----------------------- |
|
|
183
|
+
| Build | `npm run build` |
|
|
184
|
+
| Dev (live TS) | `npm run dev` |
|
|
185
|
+
| Start (compiled) | `npm run start` |
|
|
186
|
+
| Type-check only | `npm run typecheck` |
|
|
187
|
+
| Lint | `npm run lint` |
|
|
188
|
+
| Format | `npm run format` |
|
|
189
|
+
| Format check | `npm run format:check` |
|
|
190
|
+
| Run all tests | `npm run test` |
|
|
191
|
+
| Regenerate tool docs | `npm run docs:generate` |
|
|
192
|
+
| Check doc links | `npm run docs:check` |
|
|
193
|
+
|
|
194
|
+
Branch strategy: `feature/*` → `main` (squash-merge via PR)
|
|
167
195
|
|
|
168
196
|
## Status & compatibility
|
|
169
197
|
|
|
170
|
-
| Component
|
|
171
|
-
|
|
|
172
|
-
|
|
|
173
|
-
|
|
|
174
|
-
|
|
|
175
|
-
| MCP SDK | ^1.26.0 (`@modelcontextprotocol/sdk`) |
|
|
176
|
-
|
|
177
|
-
---
|
|
198
|
+
| Component | Version |
|
|
199
|
+
| ------------------------------------------ | ------- |
|
|
200
|
+
| MCP protocol (`@modelcontextprotocol/sdk`) | 1.29.0 |
|
|
201
|
+
| Node.js (minimum) | 22 |
|
|
202
|
+
| Paperclip API | v2 |
|
|
178
203
|
|
|
179
204
|
## Releases
|
|
180
205
|
|
|
181
|
-
Releases are automated
|
|
206
|
+
Releases are automated. Squash-merge a PR to `main`; semantic-release handles version bumping, changelog generation, npm publish, and GitHub release creation. No manual publish step is needed.
|
|
207
|
+
|
|
208
|
+
To trigger a release, open a PR from your feature branch to `main`. Once merged, the `release.yml` workflow runs `npx semantic-release` automatically. The version bump is determined by the commit types since the last release:
|
|
182
209
|
|
|
183
210
|
- `fix:` commits → patch release
|
|
184
211
|
- `feat:` commits → minor release
|
|
185
|
-
- `BREAKING CHANGE:`
|
|
186
|
-
|
|
187
|
-
---
|
|
212
|
+
- `BREAKING CHANGE:` commits → major release
|
|
213
|
+
- `chore:`, `docs:`, `test:` commits → no release
|
|
188
214
|
|
|
189
215
|
## Contributing
|
|
190
216
|
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
---
|
|
217
|
+
See [`CONTRIBUTING.md`](CONTRIBUTING.md) for the full contributor guide, including how to add new tools, branch naming, commit format, and PR process.
|
|
194
218
|
|
|
195
219
|
## Security
|
|
196
220
|
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
---
|
|
221
|
+
Please report security vulnerabilities via the process described in [`SECURITY.md`](SECURITY.md). Do not open public issues for security bugs.
|
|
200
222
|
|
|
201
223
|
## Links
|
|
202
224
|
|
|
225
|
+
- [Paperclip](https://paperclip.ing) — the control plane this MCP server wraps
|
|
226
|
+
- [Model Context Protocol](https://modelcontextprotocol.io) — the open protocol standard
|
|
203
227
|
- [npm package](https://www.npmjs.com/package/paperclip-mcp)
|
|
204
|
-
- [GitHub
|
|
205
|
-
- [API coverage matrix](docs/guides/api-coverage.md)
|
|
206
|
-
- [Tool conventions guide](docs/guides/mcp-tool-conventions.md)
|
|
207
|
-
- [Paperclip](https://paperclip.ing)
|
|
208
|
-
|
|
209
|
-
---
|
|
228
|
+
- [GitHub](https://github.com/bruhsb/paperclip-mcp)
|
|
210
229
|
|
|
211
230
|
## License
|
|
212
231
|
|
|
213
|
-
|
|
232
|
+
MIT
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "paperclip-mcp",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.1.0",
|
|
4
4
|
"description": "Paperclip MCP server for Claude Code agents",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "dist/index.js",
|
|
@@ -33,13 +33,14 @@
|
|
|
33
33
|
"check:no-raw-inputschema": "node scripts/check-no-raw-inputschema.mjs",
|
|
34
34
|
"dev": "tsx src/index.ts",
|
|
35
35
|
"start": "node dist/index.js",
|
|
36
|
-
"lint": "eslint src",
|
|
37
|
-
"format": "prettier --write .",
|
|
38
|
-
"format:check": "prettier --check .",
|
|
36
|
+
"lint": "eslint --cache --cache-location .eslintcache --cache-strategy content src",
|
|
37
|
+
"format": "prettier --cache --write .",
|
|
38
|
+
"format:check": "prettier --cache --check .",
|
|
39
39
|
"typecheck": "tsc --noEmit",
|
|
40
40
|
"test": "node --import tsx/esm --test 'src/**/*.test.ts'",
|
|
41
41
|
"test:coverage": "node --import tsx/esm --experimental-test-coverage --test-coverage-lines=80 --test-coverage-branches=70 --test 'src/**/*.test.ts'",
|
|
42
42
|
"docs:check": "find docs -name '*.md' | xargs markdown-link-check -c .markdown-link-check.json",
|
|
43
|
+
"docs:generate": "tsx scripts/generate-tool-docs.ts && prettier --log-level=warn --write docs/tools/",
|
|
43
44
|
"test:functional": "node --import tsx/esm scripts/functional-test.mjs",
|
|
44
45
|
"docker:build": "podman build -t paperclip-mcp:2.0.0 -t paperclip-mcp:latest .",
|
|
45
46
|
"docker:smoke": "node scripts/smoke-docker.mjs",
|