@proof-holdings/mcp-server 1.0.0 → 1.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.
Files changed (107) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +223 -216
  3. package/dist/authBoundary.d.ts +182 -0
  4. package/dist/authBoundary.d.ts.map +1 -0
  5. package/dist/authBoundary.js +328 -0
  6. package/dist/authBoundary.js.map +1 -0
  7. package/dist/factory.d.ts +33 -0
  8. package/dist/factory.d.ts.map +1 -0
  9. package/dist/factory.js +123 -0
  10. package/dist/factory.js.map +1 -0
  11. package/dist/http.d.ts +63 -3
  12. package/dist/http.d.ts.map +1 -1
  13. package/dist/http.js +183 -4
  14. package/dist/http.js.map +1 -1
  15. package/dist/remote.d.ts +111 -0
  16. package/dist/remote.d.ts.map +1 -0
  17. package/dist/remote.js +787 -0
  18. package/dist/remote.js.map +1 -0
  19. package/dist/server.js +11 -57
  20. package/dist/server.js.map +1 -1
  21. package/dist/tools/{projects.d.ts → accounts.d.ts} +1 -1
  22. package/dist/tools/accounts.d.ts.map +1 -0
  23. package/dist/tools/accounts.js +70 -0
  24. package/dist/tools/accounts.js.map +1 -0
  25. package/dist/tools/api-keys.d.ts.map +1 -1
  26. package/dist/tools/api-keys.js +14 -5
  27. package/dist/tools/api-keys.js.map +1 -1
  28. package/dist/tools/auth-flows.d.ts +4 -0
  29. package/dist/tools/auth-flows.d.ts.map +1 -0
  30. package/dist/tools/auth-flows.js +34 -0
  31. package/dist/tools/auth-flows.js.map +1 -0
  32. package/dist/tools/authorizations.d.ts +4 -0
  33. package/dist/tools/authorizations.d.ts.map +1 -0
  34. package/dist/tools/authorizations.js +111 -0
  35. package/dist/tools/authorizations.js.map +1 -0
  36. package/dist/tools/circles.d.ts +4 -0
  37. package/dist/tools/circles.d.ts.map +1 -0
  38. package/dist/tools/circles.js +215 -0
  39. package/dist/tools/circles.js.map +1 -0
  40. package/dist/tools/confirmations.d.ts +4 -0
  41. package/dist/tools/confirmations.d.ts.map +1 -0
  42. package/dist/tools/confirmations.js +86 -0
  43. package/dist/tools/confirmations.js.map +1 -0
  44. package/dist/tools/delegation-verify-outcomes.d.ts +23 -0
  45. package/dist/tools/delegation-verify-outcomes.d.ts.map +1 -0
  46. package/dist/tools/delegation-verify-outcomes.js +51 -0
  47. package/dist/tools/delegation-verify-outcomes.js.map +1 -0
  48. package/dist/tools/delegation-verify.d.ts +24 -0
  49. package/dist/tools/delegation-verify.d.ts.map +1 -0
  50. package/dist/tools/delegation-verify.js +192 -0
  51. package/dist/tools/delegation-verify.js.map +1 -0
  52. package/dist/tools/delegations.d.ts +4 -0
  53. package/dist/tools/delegations.d.ts.map +1 -0
  54. package/dist/tools/delegations.js +84 -0
  55. package/dist/tools/delegations.js.map +1 -0
  56. package/dist/tools/domains.d.ts.map +1 -1
  57. package/dist/tools/domains.js +1 -2
  58. package/dist/tools/domains.js.map +1 -1
  59. package/dist/tools/hitl-keys.d.ts +4 -0
  60. package/dist/tools/hitl-keys.d.ts.map +1 -0
  61. package/dist/tools/hitl-keys.js +52 -0
  62. package/dist/tools/hitl-keys.js.map +1 -0
  63. package/dist/tools/hitl.d.ts +4 -0
  64. package/dist/tools/hitl.d.ts.map +1 -0
  65. package/dist/tools/hitl.js +151 -0
  66. package/dist/tools/hitl.js.map +1 -0
  67. package/dist/tools/phones.js +1 -1
  68. package/dist/tools/phones.js.map +1 -1
  69. package/dist/tools/profiles.d.ts.map +1 -1
  70. package/dist/tools/profiles.js +73 -0
  71. package/dist/tools/profiles.js.map +1 -1
  72. package/dist/tools/proof-me.d.ts +4 -0
  73. package/dist/tools/proof-me.d.ts.map +1 -0
  74. package/dist/tools/proof-me.js +107 -0
  75. package/dist/tools/proof-me.js.map +1 -0
  76. package/dist/tools/proofs.d.ts.map +1 -1
  77. package/dist/tools/proofs.js +9 -6
  78. package/dist/tools/proofs.js.map +1 -1
  79. package/dist/tools/render-auth-link.d.ts +3 -0
  80. package/dist/tools/render-auth-link.d.ts.map +1 -0
  81. package/dist/tools/render-auth-link.js +30 -0
  82. package/dist/tools/render-auth-link.js.map +1 -0
  83. package/dist/tools/sessions.js +5 -5
  84. package/dist/tools/sessions.js.map +1 -1
  85. package/dist/tools/settings.d.ts.map +1 -1
  86. package/dist/tools/settings.js +69 -0
  87. package/dist/tools/settings.js.map +1 -1
  88. package/dist/tools/twofa.d.ts.map +1 -1
  89. package/dist/tools/twofa.js +16 -3
  90. package/dist/tools/twofa.js.map +1 -1
  91. package/dist/tools/user-requests.d.ts.map +1 -1
  92. package/dist/tools/user-requests.js +1 -2
  93. package/dist/tools/user-requests.js.map +1 -1
  94. package/dist/tools/verification-requests.d.ts.map +1 -1
  95. package/dist/tools/verification-requests.js +40 -13
  96. package/dist/tools/verification-requests.js.map +1 -1
  97. package/dist/tools/verifications.d.ts.map +1 -1
  98. package/dist/tools/verifications.js +59 -12
  99. package/dist/tools/verifications.js.map +1 -1
  100. package/dist/types.d.ts +18 -0
  101. package/dist/types.d.ts.map +1 -1
  102. package/dist/types.js +114 -5
  103. package/dist/types.js.map +1 -1
  104. package/package.json +11 -5
  105. package/dist/tools/projects.d.ts.map +0 -1
  106. package/dist/tools/projects.js +0 -159
  107. package/dist/tools/projects.js.map +0 -1
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2026 Proof of Holdings
3
+ Copyright (c) 2026 proof.holdings
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,30 +1,43 @@
1
1
  # @proof-holdings/mcp-server
