@codespar/mcp-moonpay 0.2.0 → 0.2.1
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 +22 -12
- package/dist/index.js +2 -2
- package/package.json +2 -2
- package/server.json +2 -2
- package/src/index.ts +2 -2
package/README.md
CHANGED
|
@@ -15,20 +15,30 @@ MoonPay spans 100+ crypto assets and many geographies, with both buy (fiat → c
|
|
|
15
15
|
|
|
16
16
|
Use MoonPay when an agent needs broader crypto coverage (beyond USDC), longer-tail geographies, or a sell-side flow that pays out to local fiat.
|
|
17
17
|
|
|
18
|
-
## Tools
|
|
18
|
+
## Tools (20)
|
|
19
19
|
|
|
20
20
|
| Tool | Purpose |
|
|
21
|
-
|
|
22
|
-
| `get_buy_quote` | Preview a fiat
|
|
23
|
-
| `create_buy_transaction` | Create a buy transaction (fiat
|
|
24
|
-
| `get_buy_transaction` | Retrieve a buy transaction by id |
|
|
25
|
-
| `list_buy_transactions` | List buy transactions with filters |
|
|
26
|
-
| `get_sell_quote` | Preview a crypto
|
|
27
|
-
| `create_sell_transaction` | Create a sell transaction (crypto
|
|
28
|
-
| `get_sell_transaction` | Retrieve a sell transaction by id |
|
|
29
|
-
| `
|
|
30
|
-
| `
|
|
31
|
-
| `
|
|
21
|
+
|---|---|
|
|
22
|
+
| `get_buy_quote` | Preview a fiat -> crypto buy quote in real time. |
|
|
23
|
+
| `create_buy_transaction` | Create a buy transaction (fiat -> crypto). |
|
|
24
|
+
| `get_buy_transaction` | Retrieve a buy transaction (fiat -> crypto) by its MoonPay id. |
|
|
25
|
+
| `list_buy_transactions` | List buy transactions with optional filters. |
|
|
26
|
+
| `get_sell_quote` | Preview a crypto -> fiat sell quote in real time. |
|
|
27
|
+
| `create_sell_transaction` | Create a sell transaction (crypto -> fiat). |
|
|
28
|
+
| `get_sell_transaction` | Retrieve a sell transaction (crypto -> fiat) by its MoonPay id. |
|
|
29
|
+
| `refund_sell_transaction` | Request a refund on an off-ramp (sell) transaction. |
|
|
30
|
+
| `create_customer` | Create a MoonPay customer (KYC'd end user). |
|
|
31
|
+
| `get_customer` | Retrieve a MoonPay customer by id. |
|
|
32
|
+
| `get_customer_kyc_status` | Fetch KYC verification status (and any pending document requirements) for a MoonPay customer. |
|
|
33
|
+
| `list_customer_transactions` | List all transactions (buy + sell) tied to a single MoonPay customer. |
|
|
34
|
+
| `get_transaction_receipt` | Fetch a tax-/audit-grade receipt for a completed buy or sell transaction. |
|
|
35
|
+
| `list_currencies` | List supported currencies (fiat + crypto). |
|
|
36
|
+
| `get_currency` | Retrieve metadata for a single currency (fiat or crypto) by its MoonPay code. |
|
|
37
|
+
| `list_countries` | List countries supported by MoonPay along with which flows (buy / sell / NFT) are allowed per geography. |
|
|
38
|
+
| `list_payment_methods` | List payment methods supported for a given fiat currency / country combination (e.g. |
|
|
39
|
+
| `get_user_country` | Resolve the caller's (or a given IP's) country via MoonPay's IP-address geolocation endpoint. |
|
|
40
|
+
| `sign_buy_url` | Build and HMAC-SHA256 sign a MoonPay buy widget URL (buy.moonpay.com). |
|
|
41
|
+
| `sign_sell_url` | Build and HMAC-SHA256 sign a MoonPay sell widget URL (sell.moonpay.com). |
|
|
32
42
|
|
|
33
43
|
## Install
|
|
34
44
|
|
package/dist/index.js
CHANGED
|
@@ -123,7 +123,7 @@ function signWidgetUrl(widgetBase, params) {
|
|
|
123
123
|
const signature = createHmac("sha256", SECRET_KEY).update(query).digest("base64");
|
|
124
124
|
return `${widgetBase}${query}&signature=${encodeURIComponent(signature)}`;
|
|
125
125
|
}
|
|
126
|
-
const server = new Server({ name: "mcp-moonpay", version: "0.2.
|
|
126
|
+
const server = new Server({ name: "mcp-moonpay", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
127
127
|
server.setRequestHandler(ListToolsRequestSchema, async () => ({
|
|
128
128
|
tools: [
|
|
129
129
|
{
|
|
@@ -547,7 +547,7 @@ async function main() {
|
|
|
547
547
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
548
548
|
t.onclose = () => { if (t.sessionId)
|
|
549
549
|
transports.delete(t.sessionId); };
|
|
550
|
-
const s = new Server({ name: "mcp-moonpay", version: "0.2.
|
|
550
|
+
const s = new Server({ name: "mcp-moonpay", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
551
551
|
server._requestHandlers.forEach((v, k) => s._requestHandlers.set(k, v));
|
|
552
552
|
server._notificationHandlers?.forEach((v, k) => s._notificationHandlers.set(k, v));
|
|
553
553
|
await s.connect(t);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codespar/mcp-moonpay",
|
|
3
|
-
"version": "0.2.
|
|
4
|
-
"description": "MCP server for MoonPay
|
|
3
|
+
"version": "0.2.1",
|
|
4
|
+
"description": "MCP server for MoonPay \u2014 fiat-to-crypto on/off-ramp covering 100+ crypto assets, multi-geography, Pix supported for Brazil",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
7
7
|
"bin": {
|
package/server.json
CHANGED
|
@@ -7,12 +7,12 @@
|
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/crypto/moonpay"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.2.
|
|
10
|
+
"version": "0.2.1",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@codespar/mcp-moonpay",
|
|
15
|
-
"version": "0.2.
|
|
15
|
+
"version": "0.2.1",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
package/src/index.ts
CHANGED
|
@@ -126,7 +126,7 @@ function signWidgetUrl(widgetBase: string, params: Record<string, unknown>): str
|
|
|
126
126
|
}
|
|
127
127
|
|
|
128
128
|
const server = new Server(
|
|
129
|
-
{ name: "mcp-moonpay", version: "0.2.
|
|
129
|
+
{ name: "mcp-moonpay", version: "0.2.1" },
|
|
130
130
|
{ capabilities: { tools: {} } }
|
|
131
131
|
);
|
|
132
132
|
|
|
@@ -549,7 +549,7 @@ async function main() {
|
|
|
549
549
|
if (!sid && isInitializeRequest(req.body)) {
|
|
550
550
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
551
551
|
t.onclose = () => { if (t.sessionId) transports.delete(t.sessionId); };
|
|
552
|
-
const s = new Server({ name: "mcp-moonpay", version: "0.2.
|
|
552
|
+
const s = new Server({ name: "mcp-moonpay", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
553
553
|
(server as unknown as { _requestHandlers: Map<unknown, unknown> })._requestHandlers.forEach((v, k) => (s as unknown as { _requestHandlers: Map<unknown, unknown> })._requestHandlers.set(k, v));
|
|
554
554
|
(server as unknown as { _notificationHandlers?: Map<unknown, unknown> })._notificationHandlers?.forEach((v, k) => (s as unknown as { _notificationHandlers: Map<unknown, unknown> })._notificationHandlers.set(k, v));
|
|
555
555
|
await s.connect(t);
|