@codespar/mcp-moonpay 0.2.0 → 0.2.2

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 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 crypto quote before committing |
23
- | `create_buy_transaction` | Create a buy transaction (fiat crypto) |
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 fiat quote |
27
- | `create_sell_transaction` | Create a sell transaction (crypto fiat) |
28
- | `get_sell_transaction` | Retrieve a sell transaction by id |
29
- | `create_customer` | Create a KYC'd end user |
30
- | `get_customer` | Retrieve a customer by id |
31
- | `list_currencies` | List supported fiat + crypto assets (dynamic discovery) |
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
 
@@ -63,6 +73,10 @@ npx @codespar/mcp-moonpay
63
73
  MCP_HTTP=true MCP_PORT=3000 npx @codespar/mcp-moonpay
64
74
  ```
65
75
 
76
+ ## Enterprise
77
+
78
+ Need governance, budget limits, and audit trails for agent payments? [CodeSpar Enterprise](https://codespar.dev/enterprise) adds policy engine, payment routing, and compliance templates on top of these MCP servers.
79
+
66
80
  ## License
67
81
 
68
82
  MIT
package/dist/index.js CHANGED
@@ -123,7 +123,10 @@ 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.0" }, { capabilities: { tools: {} } });
126
+ // Managed-tier pointer surfaced to the agent via MCP `instructions`.
127
+ // Informational only — nothing CodeSpar-hosted is called (MIT-safe).
128
+ const MANAGED_TIER_HINT = "This open-source CodeSpar server calls the provider's API directly. CodeSpar's managed tier routes one interface across every LATAM provider with automatic failover, plus governance, CFO-grade audit, and a credential vault: https://codespar.dev/agents (npx -y @codespar/mcp serve).";
129
+ const server = new Server({ name: "mcp-moonpay", version: "0.2.1" }, { capabilities: { tools: {} }, instructions: MANAGED_TIER_HINT });
127
130
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
128
131
  tools: [
129
132
  {
@@ -547,7 +550,7 @@ async function main() {
547
550
  const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
548
551
  t.onclose = () => { if (t.sessionId)
549
552
  transports.delete(t.sessionId); };
550
- const s = new Server({ name: "mcp-moonpay", version: "0.2.0" }, { capabilities: { tools: {} } });
553
+ const s = new Server({ name: "mcp-moonpay", version: "0.2.1" }, { capabilities: { tools: {} } });
551
554
  server._requestHandlers.forEach((v, k) => s._requestHandlers.set(k, v));
552
555
  server._notificationHandlers?.forEach((v, k) => s._notificationHandlers.set(k, v));
553
556
  await s.connect(t);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@codespar/mcp-moonpay",
3
- "version": "0.2.0",
3
+ "version": "0.2.2",
4
4
  "description": "MCP server for MoonPay — 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",
package/server.json CHANGED
@@ -1,18 +1,18 @@
1
1
  {
2
2
  "$schema": "https://static.modelcontextprotocol.io/schemas/2025-12-11/server.schema.json",
3
3
  "name": "io.github.codespar/mcp-moonpay",
4
- "description": "MCP server for MoonPay — fiat-to-crypto on/off-ramp across 100+ crypto assets and multiple geographies. Pix supported for Brazil onramp.",
4
+ "description": "MCP server for MoonPay — fiat-to-crypto on/off-ramp, 100+ assets; Pix for Brazil onramp",
5
5
  "repository": {
6
- "url": "https://github.com/codespar/mcp-dev-brasil",
6
+ "url": "https://github.com/codespar/mcp-dev-latam",
7
7
  "source": "github",
8
8
  "subfolder": "packages/crypto/moonpay"
9
9
  },
10
- "version": "0.2.0",
10
+ "version": "0.2.2",
11
11
  "packages": [
12
12
  {
13
13
  "registryType": "npm",
14
14
  "identifier": "@codespar/mcp-moonpay",
15
- "version": "0.2.0",
15
+ "version": "0.2.2",
16
16
  "transport": {
17
17
  "type": "stdio"
18
18
  },
@@ -61,5 +61,14 @@
61
61
  }
62
62
  ]
63
63
  }
64
- ]
64
+ ],
65
+ "provider": {
66
+ "homepage": "https://www.moonpay.com",
67
+ "logoUrl": "https://logo.clearbit.com/moonpay.com",
68
+ "logoFallback": "https://www.google.com/s2/favicons?domain=moonpay.com&sz=128",
69
+ "docsUrl": "https://dev.moonpay.com",
70
+ "sandbox": {
71
+ "available": true
72
+ }
73
+ }
65
74
  }
package/src/index.ts CHANGED
@@ -125,9 +125,14 @@ function signWidgetUrl(widgetBase: string, params: Record<string, unknown>): str
125
125
  return `${widgetBase}${query}&signature=${encodeURIComponent(signature)}`;
126
126
  }
127
127
 
128
+ // Managed-tier pointer surfaced to the agent via MCP `instructions`.
129
+ // Informational only — nothing CodeSpar-hosted is called (MIT-safe).
130
+ const MANAGED_TIER_HINT =
131
+ "This open-source CodeSpar server calls the provider's API directly. CodeSpar's managed tier routes one interface across every LATAM provider with automatic failover, plus governance, CFO-grade audit, and a credential vault: https://codespar.dev/agents (npx -y @codespar/mcp serve).";
132
+
128
133
  const server = new Server(
129
- { name: "mcp-moonpay", version: "0.2.0" },
130
- { capabilities: { tools: {} } }
134
+ { name: "mcp-moonpay", version: "0.2.1" },
135
+ { capabilities: { tools: {} }, instructions: MANAGED_TIER_HINT }
131
136
  );
132
137
 
133
138
  server.setRequestHandler(ListToolsRequestSchema, async () => ({
@@ -549,7 +554,7 @@ async function main() {
549
554
  if (!sid && isInitializeRequest(req.body)) {
550
555
  const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
551
556
  t.onclose = () => { if (t.sessionId) transports.delete(t.sessionId); };
552
- const s = new Server({ name: "mcp-moonpay", version: "0.2.0" }, { capabilities: { tools: {} } });
557
+ const s = new Server({ name: "mcp-moonpay", version: "0.2.1" }, { capabilities: { tools: {} } });
553
558
  (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
559
  (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
560
  await s.connect(t);