@rapay/mcp-server 1.2.3 → 1.2.5
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 +153 -343
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/tools.d.ts +1 -1
- package/dist/tools.js +54 -4
- package/package.json +3 -2
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 MCP Contributors
|
|
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
CHANGED
|
@@ -1,343 +1,153 @@
|
|
|
1
|
-
#
|
|
2
|
-
|
|
3
|
-
MCP
|
|
4
|
-
|
|
5
|
-
**
|
|
6
|
-
|
|
7
|
-
##
|
|
8
|
-
|
|
9
|
-
-
|
|
10
|
-
|
|
11
|
-
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
###
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
**
|
|
140
|
-
-
|
|
141
|
-
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
Logs are written to `~/.rapay/mcp-audit.log` with 7-day retention:
|
|
155
|
-
- Tool name, timestamp, duration
|
|
156
|
-
- Result (success/error/rate_limited)
|
|
157
|
-
- Sanitized inputs (amounts redacted, emails masked)
|
|
158
|
-
|
|
159
|
-
## Error Handling
|
|
160
|
-
|
|
161
|
-
### Error Codes
|
|
162
|
-
|
|
163
|
-
| Code | Description | Retryable |
|
|
164
|
-
|------|-------------|-----------|
|
|
165
|
-
| `RATE_LIMIT_EXCEEDED` | MCP rate limit hit | No (wait) |
|
|
166
|
-
| `CLI_NOT_FOUND` | Ra Pay CLI not installed | No |
|
|
167
|
-
| `TOS_ACCEPTANCE_REQUIRED` | ToS not accepted | No |
|
|
168
|
-
| `ACCOUNT_NOT_LINKED` | Stripe account not linked | No |
|
|
169
|
-
| `VELOCITY_EXCEEDED` | Daily limit exceeded | No |
|
|
170
|
-
| `TIMEOUT` | Request timed out | Yes |
|
|
171
|
-
| `NETWORK_ERROR` | Network connectivity issue | Yes |
|
|
172
|
-
| `EXECUTION_FAILED` | Generic CLI error | No |
|
|
173
|
-
|
|
174
|
-
### Rate Limit Error
|
|
175
|
-
|
|
176
|
-
```json
|
|
177
|
-
{
|
|
178
|
-
"error": "rate_limit_exceeded",
|
|
179
|
-
"code": "RATE_LIMIT_EXCEEDED",
|
|
180
|
-
"message": "Too many requests. Please wait 60 seconds.",
|
|
181
|
-
"retry_after_seconds": 60,
|
|
182
|
-
"retryable": false
|
|
183
|
-
}
|
|
184
|
-
```
|
|
185
|
-
|
|
186
|
-
### CLI Not Found Error
|
|
187
|
-
|
|
188
|
-
```json
|
|
189
|
-
{
|
|
190
|
-
"error": "cli_not_found",
|
|
191
|
-
"code": "CLI_NOT_FOUND",
|
|
192
|
-
"message": "Ra Pay CLI not found. Please install it first.",
|
|
193
|
-
"retryable": false
|
|
194
|
-
}
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### ToS Required Error
|
|
198
|
-
|
|
199
|
-
```json
|
|
200
|
-
{
|
|
201
|
-
"error": "tos_required",
|
|
202
|
-
"code": "TOS_ACCEPTANCE_REQUIRED",
|
|
203
|
-
"message": "Terms of Service must be accepted. Run 'ra accept-tos' first.",
|
|
204
|
-
"retryable": false
|
|
205
|
-
}
|
|
206
|
-
```
|
|
207
|
-
|
|
208
|
-
### For Claude API Callers: Exponential Backoff
|
|
209
|
-
|
|
210
|
-
If you receive `RATE_LIMIT_EXCEEDED`, implement exponential backoff:
|
|
211
|
-
|
|
212
|
-
```typescript
|
|
213
|
-
const maxRetries = 3;
|
|
214
|
-
let delay = 60; // seconds
|
|
215
|
-
|
|
216
|
-
for (let attempt = 0; attempt < maxRetries; attempt++) {
|
|
217
|
-
try {
|
|
218
|
-
return await mcp.callTool('ra_send', params);
|
|
219
|
-
} catch (error) {
|
|
220
|
-
if (error.code === 'RATE_LIMIT_EXCEEDED') {
|
|
221
|
-
console.log(`Rate limited. Waiting ${delay}s before retry...`);
|
|
222
|
-
await sleep(delay * 1000);
|
|
223
|
-
delay *= 2; // exponential backoff
|
|
224
|
-
} else {
|
|
225
|
-
throw error;
|
|
226
|
-
}
|
|
227
|
-
}
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
// DO NOT:
|
|
231
|
-
// - Retry immediately (wastes time, still rate limited)
|
|
232
|
-
// - Retry more than 3 times (indicates genuine rate limit)
|
|
233
|
-
// - Ignore retry_after_seconds field
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
Note: MCP rate limiting is client-side defense-in-depth. Backend also enforces velocity controls per account tier.
|
|
237
|
-
|
|
238
|
-
## Data Flow
|
|
239
|
-
|
|
240
|
-
```
|
|
241
|
-
You (Claude Desktop/API)
|
|
242
|
-
|
|
|
243
|
-
v
|
|
244
|
-
MCP Server (this package)
|
|
245
|
-
| - Logs tool calls (no amounts/PII)
|
|
246
|
-
| - Rate limits requests
|
|
247
|
-
| - Sanitizes responses
|
|
248
|
-
v
|
|
249
|
-
Ra Pay CLI (subprocess)
|
|
250
|
-
| - Credentials in OS keyring
|
|
251
|
-
| - Adds replay protection
|
|
252
|
-
v
|
|
253
|
-
Ra Pay Backend
|
|
254
|
-
| - Validates requests
|
|
255
|
-
| - Enforces velocity limits
|
|
256
|
-
v
|
|
257
|
-
Stripe API
|
|
258
|
-
| - Owns all PII
|
|
259
|
-
| - Processes payments
|
|
260
|
-
v
|
|
261
|
-
Recipient's Bank
|
|
262
|
-
```
|
|
263
|
-
|
|
264
|
-
All sensitive data flows directly to Stripe. Ra Pay only records that an action occurred.
|
|
265
|
-
|
|
266
|
-
## Security Model
|
|
267
|
-
|
|
268
|
-
This section documents the security posture of the published npm package.
|
|
269
|
-
|
|
270
|
-
### What's Published to npm
|
|
271
|
-
|
|
272
|
-
| Category | Included | Excluded |
|
|
273
|
-
|----------|----------|----------|
|
|
274
|
-
| Compiled JavaScript | Yes | - |
|
|
275
|
-
| TypeScript declarations | Yes | - |
|
|
276
|
-
| Source maps (.js.map) | No | Excluded for code privacy |
|
|
277
|
-
| Source code (src/) | No | Development only |
|
|
278
|
-
|
|
279
|
-
### Intentionally Public Information
|
|
280
|
-
|
|
281
|
-
| Metadata | Value | Rationale |
|
|
282
|
-
|----------|-------|-----------|
|
|
283
|
-
| Repository | github.com/Ra-Pay-AI/rapay | Open source by design |
|
|
284
|
-
| Author | Ra Pay | Company name |
|
|
285
|
-
| License | MIT | Standard permissive license |
|
|
286
|
-
| Keywords | mcp, payments, stripe, claude | Discoverability |
|
|
287
|
-
|
|
288
|
-
### Security Features Exposed (By Design)
|
|
289
|
-
|
|
290
|
-
These are documented for users and do not represent vulnerabilities:
|
|
291
|
-
|
|
292
|
-
- **Rate limiting rules** - Users need to know limits to implement backoff
|
|
293
|
-
- **Error codes** - Required for proper error handling
|
|
294
|
-
- **Tool schemas** - Required by MCP protocol specification
|
|
295
|
-
- **Audit log location** (~/.rapay/mcp-audit.log) - Users may need to inspect
|
|
296
|
-
|
|
297
|
-
### What Is NOT Exposed
|
|
298
|
-
|
|
299
|
-
| Category | Protection |
|
|
300
|
-
|----------|------------|
|
|
301
|
-
| API keys/secrets | Never in code (OS keyring only) |
|
|
302
|
-
| Backend URLs | Only public rapay.ai endpoints |
|
|
303
|
-
| User data | Subprocess isolation, never in MCP process |
|
|
304
|
-
| Payment amounts | Redacted as `[redacted]` in all logs |
|
|
305
|
-
| Email addresses | Masked (j***@example.com) in audit logs |
|
|
306
|
-
|
|
307
|
-
### Subprocess Isolation Model
|
|
308
|
-
|
|
309
|
-
```
|
|
310
|
-
┌─────────────────────┐
|
|
311
|
-
│ AI Agent (Claude) │
|
|
312
|
-
└─────────┬───────────┘
|
|
313
|
-
│ MCP Protocol (stdio)
|
|
314
|
-
▼
|
|
315
|
-
┌─────────────────────┐
|
|
316
|
-
│ MCP Server (npm) │ ← No credentials here
|
|
317
|
-
│ - Rate limiting │
|
|
318
|
-
│ - Input validation │
|
|
319
|
-
│ - Response sanitize│
|
|
320
|
-
└─────────┬───────────┘
|
|
321
|
-
│ Spawns subprocess
|
|
322
|
-
▼
|
|
323
|
-
┌─────────────────────┐
|
|
324
|
-
│ Ra Pay CLI │ ← Credentials in OS keyring
|
|
325
|
-
│ - Session tokens │
|
|
326
|
-
│ - Stripe API calls │
|
|
327
|
-
└─────────────────────┘
|
|
328
|
-
```
|
|
329
|
-
|
|
330
|
-
The MCP server never has access to credentials. All sensitive operations are delegated to the CLI subprocess, which reads credentials directly from the OS keyring.
|
|
331
|
-
|
|
332
|
-
## Development
|
|
333
|
-
|
|
334
|
-
```bash
|
|
335
|
-
npm run dev # Watch mode
|
|
336
|
-
npm run build # Build
|
|
337
|
-
npm run lint # Lint
|
|
338
|
-
npm run test # Test
|
|
339
|
-
```
|
|
340
|
-
|
|
341
|
-
## License
|
|
342
|
-
|
|
343
|
-
MIT
|
|
1
|
+
# MCP Registry
|
|
2
|
+
|
|
3
|
+
The MCP registry provides MCP clients with a list of MCP servers, like an app store for MCP servers.
|
|
4
|
+
|
|
5
|
+
[**📤 Publish my MCP server**](docs/modelcontextprotocol-io/quickstart.mdx) | [**⚡️ Live API docs**](https://registry.modelcontextprotocol.io/docs) | [**👀 Ecosystem vision**](docs/design/ecosystem-vision.md) | 📖 **[Full documentation](./docs)**
|
|
6
|
+
|
|
7
|
+
## Development Status
|
|
8
|
+
|
|
9
|
+
**2025-10-24 update**: The Registry API has entered an **API freeze (v0.1)** 🎉. For the next month or more, the API will remain stable with no breaking changes, allowing integrators to confidently implement support. This freeze applies to v0.1 while development continues on v0. We'll use this period to validate the API in real-world integrations and gather feedback to shape v1 for general availability. Thank you to everyone for your contributions and patience—your involvement has been key to getting us here!
|
|
10
|
+
|
|
11
|
+
**2025-09-08 update**: The registry has launched in preview 🎉 ([announcement blog post](https://blog.modelcontextprotocol.io/posts/2025-09-08-mcp-registry-preview/)). While the system is now more stable, this is still a preview release and breaking changes or data resets may occur. A general availability (GA) release will follow later. We'd love your feedback in [GitHub discussions](https://github.com/modelcontextprotocol/registry/discussions/new?category=ideas) or in the [#registry-dev Discord](https://discord.com/channels/1358869848138059966/1369487942862504016) ([joining details here](https://modelcontextprotocol.io/community/communication)).
|
|
12
|
+
|
|
13
|
+
Current key maintainers:
|
|
14
|
+
- **Adam Jones** (Anthropic) [@domdomegg](https://github.com/domdomegg)
|
|
15
|
+
- **Tadas Antanavicius** (PulseMCP) [@tadasant](https://github.com/tadasant)
|
|
16
|
+
- **Toby Padilla** (GitHub) [@toby](https://github.com/toby)
|
|
17
|
+
- **Radoslav (Rado) Dimitrov** (Stacklok) [@rdimitrov](https://github.com/rdimitrov)
|
|
18
|
+
|
|
19
|
+
## Contributing
|
|
20
|
+
|
|
21
|
+
We use multiple channels for collaboration - see [modelcontextprotocol.io/community/communication](https://modelcontextprotocol.io/community/communication).
|
|
22
|
+
|
|
23
|
+
Often (but not always) ideas flow through this pipeline:
|
|
24
|
+
|
|
25
|
+
- **[Discord](https://modelcontextprotocol.io/community/communication)** - Real-time community discussions
|
|
26
|
+
- **[Discussions](https://github.com/modelcontextprotocol/registry/discussions)** - Propose and discuss product/technical requirements
|
|
27
|
+
- **[Issues](https://github.com/modelcontextprotocol/registry/issues)** - Track well-scoped technical work
|
|
28
|
+
- **[Pull Requests](https://github.com/modelcontextprotocol/registry/pulls)** - Contribute work towards issues
|
|
29
|
+
|
|
30
|
+
### Quick start:
|
|
31
|
+
|
|
32
|
+
#### Pre-requisites
|
|
33
|
+
|
|
34
|
+
- **Docker**
|
|
35
|
+
- **Go 1.24.x**
|
|
36
|
+
- **ko** - Container image builder for Go ([installation instructions](https://ko.build/install/))
|
|
37
|
+
- **golangci-lint v2.4.0**
|
|
38
|
+
|
|
39
|
+
#### Running the server
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
# Start full development environment
|
|
43
|
+
make dev-compose
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
This starts the registry at [`localhost:8080`](http://localhost:8080) with PostgreSQL. The database uses ephemeral storage and is reset each time you restart the containers, ensuring a clean state for development and testing.
|
|
47
|
+
|
|
48
|
+
**Note:** The registry uses [ko](https://ko.build) to build container images. The `make dev-compose` command automatically builds the registry image with ko and loads it into your local Docker daemon before starting the services.
|
|
49
|
+
|
|
50
|
+
By default, the registry seeds from the production API with a filtered subset of servers (to keep startup fast). This ensures your local environment mirrors production behavior and all seed data passes validation. For offline development you can seed from a file without validation with `MCP_REGISTRY_SEED_FROM=data/seed.json MCP_REGISTRY_ENABLE_REGISTRY_VALIDATION=false make dev-compose`.
|
|
51
|
+
|
|
52
|
+
The setup can be configured with environment variables in [docker-compose.yml](./docker-compose.yml) - see [.env.example](./.env.example) for a reference.
|
|
53
|
+
|
|
54
|
+
<details>
|
|
55
|
+
<summary>Alternative: Running a pre-built Docker image</summary>
|
|
56
|
+
|
|
57
|
+
Pre-built Docker images are automatically published to GitHub Container Registry:
|
|
58
|
+
|
|
59
|
+
```bash
|
|
60
|
+
# Run latest stable release
|
|
61
|
+
docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:latest
|
|
62
|
+
|
|
63
|
+
# Run latest from main branch (continuous deployment)
|
|
64
|
+
docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:main
|
|
65
|
+
|
|
66
|
+
# Run specific release version
|
|
67
|
+
docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:v1.0.0
|
|
68
|
+
|
|
69
|
+
# Run development build from main branch
|
|
70
|
+
docker run -p 8080:8080 ghcr.io/modelcontextprotocol/registry:main-20250906-abc123d
|
|
71
|
+
```
|
|
72
|
+
|
|
73
|
+
**Available tags:**
|
|
74
|
+
- **Releases**: `latest`, `v1.0.0`, `v1.1.0`, etc.
|
|
75
|
+
- **Continuous**: `main` (latest main branch build)
|
|
76
|
+
- **Development**: `main-<date>-<sha>` (specific commit builds)
|
|
77
|
+
|
|
78
|
+
</details>
|
|
79
|
+
|
|
80
|
+
#### Publishing a server
|
|
81
|
+
|
|
82
|
+
To publish a server, we've built a simple CLI. You can use it with:
|
|
83
|
+
|
|
84
|
+
```bash
|
|
85
|
+
# Build the latest CLI
|
|
86
|
+
make publisher
|
|
87
|
+
|
|
88
|
+
# Use it!
|
|
89
|
+
./bin/mcp-publisher --help
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
See [the publisher guide](./docs/modelcontextprotocol-io/quickstart.mdx) for more details.
|
|
93
|
+
|
|
94
|
+
#### Other commands
|
|
95
|
+
|
|
96
|
+
```bash
|
|
97
|
+
# Run lint, unit tests and integration tests
|
|
98
|
+
make check
|
|
99
|
+
```
|
|
100
|
+
|
|
101
|
+
There are also a few more helpful commands for development. Run `make help` to learn more, or look in [Makefile](./Makefile).
|
|
102
|
+
|
|
103
|
+
<!--
|
|
104
|
+
For Claude and other AI tools: Always prefer make targets over custom commands where possible.
|
|
105
|
+
-->
|
|
106
|
+
|
|
107
|
+
## Architecture
|
|
108
|
+
|
|
109
|
+
### Project Structure
|
|
110
|
+
|
|
111
|
+
```
|
|
112
|
+
├── cmd/ # Application entry points
|
|
113
|
+
│ └── publisher/ # Server publishing tool
|
|
114
|
+
├── data/ # Seed data
|
|
115
|
+
├── deploy/ # Deployment configuration (Pulumi)
|
|
116
|
+
├── docs/ # Documentation
|
|
117
|
+
├── internal/ # Private application code
|
|
118
|
+
│ ├── api/ # HTTP handlers and routing
|
|
119
|
+
│ ├── auth/ # Authentication (GitHub OAuth, JWT, namespace blocking)
|
|
120
|
+
│ ├── config/ # Configuration management
|
|
121
|
+
│ ├── database/ # Data persistence (PostgreSQL)
|
|
122
|
+
│ ├── service/ # Business logic
|
|
123
|
+
│ ├── telemetry/ # Metrics and monitoring
|
|
124
|
+
│ └── validators/ # Input validation
|
|
125
|
+
├── pkg/ # Public packages
|
|
126
|
+
│ ├── api/ # API types and structures
|
|
127
|
+
│ │ └── v0/ # Version 0 API types
|
|
128
|
+
│ └── model/ # Data models for server.json
|
|
129
|
+
├── scripts/ # Development and testing scripts
|
|
130
|
+
├── tests/ # Integration tests
|
|
131
|
+
└── tools/ # CLI tools and utilities
|
|
132
|
+
└── validate-*.sh # Schema validation tools
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
### Authentication
|
|
136
|
+
|
|
137
|
+
Publishing supports multiple authentication methods:
|
|
138
|
+
- **GitHub OAuth** - For publishing by logging into GitHub
|
|
139
|
+
- **GitHub OIDC** - For publishing from GitHub Actions
|
|
140
|
+
- **DNS verification** - For proving ownership of a domain and its subdomains
|
|
141
|
+
- **HTTP verification** - For proving ownership of a domain
|
|
142
|
+
|
|
143
|
+
The registry validates namespace ownership when publishing. E.g. to publish...:
|
|
144
|
+
- `io.github.domdomegg/my-cool-mcp` you must login to GitHub as `domdomegg`, or be in a GitHub Action on domdomegg's repos
|
|
145
|
+
- `me.adamjones/my-cool-mcp` you must prove ownership of `adamjones.me` via DNS or HTTP challenge
|
|
146
|
+
|
|
147
|
+
## Community Projects
|
|
148
|
+
|
|
149
|
+
Check out [community projects](docs/community-projects.md) to explore notable registry-related work created by the community.
|
|
150
|
+
|
|
151
|
+
## More documentation
|
|
152
|
+
|
|
153
|
+
See the [documentation](./docs) for more details if your question has not been answered here!
|
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
package/dist/tools.d.ts
CHANGED
|
@@ -24,7 +24,7 @@ export declare const SENSITIVE_TOOLS: Set<string>;
|
|
|
24
24
|
export declare function isSensitiveTool(toolName: string): boolean;
|
|
25
25
|
/**
|
|
26
26
|
* Compute the integrity hash of the tool definitions
|
|
27
|
-
* Hash is based on tool names
|
|
27
|
+
* Hash is based on tool names, input schemas, and annotations (deterministic)
|
|
28
28
|
*/
|
|
29
29
|
export declare function computeToolHash(): string;
|
|
30
30
|
/**
|
package/dist/tools.js
CHANGED
|
@@ -60,6 +60,13 @@ const PAYMENT_TOOLS = [
|
|
|
60
60
|
},
|
|
61
61
|
required: ["amount", "recipient_id", "business_purpose", "user_confirmed"],
|
|
62
62
|
},
|
|
63
|
+
annotations: {
|
|
64
|
+
title: "Send Payment",
|
|
65
|
+
readOnlyHint: false,
|
|
66
|
+
destructiveHint: true,
|
|
67
|
+
idempotentHint: false,
|
|
68
|
+
openWorldHint: true,
|
|
69
|
+
},
|
|
63
70
|
},
|
|
64
71
|
{
|
|
65
72
|
name: "ra_refund",
|
|
@@ -71,6 +78,13 @@ const PAYMENT_TOOLS = [
|
|
|
71
78
|
properties: {},
|
|
72
79
|
required: [],
|
|
73
80
|
},
|
|
81
|
+
annotations: {
|
|
82
|
+
title: "Process Refund",
|
|
83
|
+
readOnlyHint: false,
|
|
84
|
+
destructiveHint: true,
|
|
85
|
+
idempotentHint: false,
|
|
86
|
+
openWorldHint: true,
|
|
87
|
+
},
|
|
74
88
|
},
|
|
75
89
|
];
|
|
76
90
|
/**
|
|
@@ -86,6 +100,13 @@ const QUERY_TOOLS = [
|
|
|
86
100
|
properties: {},
|
|
87
101
|
required: [],
|
|
88
102
|
},
|
|
103
|
+
annotations: {
|
|
104
|
+
title: "Check Balance",
|
|
105
|
+
readOnlyHint: true,
|
|
106
|
+
destructiveHint: false,
|
|
107
|
+
idempotentHint: true,
|
|
108
|
+
openWorldHint: true,
|
|
109
|
+
},
|
|
89
110
|
},
|
|
90
111
|
{
|
|
91
112
|
name: "ra_history",
|
|
@@ -103,6 +124,13 @@ const QUERY_TOOLS = [
|
|
|
103
124
|
},
|
|
104
125
|
required: [],
|
|
105
126
|
},
|
|
127
|
+
annotations: {
|
|
128
|
+
title: "Transaction History",
|
|
129
|
+
readOnlyHint: true,
|
|
130
|
+
destructiveHint: false,
|
|
131
|
+
idempotentHint: true,
|
|
132
|
+
openWorldHint: true,
|
|
133
|
+
},
|
|
106
134
|
},
|
|
107
135
|
{
|
|
108
136
|
name: "ra_whoami",
|
|
@@ -113,6 +141,13 @@ const QUERY_TOOLS = [
|
|
|
113
141
|
properties: {},
|
|
114
142
|
required: [],
|
|
115
143
|
},
|
|
144
|
+
annotations: {
|
|
145
|
+
title: "Account Info",
|
|
146
|
+
readOnlyHint: true,
|
|
147
|
+
destructiveHint: false,
|
|
148
|
+
idempotentHint: true,
|
|
149
|
+
openWorldHint: true,
|
|
150
|
+
},
|
|
116
151
|
},
|
|
117
152
|
{
|
|
118
153
|
name: "ra_dashboard",
|
|
@@ -123,6 +158,13 @@ const QUERY_TOOLS = [
|
|
|
123
158
|
properties: {},
|
|
124
159
|
required: [],
|
|
125
160
|
},
|
|
161
|
+
annotations: {
|
|
162
|
+
title: "Open Dashboard",
|
|
163
|
+
readOnlyHint: true,
|
|
164
|
+
destructiveHint: false,
|
|
165
|
+
idempotentHint: true,
|
|
166
|
+
openWorldHint: true,
|
|
167
|
+
},
|
|
126
168
|
},
|
|
127
169
|
{
|
|
128
170
|
name: "ra_dispute",
|
|
@@ -134,6 +176,13 @@ const QUERY_TOOLS = [
|
|
|
134
176
|
properties: {},
|
|
135
177
|
required: [],
|
|
136
178
|
},
|
|
179
|
+
annotations: {
|
|
180
|
+
title: "Manage Disputes",
|
|
181
|
+
readOnlyHint: true,
|
|
182
|
+
destructiveHint: false,
|
|
183
|
+
idempotentHint: true,
|
|
184
|
+
openWorldHint: true,
|
|
185
|
+
},
|
|
137
186
|
},
|
|
138
187
|
];
|
|
139
188
|
/**
|
|
@@ -158,25 +207,26 @@ export function isSensitiveTool(toolName) {
|
|
|
158
207
|
*/
|
|
159
208
|
/**
|
|
160
209
|
* Expected hash of tool definitions (update when tools change)
|
|
161
|
-
* This is the SHA-256 hash of the sorted tool names
|
|
210
|
+
* This is the SHA-256 hash of the sorted tool names, input schemas, and annotations.
|
|
162
211
|
*
|
|
163
212
|
* To regenerate after modifying tools:
|
|
164
213
|
* 1. Run: cd mcp-server && npm run build
|
|
165
214
|
* 2. Run: RAPAY_DEBUG=1 node dist/index.js (will log computed hash)
|
|
166
215
|
* 3. Update this constant with the new hash
|
|
167
216
|
*
|
|
168
|
-
* Last updated: 2026-02-
|
|
217
|
+
* Last updated: 2026-02-08 (Session 64 added annotations to hash)
|
|
169
218
|
*/
|
|
170
|
-
const EXPECTED_TOOL_HASH = "
|
|
219
|
+
const EXPECTED_TOOL_HASH = "f5d8adb129c9c36d";
|
|
171
220
|
/**
|
|
172
221
|
* Compute the integrity hash of the tool definitions
|
|
173
|
-
* Hash is based on tool names
|
|
222
|
+
* Hash is based on tool names, input schemas, and annotations (deterministic)
|
|
174
223
|
*/
|
|
175
224
|
export function computeToolHash() {
|
|
176
225
|
// Create a deterministic representation of tools
|
|
177
226
|
const toolData = TOOLS.map((tool) => ({
|
|
178
227
|
name: tool.name,
|
|
179
228
|
inputSchema: tool.inputSchema,
|
|
229
|
+
annotations: tool.annotations ?? null,
|
|
180
230
|
}))
|
|
181
231
|
.sort((a, b) => a.name.localeCompare(b.name))
|
|
182
232
|
.map((t) => JSON.stringify(t))
|
package/package.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rapay/mcp-server",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.5",
|
|
4
|
+
"mcpName": "ai.rapay/mcp-server",
|
|
4
5
|
"description": "Ra Pay MCP Server for Claude Desktop and Claude Code - AI Agent Payment Infrastructure",
|
|
5
6
|
"type": "module",
|
|
6
7
|
"main": "dist/index.js",
|
|
@@ -49,7 +50,7 @@
|
|
|
49
50
|
"access": "public"
|
|
50
51
|
},
|
|
51
52
|
"dependencies": {
|
|
52
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
53
|
+
"@modelcontextprotocol/sdk": "^1.11.0",
|
|
53
54
|
"cross-spawn": "^7.0.6"
|
|
54
55
|
},
|
|
55
56
|
"devDependencies": {
|