Skills · Commerce — discover & buy
buy-liquidity
Give an agent inbound Lightning liquidity so it can receive — buy a channel from the Magma marketplace in one call, composing this site's directory with Amboss's magma-mcp.
MCP servers: https://marketplace.bitcoineconomy.ai/mcp (discovery — this site) · @ambosstech/magma-mcp (liquidity — Amboss Magma)
Environment: MAGMA_API_KEY (optional — adds persistent order history; the buy path is public)
What it does
An agent that earns over Lightning needs inbound liquidity — the capacity to receive. This skill buys it: it composes the site’s directory (to discover Magma and its MCP) with Amboss’s magma-mcp to lease a channel from the Magma marketplace in a single call — sized in dollars, paid in sats, opened straight to the agent’s own node. No human at a liquidity desk, no account required.
It composes two pieces:
- This site’s directory (
marketplace.bitcoineconomy.ai/mcp) —get_service { slug: "amboss" }andlist_mcp_serverssurface Magma’s machine detail and point at its own MCP. We discover; Amboss’s MCP executes. - Amboss’s
magma-mcp(@ambosstech/magma-mcp, MIT, stdio) — exposes the whole purchase as onebuy_lightning_liquiditytool. It escrows the deal with a non-custodial HODL invoice, so the seller is paid only if the channel actually opens, and the channel opens directly to the agent’s own node. We never touch the funds or the channel.
The result is an agent provisioning its own ability to get paid — permissionlessly, on the Bitcoin substrate.
When to use it
- An agent earns over Lightning and is hitting (or wants to pre-empt) an inbound-liquidity ceiling.
- You want paid-for receive capacity on demand, without running a liquidity desk or hand-picking channel partners.
- You’re assembling an autonomous treasury/“banker” agent and need the receive side handled programmatically.
Install
Add both servers to your agent’s MCP config — the marketplace server is a remote Streamable-HTTP endpoint; Magma’s MCP runs locally over stdio.
{
"mcpServers": {
"bitcoineconomy": {
"url": "https://marketplace.bitcoineconomy.ai/mcp"
},
"magma": {
"command": "npx",
"args": ["-y", "@ambosstech/magma-mcp"],
"env": { "MAGMA_API_KEY": "" }
}
}
}
- MCP clients (Claude, Cursor, Hermes, n8n): use the block above. If your client can’t take a remote MCP by
url, bridge it withmcp-remote:"command": "npx", "args": ["-y", "mcp-remote", "https://marketplace.bitcoineconomy.ai/mcp"]. - OpenClaw / SKILL.md agents: point at the same two endpoints — discovery is a plain HTTP MCP (or read
directory.jsondirectly), liquidity is the Magma MCP. Cross-agent by design. - No MCP framework: the buy path is also a public GraphQL mutation (
liquidity.buyatmagma.amboss.tech/graphql) — no account, no key required; an anonymous buyer receives asession_keyto track the order.
The buy path needs no Amboss account (MAGMA_API_KEY is optional, only for persistent order history).
Use it
The loop, in plain steps:
get_service { "slug": "amboss" }— confirm Magma’s detail and its MCP endpoint from the directory.- Estimate size: the public
liquidity_per_usdquery (ormagma-mcp) tells you channel size per dollar. buy_lightning_liquiditywith your node’sconnection_uri(pubkey@host:port, fromgetinfo) and a dollar amount (minimum ~$5) → pay the returned HODL invoice from your node → pollget_orderuntilVALID_CHANNEL_OPENING.
A natural-language version your agent can run: “Buy $20 of inbound Lightning liquidity for my node from Magma, pay the lease invoice, and confirm the channel opened.”
Verify
list_mcp_serversshould list amboss (@ambosstech/magma-mcp, stdio) — discovery is wired.- Run a tiny lease first ($5 minimum) to confirm the flow end to end before any larger purchase.
- Confirm the channel opened to your node (
VALID_CHANNEL_OPENING/listchannels).
Gotchas & safety
- You need your own node. Magma opens a channel to your LND/CLN/Eclair node — it presupposes a node and funds; it is not a custodial “receive without infrastructure” path. To skip channel management entirely, the L3 ecash route (Cashu) is lighter.
- The lease is time-bounded. A bought channel is leased for a term — plan for renewal or replacement; inbound liquidity isn’t permanent.
- Non-custodial escrow, but verify the counterparty. The HODL invoice means you pay only if the channel opens, but sellers and pricing vary — Magma runs a reputation system; check before relying on any single counterparty.
- Budget the spend. Choose the size deliberately; an agent should buy only the capacity the task needs.