2
2
 
3
- MCP (Model Context Protocol) server for the [proof.holdings](https://proof.holdings) API. Exposes 118 tools for AI agents to create verifications, validate proofs, manage assets, and more.
3
+ MCP (Model Context Protocol) server for the [proof.holdings](https://proof.holdings) API. Exposes 176 tools for AI agents to create verifications, validate proofs, manage assets, and more.
4
4
 
5
- ## Installation
5
+ ## Two ways to connect
6
+
7
+ **Hosted — nothing to install.** The same tools are served over HTTP, and the client authenticates
8
+ in the browser when a tool first needs an account:
6
9
 
7
10
  ```bash
8
- npm install -g @proof-holdings/mcp-server
11
+ claude mcp add --transport http proof https://api.proof.holdings/mcp
9
12
  ```
10
13
 
11
- Or run directly with npx (no install needed):
14
+ Or as a config fragment:
15
+
16
+ ```json
17
+ { "mcpServers": { "proof": { "type": "http", "url": "https://api.proof.holdings/mcp" } } }
18
+ ```
19
+
20
+ ⚠️ **Versions before `1.1.0` predate the delegation tools and the keyless public mode** and expose
21
+ an older, smaller surface than this README describes. If a client is pinned to `1.0.0`, upgrade it
22
+ or use the hosted server above. `GET /api/v1/mcp/connect` always serves the current instructions.
23
+
24
+ **Local — this package.** Installs and runs as a stdio server:
12
25
 
13
26
  ```bash
14
- npx @proof-holdings/mcp-server
27
+ npm install -g @proof-holdings/mcp-server
15
28
  ```
16
29
 
17
- Or run with Docker:
30
+ Or run directly with npx (no install needed):
18
31
 
19
32
  ```bash
20
- docker run -i --rm -e PROOF_API_KEY=pk_live_xxx ghcr.io/proofholdings/mcp-server
33
+ npx @proof-holdings/mcp-server
21
34
  ```
22
35
 
23
36
  ## Configuration
24
37
 
25
38
  | Variable | Required | Default | Description |
26
39
  |---|---|---|---|
27
- | `PROOF_API_KEY` | Yes | — | API key (`pk_live_...` or `pk_test_...`) |
40
+ | `PROOF_API_KEY` | No | — | API key (`pk_live_...` or `pk_test_...`). Without it the server still starts in **public mode**: the keyless tools (account bootstrap, login, proof and delegation verification) work, and every other tool answers `api_key_required`. |
28
41
  | `PROOF_BASE_URL` | No | `https://api.proof.holdings` | API base URL |
29
42
 
30
43
  Get your API key from the [proof.holdings dashboard](https://proof.holdings/dashboard/api-keys).
@@ -57,282 +70,276 @@ Config file location by client:
57
70
  | Claude Code | Run `claude mcp add proof-holdings -- npx -y @proof-holdings/mcp-server` |
58
71
  | Windsurf | `~/.codeium/windsurf/mcp_config.json` |
59
72
 
60
- ### Windsurf
61
-
62
- Add to `~/.codeium/windsurf/mcp_config.json`:
63
-
64
- ```json
65
- {
66
- "mcpServers": {
67
- "proof-holdings": {
68
- "command": "npx",
69
- "args": ["-y", "@proof-holdings/mcp-server"],
70
- "env": {
71
- "PROOF_API_KEY": "pk_live_your_key_here"
72
- }
73
- }
74
- }
75
- }
76
- ```
77
-
78
- ### Docker
79
-
80
- Use Docker if you prefer not to install Node.js:
81
-
82
- ```json
83
- {
84
- "mcpServers": {
85
- "proof-holdings": {
86
- "command": "docker",
87
- "args": [
88
- "run", "-i", "--rm",
89
- "-e", "PROOF_API_KEY=pk_live_your_key_here",
90
- "ghcr.io/proofholdings/mcp-server"
91
- ]
92
- }
93
- }
94
- }
95
- ```
96
-
97
73
  If installed globally (`npm install -g @proof-holdings/mcp-server`), use `"command": "proof-mcp"` and remove the `"args"` field.
98
74
 
99
- ## Tools (118)
75
+ ## Tools (176 tools)
100
76
 
101
- ### Verifications (12)
77
+ Group totals are exact. The tables name the tools you are most likely to reach for rather than all
78
+ of them — your MCP client's own `tools/list` is the complete, current list, and it is the one this
79
+ server answers from.
102
80
 
103
- | Tool | Description |
104
- |---|---|
105
- | `create_verification` | Create a new verification |
106
- | `get_verification` | Get a verification by ID |
107
- | `list_verifications` | List verifications with optional filters |
108
- | `trigger_verification` | Trigger a DNS/HTTP verification check |
109
- | `submit_verification_code` | Submit an OTP/challenge code |
110
- | `resend_verification` | Resend a verification (email channel) |
111
- | `test_verify` | Auto-complete a verification (test mode only) |
112
- | `list_verified_users` | List verified users grouped by external user ID |
113
- | `get_verified_user` | Get a verified user's verifications |
114
- | `start_domain_verification` | Start a B2B domain verification |
115
- | `check_domain_verification` | Check a pending domain verification |
116
- | `wait_for_verification` | Poll until verification reaches terminal state |
117
-
118
- ### Verification Requests (6)
81
+ ### Verifications & requests (28 tools)
119
82
 
120
83
  | Tool | Description |
121
84
  |---|---|
122
- | `create_verification_request` | Create a multi-asset verification request |
123
- | `get_verification_request` | Get a verification request by ID |
124
- | `list_verification_requests` | List verification requests |
125
- | `get_request_by_reference` | Get a verification request by reference ID |
126
- | `cancel_verification_request` | Cancel a pending verification request |
127
- | `wait_for_request` | Poll until request reaches terminal state |
85
+ | `create_verification` | Create a verification challenge |
86
+ | `get_verification` | Get verification status |
87
+ | `submit_verification_code` | Submit a verification code |
88
+ | `trigger_verification` | Trigger a verification check |
89
+ | `wait_for_verification` | Poll until it completes |
90
+ | `create_multi_channel_verification` | One phone, up to three channels, first completion wins |
91
+ | `create_verification_request` | Create a multi-asset request |
92
+ | `get_request_by_reference` | Look a request up by reference id |
128
93
 
129
- ### Proofs (4)
94
+ ### Domains & DNS (23 tools)
130
95
 
131
96
  | Tool | Description |
132
97
  |---|---|
133
- | `validate_proof` | Validate a proof token (checks revocation) |
134
- | `get_proof_status` | Get proof status by verification ID |
135
- | `revoke_proof` | Revoke a proof by verification ID |
136
- | `list_revoked_proofs` | Get the revocation list |
98
+ | `add_domain` | Add a domain to verify |
99
+ | `verify_domain` | Check the challenge record and mint the proof |
100
+ | `connect_cloudflare` | Connect Cloudflare so records are written for you |
101
+ | `verify_domain_with_credentials` | Prove control using stored credentials |
102
+ | `setup_domain_email` | Set up sending from the domain |
137
103
 
138
- ### Sessions (3)
104
+ ### Account, settings & billing (37 tools)
139
105
 
140
106
  | Tool | Description |
141
107
  |---|---|
142
- | `create_session` | Create a phone verification session |
143
- | `get_session` | Get session status by ID |
144
- | `wait_for_session` | Poll until session reaches terminal state |
108
+ | `get_platform_summary` | One-call snapshot of the account |
109
+ | `get_usage` | Quota and usage for the period |
110
+ | `search` | Search across the account |
111
+ | `create_account` | Bootstrap a new account (no key needed) |
112
+ | `create_api_key` | Create a scoped API key |
113
+ | `list_assets` | List verified assets and their proof handles |
145
114
 
146
- ### Assets (3)
115
+ ### HITL approvals & consent (22 tools)
147
116
 
148
117
  | Tool | Description |
149
118
  |---|---|
150
- | `list_assets` | List verified assets |
151
- | `get_asset` | Get an asset by ID |
152
- | `revoke_asset` | Revoke a verified asset |
119
+ | `create_hitl` | Create a human-approval configuration |
120
+ | `create_confirmation` | Send an approval request to a person |
121
+ | `wait_for_confirmation` | Poll until a person approves or denies |
122
+ | `create_authorization` | Ask a person to consent to being contacted |
123
+ | `revoke_authorization` | Withdraw a consent |
153
124
 
154
- ### Auth (3)
125
+ ### Circles & Proof of Me (20 tools)
155
126
 
156
127
  | Tool | Description |
157
128
  |---|---|
158
- | `get_current_user` | Get the current authenticated user |
159
- | `list_auth_sessions` | List active auth sessions |
160
- | `revoke_auth_session` | Revoke an auth session |
129
+ | `create_circle` | Create a circle of trusted contacts |
130
+ | `add_circle_member` | Add a contact |
131
+ | `invite_circle_member` | Send a single-use enrollment link |
132
+ | `create_identity_challenge` | Run a cross-channel identity check |
161
133
 
162
- ### Settings (4)
134
+ ### Public profiles (16 tools)
163
135
 
164
136
  | Tool | Description |
165
137
  |---|---|
166
- | `get_usage` | Get API usage stats |
167
- | `get_settings` | Get account settings |
168
- | `update_settings` | Update account settings |
169
- | `export_data` | Export account data |
138
+ | `create_profile` | Create a public profile |
139
+ | `claim_username` | Claim a public username |
140
+ | `update_public_proofs` | Choose which proofs a profile shows |
170
141
 
171
- ### Templates (7)
142
+ ### Templates & webhooks (11 tools)
172
143
 
173
144
  | Tool | Description |
174
145
  |---|---|
175
146
  | `list_templates` | List message templates |
176
- | `get_default_templates` | Get default templates |
177
- | `get_template` | Get a template by channel and type |
178
- | `update_template` | Update a template |
179
- | `delete_template` | Delete a custom template |
180
- | `preview_template` | Preview a rendered template |
181
147
  | `render_template` | Render a template with variables |
148
+ | `list_webhook_deliveries` | List webhook deliveries |
149
+ | `retry_webhook_delivery` | Retry a failed delivery |
182
150
 
183
- ### Webhook Deliveries (4)
151
+ ### Delegations & proofs (10 tools)
184
152
 
185
153
  | Tool | Description |
186
154
  |---|---|
187
- | `get_webhook_stats` | Get webhook delivery stats |
188
- | `list_webhook_deliveries` | List webhook deliveries |
189
- | `get_webhook_delivery` | Get a webhook delivery by ID |
190
- | `retry_webhook_delivery` | Retry a failed webhook delivery |
155
+ | `create_delegation` | Authorize an artifact from a domain you have proven |
156
+ | `revoke_delegation` | Revoke a delegation |
157
+ | `verify_delegation` | Check whether an artifact is authorized by the domain it claims |
158
+ | `validate_proof` | Verify a signed proof token (no key needed) |
159
+ | `get_proof_status` | Read a proof's status by its public handle |
160
+ | `list_revoked_proofs` | Read the revocation list (no key needed) |
191
161
 
192
- ### Billing (1)
162
+ ### Sign-in & sessions (9 tools)
193
163
 
194
164
  | Tool | Description |
195
165
  |---|---|
196
- | `get_subscription` | Get subscription details |
166
+ | `start_login` | Begin a sign-in (no key needed) |
167
+ | `wait_for_login` | Poll until sign-in completes |
168
+ | `get_current_user` | Who the current session belongs to |
169
+ | `render_auth_link` | Render a sign-in link for the user to open |
197
170
 
198
- ### Projects (9)
171
+ ## Test Mode
199
172
 
200
- | Tool | Description |
201
- |---|---|
202
- | `list_projects` | List projects |
203
- | `create_project` | Create a project |
204
- | `get_project` | Get a project by ID |
205
- | `update_project` | Update a project |
206
- | `delete_project` | Delete a project |
207
- | `list_project_templates` | List project templates |
208
- | `update_project_template` | Update a project template |
209
- | `delete_project_template` | Delete a project template |
210
- | `preview_project_template` | Preview a project template |
211
-
212
- ### Profiles (10)
173
+ Use a test-mode API key (`pk_test_*`) to interact with the API without creating real verifications. Test-mode keys are available in your [dashboard](https://proof.holdings/dashboard/api-keys).
213
174
 
214
- | Tool | Description |
215
- |---|---|
216
- | `list_profiles` | List profiles |
217
- | `create_profile` | Create a profile |
218
- | `get_profile` | Get a profile by ID |
219
- | `update_profile` | Update a profile |
220
- | `delete_profile` | Delete a profile |
221
- | `set_primary_profile` | Set a profile as primary |
222
- | `update_profile_proofs` | Update profile proofs |
223
- | `get_my_profile` | Get your public profile |
224
- | `update_my_profile` | Update your public profile |
225
- | `get_profile_assets` | Get profile assets |
226
-
227
- ### Emails (7)
175
+ ## Transport
228
176
 
229
- | Tool | Description |
230
- |---|---|
231
- | `list_emails` | List email addresses |
232
- | `remove_email` | Remove an email address |
233
- | `set_primary_email` | Set an email as primary |
234
- | `start_add_email` | Start adding a new email |
235
- | `get_add_email_status` | Get email addition status |
236
- | `verify_email_otp` | Verify email OTP code |
237
- | `resend_email_otp` | Resend email OTP code |
177
+ Two transports ship in this package:
178
+
179
+ - **stdio** (default, `mcp-server` / `proof-mcp`) — the server communicates over stdin/stdout. One
180
+ user per process; this is what a client launches locally.
181
+ - **Streamable HTTP** (`node dist/remote.js`) — a remote server that many users connect to over the
182
+ network by URL, with no install. A connection starts ANONYMOUS — the keyless surface (account
183
+ bootstrap, login, proof and delegation verification) works with no credential at all — and a tool
184
+ that needs an account answers `401` with a `WWW-Authenticate` challenge naming the authorization
185
+ server, which is what a standards-compliant client follows to sign in. The 401 lands on the TOOL
186
+ CALL and never on a bare `initialize` or `tools/list` FOR AN ANONYMOUS CONNECTION: measured
187
+ against live clients, refusing an anonymous handshake reads to the user as a connection timeout
188
+ rather than as an invitation to log in. Three shapes are refused at the handshake instead — a
189
+ presented token that does not resolve (there the 401 is what makes a client refresh), a request
190
+ whose credential does not match the session it names, and an opening batch that smuggles a keyed
191
+ tool call alongside `initialize`. A
192
+ signed-in client sends the API key it was granted in the `Authorization` header — the only place a
193
+ credential is read, never a query parameter — and each connection gets its own server and HTTP
194
+ client, so one user's key or session can never reach another. `PORT` (default 3100),
195
+ `MCP_MAX_SESSIONS` (default 100), `MCP_SESSION_TTL_MS` (default 30 min, counted from the last POST
196
+ the server ACCEPTED — one it answered below 400. A POST refused before any work happens does not
197
+ postpone it, whether the refusal is ours (body over 4MB) or the transport's (unparseable or empty
198
+ body, unsupported `mcp-protocol-version`, a second `initialize`); and an open event stream is a
199
+ connection, not activity, so a session whose only traffic is that stream ages out. **The official
200
+ client does not recover from this on its
201
+ own**: measured against SDK 1.27.1, the stream's reconnect gives up after two attempts and the
202
+ next tool call fails with `unknown_session` until the host reconnects the server. Size the TTL
203
+ with that in mind — it is a memory bound paid for in reconnects, not a transparent one);
204
+ `/healthz` reports the live session count.
205
+
206
+ ## Delegation (`_meta`)
207
+
208
+ The server card (`server.json`) can carry a **Proof of Delegation** publication under the
209
+ namespaced `_meta` key `holdings.proof/delegation`:
238
210
 
239
- ### Phones (5)
211
+ ```json
212
+ {
213
+ "_meta": {
214
+ "holdings.proof/delegation": { "token": "<delegation JWT>" }
215
+ }
216
+ }
217
+ ```
240
218
 
241
- | Tool | Description |
242
- |---|---|
243
- | `list_phones` | List phone numbers |
244
- | `remove_phone` | Remove a phone number |
245
- | `set_primary_phone` | Set a phone as primary |
246
- | `start_add_phone` | Start adding a new phone |
247
- | `get_add_phone_status` | Get phone addition status |
219
+ The token is an ES256 JWT minted by [proof.holdings](https://proof.holdings) attesting exactly
220
+ one thing: **the controller of the `principal` domain authorized the `delegate` artifact for the
221
+ listed scopes.** It is not a statement that the server is safe, audited, or endorsed. A verifier
222
+ checks the signature against the issuer JWKS, then compares `principal` and `delegate` to facts
223
+ it resolved itself — a token copied into another package fails that comparison, because its
224
+ `delegate` names the genuine artifact. Details: [Delegations — API reference](https://proof.holdings/docs/api#delegations).
248
225
 
249
- ### API Keys (4)
226
+ When the card is published through the official MCP registry, the same entry is nested under
227
+ `_meta["io.modelcontextprotocol.registry/publisher-provided"]` — readers should check both
228
+ locations.
250
229
 
251
- | Tool | Description |
252
- |---|---|
253
- | `list_api_keys` | List API keys |
254
- | `create_api_key` | Create an API key (2FA required) |
255
- | `revoke_api_key` | Revoke an API key (2FA required) |
256
- | `regenerate_api_key` | Regenerate an API key (2FA required) |
230
+ Maintainers: the entry is written by the fail-closed publish tool, never by hand — from the
231
+ repository root, after the delegation is minted for `pkg:npm/@proof-holdings/mcp-server`:
257
232
 
258
- ### 2FA (4)
233
+ ```bash
234
+ npm run delegation:publish -- --target mcp --token <jwt>
235
+ # or mint + publish in one step (needs PROOF_API_KEY):
236
+ npm run delegation:publish -- --target mcp --mint \
237
+ --control-proof ph_ctl_<32hex> --scope proof-verification
238
+ ```
259
239
 
260
- | Tool | Description |
261
- |---|---|
262
- | `start_2fa` | Start a 2FA challenge |
263
- | `get_2fa_status` | Get 2FA session status |
264
- | `verify_2fa` | Verify a 2FA code |
265
- | `verify_2fa_magic_link` | Verify via 2FA magic link |
240
+ The tool refuses any token whose claims do not name this exact package with
241
+ `principal: proof.holdings` (the same check `--target a2a` performs against the A2A agent
242
+ card's own `url` before regenerating `/.well-known/agent-card.json`). For `--target a2a`,
243
+ if the card-regeneration step fails after the source file is written, just re-run the
244
+ command — the token is already validated and the regeneration is idempotent.
266
245
 
267
- ### Domains (17)
246
+ ### Verifying someone else's delegation (`verify_delegation`)
268
247
 
269
- | Tool | Description |
270
- |---|---|
271
- | `list_domains` | List domains |
272
- | `add_domain` | Add a domain |
273
- | `get_domain` | Get a domain by ID |
274
- | `delete_domain` | Delete a domain |
275
- | `verify_domain` | Verify a domain (DNS check) |
276
- | `connect_cloudflare` | Connect domain via Cloudflare |
277
- | `connect_godaddy` | Connect domain via GoDaddy |
278
- | `connect_dns_provider` | Connect domain via DNS provider |
279
- | `add_verification_provider` | Add a verification provider to a domain |
280
- | `get_dns_providers` | Get available DNS providers |
281
- | `verify_domain_with_credentials` | Verify domain with stored credentials |
282
- | `check_domain_credentials` | Check domain credential status |
283
- | `start_domain_email_verification` | Start domain email verification |
284
- | `confirm_domain_email_code` | Confirm domain email verification code |
285
- | `resend_domain_email` | Resend domain verification email |
286
- | `setup_domain_email` | Set up domain email forwarding |
287
- | `check_domain_email_status` | Check domain email setup status |
288
-
289
- ### DNS Credentials (3)
248
+ This server also **checks** delegations, not just publishes one. The `verify_delegation` tool
249
+ runs the reference verifier ([`@proof-holdings/delegation-verifier`](https://github.com/ProofHoldings/delegation-verifier))
250
+ over another server's card and needs **no API key** — verification runs against public surfaces
251
+ only.
290
252
 
291
- | Tool | Description |
292
- |---|---|
293
- | `list_dns_credentials` | List stored DNS credentials |
294
- | `create_dns_credential` | Store DNS provider credentials |
295
- | `delete_dns_credential` | Delete stored DNS credentials |
253
+ ```jsonc
254
+ {
255
+ "card": { /* the MCP server.json or A2A agent card you fetched */ },
256
+ "delegate": { "type": "purl", "value": "pkg:npm/postmark-mcp" },
257
+ "expected_principal": "postmarkapp.com"
258
+ }
259
+ ```
296
260
 
297
- ### User Requests (7)
261
+ Both pins are **required**, and they close different attacks:
298
262
 
299
- | Tool | Description |
300
- |---|---|
301
- | `list_my_requests` | List your verification requests |
302
- | `list_incoming_requests` | List incoming verification requests |
303
- | `create_user_request` | Create a verification request |
304
- | `claim_request_assets` | Claim assets from a completed request |
305
- | `cancel_user_request` | Cancel a verification request |
306
- | `extend_request` | Extend a request expiration |
307
- | `share_request_email` | Share a request via email |
263
+ - `delegate` must be the artifact identity **you** resolved — the package you are about to
264
+ install, the endpoint you are about to call. Never copy it out of the card being checked: a
265
+ published token is a bearer artifact, so comparing it against a field of the same card would
266
+ bless a token pasted in from somewhere else.
267
+ - `expected_principal` is the domain you expect to stand behind it. An issuer binds the
268
+ artifact to nothing, so any domain owner can mint a genuine, signature-valid delegation
269
+ naming someone else's package. Without this pin a verdict would only mean "some domain
270
+ claims this".
308
271
 
309
- ### User Domain Verify (3)
272
+ ### Re-checking everything you already trust (`verify_delegations`)
310
273
 
311
- | Tool | Description |
312
- |---|---|
313
- | `start_user_domain_verification` | Start a user domain verification |
314
- | `get_user_domain_verification_status` | Get domain verification status |
315
- | `check_user_domain_verification` | Check domain verification result |
274
+ `verify_delegation` answers "is this one good, right now, because you asked". If an agent has
275
+ already resolved and verified thirty-five artifacts, re-verifying them one call at a time does
276
+ not scale — `verify_delegations` batch-checks up to 50 in a single call, also with **no API key**.
316
277
 
317
- ### Public Profiles (2)
278
+ ```jsonc
279
+ {
280
+ "items": [
281
+ { "card": { /* ... */ }, "delegate": { "type": "purl", "value": "pkg:npm/postmark-mcp" }, "expected_principal": "postmarkapp.com" },
282
+ { "token": "<jwt>", "delegate": { "type": "url", "value": "https://example.com/mcp" }, "expected_principal": "example.com" }
283
+ ]
284
+ }
285
+ ```
318
286
 
319
- | Tool | Description |
320
- |---|---|
321
- | `claim_username` | Claim a public profile username |
322
- | `update_public_proofs` | Update public proof display |
287
+ Each item takes exactly the shape `verify_delegation` requires (`card` XOR `token`, `delegate`,
288
+ `expected_principal`, optional `required_scopes`) and is verified **independently** — no
289
+ cross-item state, nothing persisted, and one item failing never affects another item's result.
290
+ Revocation is always checked (there is no `check_status: false` on this tool — the entire point
291
+ of a batch re-check is to see what changed).
323
292
 
324
- ## Test Mode
293
+ **Two things this tool deliberately does NOT do:**
325
294
 
326
- Use a test-mode API key (`pk_test_*`) to interact with the API without creating real verifications. Test-mode keys are available in your [dashboard](https://proof.holdings/dashboard/api-keys).
295
+ - **It does not discover what you have installed.** You must already hold each artifact's
296
+ `card` or `token`. It has no DNS-pointer resolution and fetches no caller-supplied URL —
297
+ the same trust boundary `verify_delegation` already draws, kept narrow on purpose (see
298
+ `src/services/delegationPointer/resolve.ts`'s documented gaps in the main repository, which
299
+ this tool stays outside of).
300
+ - **It does not run continuously.** Each call is a single point-in-time check. There is no
301
+ cadence, no scheduler, no push notification — call it again whenever you want a fresh answer.
327
302
 
328
- ## Transport
303
+ Each result in `results[]` carries an `outcome`, one of four buckets:
304
+
305
+ | Outcome | Meaning |
306
+ | --- | --- |
307
+ | `confirmed_valid` | The delegation verified — same meaning as `verify_delegation`'s `verified: true`. |
308
+ | `confirmed_invalid` | A genuine negative verdict: revoked, suspended, expired, a mismatched principal or delegate, an ungranted scope, or a malformed/untrusted/badly-signed token. |
309
+ | `no_claim_found` | The artifact publishes no delegation at all. An absence, never an accusation. |
310
+ | `unconfirmed` | We could not reach the issuer or otherwise get a confident answer right now (e.g. its JWKS or status endpoint is unreachable). **Never treat this as a bad verdict** — it means "ask again later", not "revoked". |
311
+
312
+ A result also carries `checked_at` — the ISO timestamp of the moment **that item's own check**
313
+ completed, not one timestamp shared across the whole call — so "established locally" is never
314
+ presented as "established by reaching us, at this moment" without saying which.
315
+
316
+ ### ⚠️ Release order (maintainers)
317
+
318
+ `package.json` declares `@proof-holdings/delegation-verifier` as a **runtime** dependency, so the
319
+ range it names has to be resolvable on the registry before this package is uploaded:
320
+
321
+ **`@proof-holdings/delegation-verifier` is published BEFORE `@proof-holdings/mcp-server`, on every
322
+ release that moves the range.** This server is launched via `npx` by every documented client, so a
323
+ release whose dependency the registry cannot resolve makes `npx @proof-holdings/mcp-server` fail
324
+ with E404 for everyone until the verifier lands. A run of
325
+ `.github/workflows/publish-packages.yml` with `target: all` enforces the order by its step order;
326
+ a publish by hand from a terminal has nothing enforcing it but `docs/runbooks/npm-release.md`.
327
+
328
+ Working on the verifier and the server together does not need a publish. Link the sibling instead:
329
+
330
+ ```bash
331
+ npm run verifier:link # cd mcp && npm install ../packages/delegation-verifier --no-save
332
+ ```
329
333
 
330
- Stdio only. The server communicates over stdin/stdout using the MCP protocol.
334
+ The test suite needs no link at all: it resolves the verifier's SOURCE through a vitest alias
335
+ rather than `node_modules`, so it is green on a fresh clone and picks up an uncommitted verifier
336
+ change without a build.
331
337
 
332
338
  ## Requirements
333
339
 
334
340
  - Node.js >= 18.0.0
335
- - A proof.holdings API key
341
+ - A proof.holdings API key for the keyed tools. The server starts and answers the keyless ones
342
+ without it — see Configuration above.
336
343
 
337
344
  ## Links
338
345