Use send21 with Muse Code
Muse Code is Meta's coding agent for the terminal and CI. Add send21 as an MCP server and it can create crypto pay links and check whether they were paid while it builds your app. Muse Code prepares the pay link; the payer signs and sends from their own wallet. send21 never holds keys or funds, so no key you give Muse Code can move money.
Before you start
- Sign in to send21 and open API keys. Create a key with only the scopes the job needs, for example
drafts:read,drafts:writeandaddressbook:read. Name it Muse Code. Keys are shown once. - Approve your receiving addresses in the send21 app. Pay links only go to addresses you approved.
- Put the key in an environment variable, for example
SEND21_API_KEY, not in the settings file.
Add send21 to Muse Code
Add send21 to the mcp_servers block of ~/.config/muse/settings.json. If the file already exists, add only the send21 entry and keep "schema_version": 1: Muse Code refuses a settings file without it. ${SEND21_API_KEY} is read from the environment.
{
"schema_version": 1,
"mcp_servers": {
"send21": {
"transport": "streamable_http",
"url": "https://send21.io/mcp",
"headers": { "Authorization": "Bearer ${SEND21_API_KEY}" },
"mode": "optional"
}
}
}Or sign in instead of a key
Muse Code can sign in to remote servers. Use "url": "https://send21.io/mcp/oauth" with no headers, then run muse mcp login send21: send21 opens in your browser, you sign in and approve. The connection renews itself and only ever uses receiving addresses you approved.
Check the connection
- Run
/mcpin a session to see send21 and its 14 tools. - With
mode: "optional", Muse Code skips send21 with a warning if it cannot connect, instead of stopping the run. Leavemodeout (required) to make send21 mandatory. - Every send21 tool says whether it only reads. With approvals on, Muse Code runs the read-only tools (status, rates, address book) without asking and asks before the tools that create something. See tool annotations.
What Muse Code can do
- Create a pay link priced in any of 161 fiat currencies, paid in BTC (on-chain or Lightning), USDC, USDT, EURC, SOL or ETH to your approved addresses. USDT is on Solana and Ethereum only.
- Create payment drafts and wallet-ready payment instructions.
- Check whether a pay link or draft is paid.
- Propose a new receiving address for you to approve.
- Read your address book, account status, exchange rates and fees.
What Muse Code cannot do
- Move, sign or send money. The payer always signs in their own wallet.
- Approve a receiving address. You do that yourself in the send21 app with a passkey or authenticator code. A pay link to any other address is refused.
- Accept or decline a payment with a different amount. That decision is yours.
- See your private keys or seed phrase. send21 never asks for them.
Rules for the agent
Paste the rules for a coding agent into your project's AGENTS.md, so Muse Code keeps to them while it builds.
Try it first
The testnet demo runs the whole flow on test networks with free test coins, with no account and no key. Accounts and API keys use the live networks; a pay link moves no money until someone pays it. Questions: info@send21.io.
Related
Start building
Create a free account to get an API key, or try the whole flow first on test networks.
This page is also available as Markdown: /docs/muse.md. Questions: integration@send21.io.