@proof-holdings/mcp-server 1.0.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/LICENSE +21 -0
- package/README.md +345 -0
- package/dist/http.d.ts +34 -0
- package/dist/http.d.ts.map +1 -0
- package/dist/http.js +117 -0
- package/dist/http.js.map +1 -0
- package/dist/server.d.ts +3 -0
- package/dist/server.d.ts.map +1 -0
- package/dist/server.js +76 -0
- package/dist/server.js.map +1 -0
- package/dist/tools/api-keys.d.ts +4 -0
- package/dist/tools/api-keys.d.ts.map +1 -0
- package/dist/tools/api-keys.js +71 -0
- package/dist/tools/api-keys.js.map +1 -0
- package/dist/tools/assets.d.ts +4 -0
- package/dist/tools/assets.d.ts.map +1 -0
- package/dist/tools/assets.js +57 -0
- package/dist/tools/assets.js.map +1 -0
- package/dist/tools/auth.d.ts +4 -0
- package/dist/tools/auth.d.ts.map +1 -0
- package/dist/tools/auth.js +41 -0
- package/dist/tools/auth.js.map +1 -0
- package/dist/tools/billing.d.ts +4 -0
- package/dist/tools/billing.d.ts.map +1 -0
- package/dist/tools/billing.js +16 -0
- package/dist/tools/billing.js.map +1 -0
- package/dist/tools/dns-credentials.d.ts +4 -0
- package/dist/tools/dns-credentials.d.ts.map +1 -0
- package/dist/tools/dns-credentials.js +44 -0
- package/dist/tools/dns-credentials.js.map +1 -0
- package/dist/tools/domains.d.ts +4 -0
- package/dist/tools/domains.d.ts.map +1 -0
- package/dist/tools/domains.js +235 -0
- package/dist/tools/domains.js.map +1 -0
- package/dist/tools/emails.d.ts +4 -0
- package/dist/tools/emails.d.ts.map +1 -0
- package/dist/tools/emails.js +96 -0
- package/dist/tools/emails.js.map +1 -0
- package/dist/tools/phones.d.ts +4 -0
- package/dist/tools/phones.d.ts.map +1 -0
- package/dist/tools/phones.js +69 -0
- package/dist/tools/phones.js.map +1 -0
- package/dist/tools/profiles.d.ts +4 -0
- package/dist/tools/profiles.d.ts.map +1 -0
- package/dist/tools/profiles.js +183 -0
- package/dist/tools/profiles.js.map +1 -0
- package/dist/tools/projects.d.ts +4 -0
- package/dist/tools/projects.d.ts.map +1 -0
- package/dist/tools/projects.js +159 -0
- package/dist/tools/projects.js.map +1 -0
- package/dist/tools/proofs.d.ts +4 -0
- package/dist/tools/proofs.d.ts.map +1 -0
- package/dist/tools/proofs.js +60 -0
- package/dist/tools/proofs.js.map +1 -0
- package/dist/tools/public-profiles.d.ts +4 -0
- package/dist/tools/public-profiles.d.ts.map +1 -0
- package/dist/tools/public-profiles.js +38 -0
- package/dist/tools/public-profiles.js.map +1 -0
- package/dist/tools/sessions.d.ts +4 -0
- package/dist/tools/sessions.d.ts.map +1 -0
- package/dist/tools/sessions.js +50 -0
- package/dist/tools/sessions.js.map +1 -0
- package/dist/tools/settings.d.ts +4 -0
- package/dist/tools/settings.d.ts.map +1 -0
- package/dist/tools/settings.js +66 -0
- package/dist/tools/settings.js.map +1 -0
- package/dist/tools/templates.d.ts +4 -0
- package/dist/tools/templates.d.ts.map +1 -0
- package/dist/tools/templates.js +115 -0
- package/dist/tools/templates.js.map +1 -0
- package/dist/tools/twofa.d.ts +4 -0
- package/dist/tools/twofa.d.ts.map +1 -0
- package/dist/tools/twofa.js +71 -0
- package/dist/tools/twofa.js.map +1 -0
- package/dist/tools/user-domain-verify.d.ts +4 -0
- package/dist/tools/user-domain-verify.d.ts.map +1 -0
- package/dist/tools/user-domain-verify.js +46 -0
- package/dist/tools/user-domain-verify.js.map +1 -0
- package/dist/tools/user-requests.d.ts +4 -0
- package/dist/tools/user-requests.d.ts.map +1 -0
- package/dist/tools/user-requests.js +103 -0
- package/dist/tools/user-requests.js.map +1 -0
- package/dist/tools/verification-requests.d.ts +4 -0
- package/dist/tools/verification-requests.d.ts.map +1 -0
- package/dist/tools/verification-requests.js +101 -0
- package/dist/tools/verification-requests.js.map +1 -0
- package/dist/tools/verifications.d.ts +4 -0
- package/dist/tools/verifications.d.ts.map +1 -0
- package/dist/tools/verifications.js +191 -0
- package/dist/tools/verifications.js.map +1 -0
- package/dist/tools/webhook-deliveries.d.ts +4 -0
- package/dist/tools/webhook-deliveries.d.ts.map +1 -0
- package/dist/tools/webhook-deliveries.js +68 -0
- package/dist/tools/webhook-deliveries.js.map +1 -0
- package/dist/types.d.ts +24 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +35 -0
- package/dist/types.js.map +1 -0
- package/package.json +57 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Proof of Holdings
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,345 @@
|
|
|
1
|
+
# @proof-holdings/mcp-server
|
|
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.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install -g @proof-holdings/mcp-server
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
Or run directly with npx (no install needed):
|
|
12
|
+
|
|
13
|
+
```bash
|
|
14
|
+
npx @proof-holdings/mcp-server
|
|
15
|
+
```
|
|
16
|
+
|
|
17
|
+
Or run with Docker:
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
docker run -i --rm -e PROOF_API_KEY=pk_live_xxx ghcr.io/proofholdings/mcp-server
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Configuration
|
|
24
|
+
|
|
25
|
+
| Variable | Required | Default | Description |
|
|
26
|
+
|---|---|---|---|
|
|
27
|
+
| `PROOF_API_KEY` | Yes | — | API key (`pk_live_...` or `pk_test_...`) |
|
|
28
|
+
| `PROOF_BASE_URL` | No | `https://api.proof.holdings` | API base URL |
|
|
29
|
+
|
|
30
|
+
Get your API key from the [proof.holdings dashboard](https://proof.holdings/dashboard/api-keys).
|
|
31
|
+
|
|
32
|
+
## Client Setup
|
|
33
|
+
|
|
34
|
+
Add the following to your MCP client config file:
|
|
35
|
+
|
|
36
|
+
```json
|
|
37
|
+
{
|
|
38
|
+
"mcpServers": {
|
|
39
|
+
"proof-holdings": {
|
|
40
|
+
"command": "npx",
|
|
41
|
+
"args": ["-y", "@proof-holdings/mcp-server"],
|
|
42
|
+
"env": {
|
|
43
|
+
"PROOF_API_KEY": "pk_live_your_key_here"
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
Config file location by client:
|
|
51
|
+
|
|
52
|
+
| Client | Config file |
|
|
53
|
+
|---|---|
|
|
54
|
+
| Claude Desktop (macOS) | `~/Library/Application Support/Claude/claude_desktop_config.json` |
|
|
55
|
+
| Claude Desktop (Windows) | `%APPDATA%\Claude\claude_desktop_config.json` |
|
|
56
|
+
| Cursor | `.cursor/mcp.json` in your project root |
|
|
57
|
+
| Claude Code | Run `claude mcp add proof-holdings -- npx -y @proof-holdings/mcp-server` |
|
|
58
|
+
| Windsurf | `~/.codeium/windsurf/mcp_config.json` |
|
|
59
|
+
|
|
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
|
+
If installed globally (`npm install -g @proof-holdings/mcp-server`), use `"command": "proof-mcp"` and remove the `"args"` field.
|
|
98
|
+
|
|
99
|
+
## Tools (118)
|
|
100
|
+
|
|
101
|
+
### Verifications (12)
|
|
102
|
+
|
|
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)
|
|
119
|
+
|
|
120
|
+
| Tool | Description |
|
|
121
|
+
|---|---|
|
|
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 |
|
|
128
|
+
|
|
129
|
+
### Proofs (4)
|
|
130
|
+
|
|
131
|
+
| Tool | Description |
|
|
132
|
+
|---|---|
|
|
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 |
|
|
137
|
+
|
|
138
|
+
### Sessions (3)
|
|
139
|
+
|
|
140
|
+
| Tool | Description |
|
|
141
|
+
|---|---|
|
|
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 |
|
|
145
|
+
|
|
146
|
+
### Assets (3)
|
|
147
|
+
|
|
148
|
+
| Tool | Description |
|
|
149
|
+
|---|---|
|
|
150
|
+
| `list_assets` | List verified assets |
|
|
151
|
+
| `get_asset` | Get an asset by ID |
|
|
152
|
+
| `revoke_asset` | Revoke a verified asset |
|
|
153
|
+
|
|
154
|
+
### Auth (3)
|
|
155
|
+
|
|
156
|
+
| Tool | Description |
|
|
157
|
+
|---|---|
|
|
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 |
|
|
161
|
+
|
|
162
|
+
### Settings (4)
|
|
163
|
+
|
|
164
|
+
| Tool | Description |
|
|
165
|
+
|---|---|
|
|
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 |
|
|
170
|
+
|
|
171
|
+
### Templates (7)
|
|
172
|
+
|
|
173
|
+
| Tool | Description |
|
|
174
|
+
|---|---|
|
|
175
|
+
| `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
|
+
| `render_template` | Render a template with variables |
|
|
182
|
+
|
|
183
|
+
### Webhook Deliveries (4)
|
|
184
|
+
|
|
185
|
+
| Tool | Description |
|
|
186
|
+
|---|---|
|
|
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 |
|
|
191
|
+
|
|
192
|
+
### Billing (1)
|
|
193
|
+
|
|
194
|
+
| Tool | Description |
|
|
195
|
+
|---|---|
|
|
196
|
+
| `get_subscription` | Get subscription details |
|
|
197
|
+
|
|
198
|
+
### Projects (9)
|
|
199
|
+
|
|
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)
|
|
213
|
+
|
|
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)
|
|
228
|
+
|
|
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 |
|
|
238
|
+
|
|
239
|
+
### Phones (5)
|
|
240
|
+
|
|
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 |
|
|
248
|
+
|
|
249
|
+
### API Keys (4)
|
|
250
|
+
|
|
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) |
|
|
257
|
+
|
|
258
|
+
### 2FA (4)
|
|
259
|
+
|
|
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 |
|
|
266
|
+
|
|
267
|
+
### Domains (17)
|
|
268
|
+
|
|
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)
|
|
290
|
+
|
|
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 |
|
|
296
|
+
|
|
297
|
+
### User Requests (7)
|
|
298
|
+
|
|
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 |
|
|
308
|
+
|
|
309
|
+
### User Domain Verify (3)
|
|
310
|
+
|
|
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 |
|
|
316
|
+
|
|
317
|
+
### Public Profiles (2)
|
|
318
|
+
|
|
319
|
+
| Tool | Description |
|
|
320
|
+
|---|---|
|
|
321
|
+
| `claim_username` | Claim a public profile username |
|
|
322
|
+
| `update_public_proofs` | Update public proof display |
|
|
323
|
+
|
|
324
|
+
## Test Mode
|
|
325
|
+
|
|
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).
|
|
327
|
+
|
|
328
|
+
## Transport
|
|
329
|
+
|
|
330
|
+
Stdio only. The server communicates over stdin/stdout using the MCP protocol.
|
|
331
|
+
|
|
332
|
+
## Requirements
|
|
333
|
+
|
|
334
|
+
- Node.js >= 18.0.0
|
|
335
|
+
- A proof.holdings API key
|
|
336
|
+
|
|
337
|
+
## Links
|
|
338
|
+
|
|
339
|
+
- [proof.holdings](https://proof.holdings) — Product website
|
|
340
|
+
- [API Documentation](https://proof.holdings/docs/api) — REST API reference
|
|
341
|
+
- [Dashboard](https://proof.holdings/dashboard) — Manage your account and API keys
|
|
342
|
+
|
|
343
|
+
## License
|
|
344
|
+
|
|
345
|
+
[MIT](LICENSE)
|
package/dist/http.d.ts
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export interface HttpClientConfig {
|
|
2
|
+
apiKey: string;
|
|
3
|
+
baseUrl: string;
|
|
4
|
+
timeout?: number;
|
|
5
|
+
maxRetries?: number;
|
|
6
|
+
}
|
|
7
|
+
type QueryValue = string | number | boolean | undefined;
|
|
8
|
+
export declare class HttpClient {
|
|
9
|
+
readonly baseUrl: string;
|
|
10
|
+
private readonly apiKey;
|
|
11
|
+
private readonly timeout;
|
|
12
|
+
private readonly maxRetries;
|
|
13
|
+
constructor(config: HttpClientConfig);
|
|
14
|
+
request<T>(method: string, path: string, options?: {
|
|
15
|
+
body?: unknown;
|
|
16
|
+
query?: Record<string, QueryValue>;
|
|
17
|
+
}): Promise<T>;
|
|
18
|
+
get<T>(path: string, query?: Record<string, QueryValue>): Promise<T>;
|
|
19
|
+
post<T>(path: string, body?: unknown): Promise<T>;
|
|
20
|
+
put<T>(path: string, body?: unknown): Promise<T>;
|
|
21
|
+
patch<T>(path: string, body?: unknown): Promise<T>;
|
|
22
|
+
del<T>(path: string): Promise<T>;
|
|
23
|
+
private buildUrl;
|
|
24
|
+
private backoff;
|
|
25
|
+
private sleep;
|
|
26
|
+
}
|
|
27
|
+
export declare class ApiError extends Error {
|
|
28
|
+
readonly code: string;
|
|
29
|
+
readonly statusCode: number;
|
|
30
|
+
readonly details?: unknown | undefined;
|
|
31
|
+
constructor(message: string, code: string, statusCode: number, details?: unknown | undefined);
|
|
32
|
+
}
|
|
33
|
+
export {};
|
|
34
|
+
//# sourceMappingURL=http.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"http.d.ts","sourceRoot":"","sources":["../src/http.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;IAChB,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,KAAK,UAAU,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AAExD,qBAAa,UAAU;IACrB,SAAgB,OAAO,EAAE,MAAM,CAAC;IAChC,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAS;IAChC,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAS;IACjC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAS;gBAExB,MAAM,EAAE,gBAAgB;IAO9B,OAAO,CAAC,CAAC,EACb,MAAM,EAAE,MAAM,EACd,IAAI,EAAE,MAAM,EACZ,OAAO,CAAC,EAAE;QACR,IAAI,CAAC,EAAE,OAAO,CAAC;QACf,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;KACpC,GACA,OAAO,CAAC,CAAC,CAAC;IA2Eb,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,GAAG,OAAO,CAAC,CAAC,CAAC;IAIpE,IAAI,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAIjD,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhD,KAAK,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,IAAI,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,CAAC,CAAC;IAIlD,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC,CAAC,CAAC;IAIhC,OAAO,CAAC,QAAQ;IAYhB,OAAO,CAAC,OAAO;IAIf,OAAO,CAAC,KAAK;CAGd;AAED,qBAAa,QAAS,SAAQ,KAAK;aAGf,IAAI,EAAE,MAAM;aACZ,UAAU,EAAE,MAAM;aAClB,OAAO,CAAC,EAAE,OAAO;gBAHjC,OAAO,EAAE,MAAM,EACC,IAAI,EAAE,MAAM,EACZ,UAAU,EAAE,MAAM,EAClB,OAAO,CAAC,EAAE,OAAO,YAAA;CAMpC"}
|
package/dist/http.js
ADDED
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
const VERSION = '1.0.0';
|
|
2
|
+
export class HttpClient {
|
|
3
|
+
baseUrl;
|
|
4
|
+
apiKey;
|
|
5
|
+
timeout;
|
|
6
|
+
maxRetries;
|
|
7
|
+
constructor(config) {
|
|
8
|
+
this.apiKey = config.apiKey;
|
|
9
|
+
this.baseUrl = config.baseUrl.replace(/\/$/, '');
|
|
10
|
+
this.timeout = config.timeout ?? 30_000;
|
|
11
|
+
this.maxRetries = config.maxRetries ?? 2;
|
|
12
|
+
}
|
|
13
|
+
async request(method, path, options) {
|
|
14
|
+
const url = this.buildUrl(path, options?.query);
|
|
15
|
+
let lastError;
|
|
16
|
+
for (let attempt = 0; attempt <= this.maxRetries; attempt++) {
|
|
17
|
+
const controller = new AbortController();
|
|
18
|
+
const timeoutId = setTimeout(() => controller.abort(), this.timeout);
|
|
19
|
+
try {
|
|
20
|
+
const response = await fetch(url, {
|
|
21
|
+
method,
|
|
22
|
+
headers: {
|
|
23
|
+
'Content-Type': 'application/json',
|
|
24
|
+
'Authorization': `Bearer ${this.apiKey}`,
|
|
25
|
+
'User-Agent': `proof-mcp/${VERSION}`,
|
|
26
|
+
},
|
|
27
|
+
body: options?.body ? JSON.stringify(options.body) : undefined,
|
|
28
|
+
signal: controller.signal,
|
|
29
|
+
});
|
|
30
|
+
clearTimeout(timeoutId);
|
|
31
|
+
if (response.status === 429 && attempt < this.maxRetries) {
|
|
32
|
+
const retryAfter = response.headers.get('Retry-After');
|
|
33
|
+
const parsed = retryAfter ? parseInt(retryAfter, 10) : NaN;
|
|
34
|
+
const delay = Number.isFinite(parsed) && parsed > 0 ? Math.min(parsed * 1000, 60_000) : this.backoff(attempt);
|
|
35
|
+
await this.sleep(delay);
|
|
36
|
+
continue;
|
|
37
|
+
}
|
|
38
|
+
if (response.status >= 500 && attempt < this.maxRetries) {
|
|
39
|
+
await this.sleep(this.backoff(attempt));
|
|
40
|
+
continue;
|
|
41
|
+
}
|
|
42
|
+
const body = (await response.json().catch(() => ({})));
|
|
43
|
+
if (!response.ok) {
|
|
44
|
+
const apiError = body.error;
|
|
45
|
+
const code = apiError?.code ?? `http_${response.status}`;
|
|
46
|
+
const message = apiError?.message ?? `Request failed with status ${response.status}`;
|
|
47
|
+
throw new ApiError(message, code, response.status, apiError?.details);
|
|
48
|
+
}
|
|
49
|
+
return body;
|
|
50
|
+
}
|
|
51
|
+
catch (error) {
|
|
52
|
+
clearTimeout(timeoutId);
|
|
53
|
+
if (error instanceof ApiError)
|
|
54
|
+
throw error;
|
|
55
|
+
lastError = error;
|
|
56
|
+
if (lastError.name === 'AbortError') {
|
|
57
|
+
if (attempt < this.maxRetries) {
|
|
58
|
+
await this.sleep(this.backoff(attempt));
|
|
59
|
+
continue;
|
|
60
|
+
}
|
|
61
|
+
throw new ApiError(`Request to ${method} ${path} timed out after ${this.timeout}ms`, 'timeout', 0);
|
|
62
|
+
}
|
|
63
|
+
if (attempt < this.maxRetries) {
|
|
64
|
+
await this.sleep(this.backoff(attempt));
|
|
65
|
+
continue;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
throw new ApiError(lastError?.message ?? 'Network request failed', 'network_error', 0);
|
|
70
|
+
}
|
|
71
|
+
get(path, query) {
|
|
72
|
+
return this.request('GET', path, { query });
|
|
73
|
+
}
|
|
74
|
+
post(path, body) {
|
|
75
|
+
return this.request('POST', path, { body });
|
|
76
|
+
}
|
|
77
|
+
put(path, body) {
|
|
78
|
+
return this.request('PUT', path, { body });
|
|
79
|
+
}
|
|
80
|
+
patch(path, body) {
|
|
81
|
+
return this.request('PATCH', path, { body });
|
|
82
|
+
}
|
|
83
|
+
del(path) {
|
|
84
|
+
return this.request('DELETE', path);
|
|
85
|
+
}
|
|
86
|
+
buildUrl(path, query) {
|
|
87
|
+
const url = new URL(path, this.baseUrl);
|
|
88
|
+
if (query) {
|
|
89
|
+
for (const [key, value] of Object.entries(query)) {
|
|
90
|
+
if (value !== undefined) {
|
|
91
|
+
url.searchParams.set(key, String(value));
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
}
|
|
95
|
+
return url.toString();
|
|
96
|
+
}
|
|
97
|
+
backoff(attempt) {
|
|
98
|
+
return Math.min(1000 * Math.pow(2, attempt), 10000);
|
|
99
|
+
}
|
|
100
|
+
sleep(ms) {
|
|
101
|
+
return new Promise((resolve) => setTimeout(resolve, ms));
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
export class ApiError extends Error {
|
|
105
|
+
code;
|
|
106
|
+
statusCode;
|
|
107
|
+
details;
|
|
108
|
+
constructor(message, code, statusCode, details) {
|
|
109
|
+
super(message);
|
|
110
|
+
this.code = code;
|
|
111
|
+
this.statusCode = statusCode;
|
|
112
|
+
this.details = details;
|
|
113
|
+
this.name = 'ApiError';
|
|
114
|
+
Object.setPrototypeOf(this, new.target.prototype);
|
|
115
|
+
}
|
|
116
|
+
}
|
|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KAAK,CAAC,CAAC;IACtD,CAAC;IAEO,KAAK,CAAC,EAAU;QACtB,OAAO,IAAI,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,CAAC;IAC3D,CAAC;CACF;AAED,MAAM,OAAO,QAAS,SAAQ,KAAK;IAGf;IACA;IACA;IAJlB,YACE,OAAe,EACC,IAAY,EACZ,UAAkB,EAClB,OAAiB;QAEjC,KAAK,CAAC,OAAO,CAAC,CAAC;QAJC,SAAI,GAAJ,IAAI,CAAQ;QACZ,eAAU,GAAV,UAAU,CAAQ;QAClB,YAAO,GAAP,OAAO,CAAU;QAGjC,IAAI,CAAC,IAAI,GAAG,UAAU,CAAC;QACvB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC;IACpD,CAAC;CACF"}
|
package/dist/server.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.d.ts","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":""}
|
package/dist/server.js
ADDED
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
import { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';
|
|
3
|
+
import { StdioServerTransport } from '@modelcontextprotocol/sdk/server/stdio.js';
|
|
4
|
+
import { HttpClient } from './http.js';
|
|
5
|
+
import { registerTools as registerVerifications } from './tools/verifications.js';
|
|
6
|
+
import { registerTools as registerVerificationRequests } from './tools/verification-requests.js';
|
|
7
|
+
import { registerTools as registerProofs } from './tools/proofs.js';
|
|
8
|
+
import { registerTools as registerSessions } from './tools/sessions.js';
|
|
9
|
+
import { registerTools as registerAssets } from './tools/assets.js';
|
|
10
|
+
import { registerTools as registerAuth } from './tools/auth.js';
|
|
11
|
+
import { registerTools as registerSettings } from './tools/settings.js';
|
|
12
|
+
import { registerTools as registerTemplates } from './tools/templates.js';
|
|
13
|
+
import { registerTools as registerWebhookDeliveries } from './tools/webhook-deliveries.js';
|
|
14
|
+
import { registerTools as registerBilling } from './tools/billing.js';
|
|
15
|
+
import { registerTools as registerProjects } from './tools/projects.js';
|
|
16
|
+
import { registerTools as registerProfiles } from './tools/profiles.js';
|
|
17
|
+
import { registerTools as registerEmails } from './tools/emails.js';
|
|
18
|
+
import { registerTools as registerPhones } from './tools/phones.js';
|
|
19
|
+
import { registerTools as registerApiKeys } from './tools/api-keys.js';
|
|
20
|
+
import { registerTools as registerTwofa } from './tools/twofa.js';
|
|
21
|
+
import { registerTools as registerDomains } from './tools/domains.js';
|
|
22
|
+
import { registerTools as registerDnsCredentials } from './tools/dns-credentials.js';
|
|
23
|
+
import { registerTools as registerUserRequests } from './tools/user-requests.js';
|
|
24
|
+
import { registerTools as registerUserDomainVerify } from './tools/user-domain-verify.js';
|
|
25
|
+
import { registerTools as registerPublicProfiles } from './tools/public-profiles.js';
|
|
26
|
+
const API_KEY = process.env.PROOF_API_KEY;
|
|
27
|
+
const BASE_URL = process.env.PROOF_BASE_URL ?? 'https://api.proof.holdings';
|
|
28
|
+
if (!API_KEY) {
|
|
29
|
+
console.error('Error: PROOF_API_KEY environment variable is required.');
|
|
30
|
+
console.error('Set it in your MCP client config or export it before running.');
|
|
31
|
+
process.exit(1);
|
|
32
|
+
}
|
|
33
|
+
const http = new HttpClient({
|
|
34
|
+
apiKey: API_KEY,
|
|
35
|
+
baseUrl: BASE_URL,
|
|
36
|
+
});
|
|
37
|
+
const server = new McpServer({
|
|
38
|
+
name: 'proof-holdings',
|
|
39
|
+
version: '1.0.0',
|
|
40
|
+
});
|
|
41
|
+
// Register all tool modules
|
|
42
|
+
const tool = server.tool.bind(server);
|
|
43
|
+
registerVerifications(tool, http);
|
|
44
|
+
registerVerificationRequests(tool, http);
|
|
45
|
+
registerProofs(tool, http);
|
|
46
|
+
registerSessions(tool, http);
|
|
47
|
+
registerAssets(tool, http);
|
|
48
|
+
registerAuth(tool, http);
|
|
49
|
+
registerSettings(tool, http);
|
|
50
|
+
registerTemplates(tool, http);
|
|
51
|
+
registerWebhookDeliveries(tool, http);
|
|
52
|
+
registerBilling(tool, http);
|
|
53
|
+
registerProjects(tool, http);
|
|
54
|
+
registerProfiles(tool, http);
|
|
55
|
+
registerEmails(tool, http);
|
|
56
|
+
registerPhones(tool, http);
|
|
57
|
+
registerApiKeys(tool, http);
|
|
58
|
+
registerTwofa(tool, http);
|
|
59
|
+
registerDomains(tool, http);
|
|
60
|
+
registerDnsCredentials(tool, http);
|
|
61
|
+
registerUserRequests(tool, http);
|
|
62
|
+
registerUserDomainVerify(tool, http);
|
|
63
|
+
registerPublicProfiles(tool, http);
|
|
64
|
+
// Catch unhandled errors to avoid silent crashes
|
|
65
|
+
process.on('uncaughtException', (err) => {
|
|
66
|
+
console.error('Uncaught exception:', err.message);
|
|
67
|
+
process.exit(1);
|
|
68
|
+
});
|
|
69
|
+
process.on('unhandledRejection', (err) => {
|
|
70
|
+
console.error('Unhandled rejection:', err instanceof Error ? err.message : err);
|
|
71
|
+
process.exit(1);
|
|
72
|
+
});
|
|
73
|
+
// Connect via stdio
|
|
74
|
+
const transport = new StdioServerTransport();
|
|
75
|
+
await server.connect(transport);
|
|
76
|
+
//# sourceMappingURL=server.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"server.js","sourceRoot":"","sources":["../src/server.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,SAAS,EAAE,MAAM,yCAAyC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,MAAM,2CAA2C,CAAC;AACjF,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC,OAAO,EAAE,aAAa,IAAI,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAClF,OAAO,EAAE,aAAa,IAAI,4BAA4B,EAAE,MAAM,kCAAkC,CAAC;AACjG,OAAO,EAAE,aAAa,IAAI,cAAc,EAAE,MAAM,mBAAmB,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