@codespar/mcp-circle 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 +21 -8
- package/dist/index.js +5 -2
- package/package.json +1 -1
- package/server.json +13 -4
- package/src/__tests__/index.test.ts +3 -3
- package/src/index.ts +8 -3
package/README.md
CHANGED
|
@@ -49,19 +49,32 @@ Add to `.cursor/mcp.json` or `.vscode/mcp.json`:
|
|
|
49
49
|
}
|
|
50
50
|
```
|
|
51
51
|
|
|
52
|
-
## Tools
|
|
52
|
+
## Tools (23)
|
|
53
53
|
|
|
54
|
-
| Tool |
|
|
55
|
-
|
|
56
|
-
| `create_wallet` | Create a new Circle wallet |
|
|
54
|
+
| Tool | Purpose |
|
|
55
|
+
|---|---|
|
|
56
|
+
| `create_wallet` | Create a new Circle business-account wallet |
|
|
57
57
|
| `get_wallet` | Get wallet details by ID |
|
|
58
|
+
| `list_wallets` | List all Circle wallets |
|
|
58
59
|
| `create_payment` | Accept a USDC payment via Circle |
|
|
59
60
|
| `get_payment` | Get payment details by ID |
|
|
60
61
|
| `create_payout` | Create a payout from Circle (USDC to fiat) |
|
|
61
62
|
| `get_payout` | Get payout details by ID |
|
|
62
|
-
| `
|
|
63
|
+
| `list_payouts` | List payouts with optional filters |
|
|
64
|
+
| `create_transfer` | Create a USDC transfer between Circle wallets (or to blockchain address) |
|
|
63
65
|
| `get_transfer` | Get transfer details by ID |
|
|
64
|
-
| `
|
|
66
|
+
| `list_transfers` | List transfers with optional filters |
|
|
67
|
+
| `create_card` | Register card data for on-ramp payments |
|
|
68
|
+
| `get_card` | Get card details by ID |
|
|
69
|
+
| `list_cards` | List registered cards |
|
|
70
|
+
| `list_settlements` | List settlements (card payment batches) |
|
|
71
|
+
| `get_settlement` | Get settlement details by ID |
|
|
72
|
+
| `list_chargebacks` | List chargebacks |
|
|
73
|
+
| `get_chargeback` | Get chargeback details by ID |
|
|
74
|
+
| `create_subscription` | Register a notification subscription (webhook) |
|
|
75
|
+
| `list_subscriptions` | List notification subscriptions (webhooks) |
|
|
76
|
+
| `delete_subscription` | Delete a notification subscription |
|
|
77
|
+
| `get_balance` | Get business-account balance |
|
|
65
78
|
| `list_transactions` | List transactions with optional filters |
|
|
66
79
|
|
|
67
80
|
## Authentication
|
|
@@ -98,13 +111,13 @@ Circle provides a sandbox at `api-sandbox.circle.com`. Use a sandbox API key for
|
|
|
98
111
|
- `smart_contract_calls` — Execute smart contract calls
|
|
99
112
|
- `cross_chain_transfers` — Transfer assets across blockchains
|
|
100
113
|
|
|
101
|
-
Want to contribute? [Open a PR](https://github.com/codespar/mcp-dev-
|
|
114
|
+
Want to contribute? [Open a PR](https://github.com/codespar/mcp-dev-latam) or [request a tool](https://github.com/codespar/mcp-dev-latam/issues).
|
|
102
115
|
|
|
103
116
|
## Links
|
|
104
117
|
|
|
105
118
|
- [Circle Website](https://circle.com)
|
|
106
119
|
- [Circle API Documentation](https://developers.circle.com)
|
|
107
|
-
- [MCP Dev
|
|
120
|
+
- [MCP Dev LATAM](https://github.com/codespar/mcp-dev-latam)
|
|
108
121
|
- [Landing Page](https://codespar.dev/mcp)
|
|
109
122
|
|
|
110
123
|
## Enterprise
|
package/dist/index.js
CHANGED
|
@@ -52,7 +52,10 @@ async function circleRequest(method, path, body) {
|
|
|
52
52
|
}
|
|
53
53
|
return res.json();
|
|
54
54
|
}
|
|
55
|
-
|
|
55
|
+
// Managed-tier pointer surfaced to the agent via MCP `instructions`.
|
|
56
|
+
// Informational only — nothing CodeSpar-hosted is called (MIT-safe).
|
|
57
|
+
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).";
|
|
58
|
+
const server = new Server({ name: "mcp-circle", version: "0.2.1" }, { capabilities: { tools: {} }, instructions: MANAGED_TIER_HINT });
|
|
56
59
|
const amountSchema = {
|
|
57
60
|
type: "object",
|
|
58
61
|
properties: {
|
|
@@ -444,7 +447,7 @@ async function main() {
|
|
|
444
447
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
445
448
|
t.onclose = () => { if (t.sessionId)
|
|
446
449
|
transports.delete(t.sessionId); };
|
|
447
|
-
const s = new Server({ name: "mcp-circle", version: "0.2.
|
|
450
|
+
const s = new Server({ name: "mcp-circle", version: "0.2.1" }, { capabilities: { tools: {} } });
|
|
448
451
|
server._requestHandlers.forEach((v, k) => s._requestHandlers.set(k, v));
|
|
449
452
|
server._notificationHandlers?.forEach((v, k) => s._notificationHandlers.set(k, v));
|
|
450
453
|
await s.connect(t);
|
package/package.json
CHANGED
package/server.json
CHANGED
|
@@ -3,16 +3,16 @@
|
|
|
3
3
|
"name": "io.github.codespar/mcp-circle",
|
|
4
4
|
"description": "MCP server for Circle — USDC payments, wallets, payouts, transfers",
|
|
5
5
|
"repository": {
|
|
6
|
-
"url": "https://github.com/codespar/mcp-dev-
|
|
6
|
+
"url": "https://github.com/codespar/mcp-dev-latam",
|
|
7
7
|
"source": "github",
|
|
8
8
|
"subfolder": "packages/crypto/circle"
|
|
9
9
|
},
|
|
10
|
-
"version": "0.2.
|
|
10
|
+
"version": "0.2.2",
|
|
11
11
|
"packages": [
|
|
12
12
|
{
|
|
13
13
|
"registryType": "npm",
|
|
14
14
|
"identifier": "@codespar/mcp-circle",
|
|
15
|
-
"version": "0.2.
|
|
15
|
+
"version": "0.2.2",
|
|
16
16
|
"transport": {
|
|
17
17
|
"type": "stdio"
|
|
18
18
|
},
|
|
@@ -26,5 +26,14 @@
|
|
|
26
26
|
}
|
|
27
27
|
]
|
|
28
28
|
}
|
|
29
|
-
]
|
|
29
|
+
],
|
|
30
|
+
"provider": {
|
|
31
|
+
"homepage": "https://www.circle.com",
|
|
32
|
+
"logoUrl": "https://logo.clearbit.com/circle.com",
|
|
33
|
+
"logoFallback": "https://www.google.com/s2/favicons?domain=circle.com&sz=128",
|
|
34
|
+
"docsUrl": "https://developers.circle.com",
|
|
35
|
+
"sandbox": {
|
|
36
|
+
"available": true
|
|
37
|
+
}
|
|
38
|
+
}
|
|
30
39
|
}
|
|
@@ -32,9 +32,9 @@ beforeEach(async () => {
|
|
|
32
32
|
});
|
|
33
33
|
|
|
34
34
|
describe("mcp-circle", () => {
|
|
35
|
-
it("should register
|
|
35
|
+
it("should register 23 tools", async () => {
|
|
36
36
|
const result = await listToolsHandler();
|
|
37
|
-
expect(result.tools).toHaveLength(
|
|
37
|
+
expect(result.tools).toHaveLength(23);
|
|
38
38
|
});
|
|
39
39
|
|
|
40
40
|
it("should call correct API endpoint for create_wallet", async () => {
|
|
@@ -43,7 +43,7 @@ describe("mcp-circle", () => {
|
|
|
43
43
|
await callToolHandler({ params: { name: "create_wallet", arguments: { idempotencyKey: "key1" } } });
|
|
44
44
|
|
|
45
45
|
const [url, opts] = mockFetch.mock.calls[0];
|
|
46
|
-
expect(url).toContain("api.circle.com/v1/wallets");
|
|
46
|
+
expect(url).toContain("api.circle.com/v1/businessAccount/wallets");
|
|
47
47
|
expect(opts.method).toBe("POST");
|
|
48
48
|
expect(opts.headers.Authorization).toBe("Bearer test-key");
|
|
49
49
|
});
|
package/src/index.ts
CHANGED
|
@@ -60,9 +60,14 @@ async function circleRequest(method: string, path: string, body?: unknown): Prom
|
|
|
60
60
|
return res.json();
|
|
61
61
|
}
|
|
62
62
|
|
|
63
|
+
// Managed-tier pointer surfaced to the agent via MCP `instructions`.
|
|
64
|
+
// Informational only — nothing CodeSpar-hosted is called (MIT-safe).
|
|
65
|
+
const MANAGED_TIER_HINT =
|
|
66
|
+
"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).";
|
|
67
|
+
|
|
63
68
|
const server = new Server(
|
|
64
|
-
{ name: "mcp-circle", version: "0.2.
|
|
65
|
-
{ capabilities: { tools: {} } }
|
|
69
|
+
{ name: "mcp-circle", version: "0.2.1" },
|
|
70
|
+
{ capabilities: { tools: {} }, instructions: MANAGED_TIER_HINT }
|
|
66
71
|
);
|
|
67
72
|
|
|
68
73
|
const amountSchema = {
|
|
@@ -474,7 +479,7 @@ async function main() {
|
|
|
474
479
|
if (!sid && isInitializeRequest(req.body)) {
|
|
475
480
|
const t = new StreamableHTTPServerTransport({ sessionIdGenerator: () => randomUUID(), onsessioninitialized: (id) => { transports.set(id, t); } });
|
|
476
481
|
t.onclose = () => { if (t.sessionId) transports.delete(t.sessionId); };
|
|
477
|
-
const s = new Server({ name: "mcp-circle", version: "0.2.
|
|
482
|
+
const s = new Server({ name: "mcp-circle", version: "0.2.1" }, { capabilities: { tools: {} } }); (server as any)._requestHandlers.forEach((v: any, k: any) => (s as any)._requestHandlers.set(k, v)); (server as any)._notificationHandlers?.forEach((v: any, k: any) => (s as any)._notificationHandlers.set(k, v)); await s.connect(t);
|
|
478
483
|
await t.handleRequest(req, res, req.body); return;
|
|
479
484
|
}
|
|
480
485
|
res.status(400).json({ jsonrpc: "2.0", error: { code: -32000, message: "Bad Request" }, id: null });
|