Agent-native lending on Solana via x402: borrow against tokens, arm in-vault TP/SL, repay.
Agent-native lending on Solana via x402: borrow against tokens, arm in-vault TP/SL, repay. Exposed over MCP by the magpie mcp server, that capability becomes something an assistant can invoke while it works, not something you go and do afterwards.
Borrow SOL against your memecoins, tokenized stocks, and RWAs — and set take-profits and stops on that same collateral. Liquidity now, upside intact: collateral that can still sell itself.
Everything the assistant can do here goes through one of these:
vercel.json — routes all paths to /apiMAGPIE_PAY_TO — your Solana treasury pubkeyMAGPIE_LENDER_PUBKEY — the Magpie lender authoritySOLANA_RPC_URL — use a paid Helius/Triton/QuickNode URL for speed (public RPC will rate-limit you)CORS_ORIGINS — comma-separated allowlist (use * only during testing)Replay — resistant.** Single-use nonces bound to payment memosRate — limited from day one** — per-IP minute + hour buckets on every endpointMethod — PathGET — /POST — /api/v1/agent/build-borrowInstallation goes through your MCP client rather than a global install: point it at tsx on npm and it is fetched when the client starts. The copy-paste blocks for Claude Desktop, Claude Code and Cursor are further down this page.
You will need one environment variable: SOLANA_RPC_URL. The server will not start without them, which is usually why the tools fail to appear on a first run. Keep credentials in your client's env block or a secrets manager rather than in a file you might commit.
Among the payments and commerce options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Magpie's toolset — vercel.json, MAGPIE_PAY_TO, MAGPIE_LENDER_PUBKEY and 7 more — is a fair guide to whether it matches your workflow. It is maintained by magpiecapital; worth a glance at recent repository activity before you build anything load-bearing on it.
This entry was verified against Magpie's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.
| Tool | What it does |
|---|---|
| vercel.json | routes all paths to /api |
| MAGPIE_PAY_TO | your Solana treasury pubkey |
| MAGPIE_LENDER_PUBKEY | the Magpie lender authority |
| SOLANA_RPC_URL | use a paid Helius/Triton/QuickNode URL for speed (public RPC will rate-limit you) |
| CORS_ORIGINS | comma-separated allowlist (use * only during testing) |
| Replay | resistant.** Single-use nonces bound to payment memos. |
| Rate | limited from day one** — per-IP minute + hour buckets on every endpoint. |
| Method | Path |
| GET | / |
| POST | /api/v1/agent/build-borrow |
{
"mcpServers": {
"magpie": {
"command": "npx",
"args": ["-y", "tsx"],
"env": {
"SOLANA_RPC_URL": "your-value"
}
}
}
}Add to claude_desktop_config.json, then restart Claude Desktop.
| Variable | Description | Required |
|---|---|---|
| SOLANA_RPC_URL | Endpoint or connection string the server talks to. | Yes |
Payments infrastructure meets AI — customers, invoices, subscriptions and current API docs from Stripe's server.
Build for Shopify with current APIs — the official Dev MCP server for schema-accurate storefront and admin code.
Give your AI assistant a supervised window into your Interactive Brokers account — balances, positions, live quotes and orders.
Invoices, payments and disputes through PayPal's official server — commerce operations by conversation.
Enables querying and listing Azure resources and costs directly from an MCP client.
Empowers LLMs with Bitcoin Lightning Network payment capabilities via the ZBD API.