onlymemes-mcp
v0.2.0
Published
MCP server for OnlyMemes Stacknet: rent machines (inference, VMs) and pay as you go in SOL or USDC, from any MCP client. Nothing else to install.
Maintainers
Readme
onlymemes-mcp
Let Claude (or any MCP client) rent machines on OnlyMemes Stacknet (GPU inference, VMs), paying as it goes in SOL or USDC under the lease it signs. Nothing else to install: the package runs an OnlyMemes account and its network connection in the MCP server itself.
Preview: Stacknet runs on Solana devnet and a Stripe sandbox today. Leases are paid in devnet SOL and USDC, which have no value, and the access key is paid with a sandbox token, so nothing is charged.
1. Add it to your MCP client
Node 22 or newer (or Bun):
claude mcp add onlymemes -e ONLYMEMES_MAX_SPEND=usdc:5,sol:0.05 -- npx -y onlymemes-mcpAny other MCP client:
{ "mcpServers": { "onlymemes": { "command": "npx", "args": ["-y", "onlymemes-mcp"],
"env": { "ONLYMEMES_MAX_SPEND": "usdc:5,sol:0.05" } } } }| Setting | Meaning |
|---|---|
| ONLYMEMES_MAX_SPEND | The most one lease may cost, per currency, e.g. usdc:5,sol:0.05,om:1000. A lease costing more (price × term, from the verified registry), or in a currency with no limit, is refused. |
| ONLYMEMES_HOME | Where the account lives (default ~/.onlymemes-tenant). |
| ONLYMEMES_PASSWORD_FILE | The account's password, which is also your consent to pay a lease you open (default $ONLYMEMES_HOME/password, created 0600 if missing). Never a tool argument. |
2. Set up the account: one tool call
account_setup {"paymentToken":"spt_…"} creates the account, buys its access key and logs in. The token is a Stripe shared payment token from your agent's own Stripe wallet, so no card data reaches OnlyMemes. During the preview, get a sandbox one (15 minutes, paid with Stripe's test card):
curl -s -X POST https://www.onlymemes.dev/api/checkout -H 'content-type: application/json' -d '{"op":"sandboxToken","offer":"omkey_basic"}'It returns the account's public facts (Solana address, OM address, plan, paid through) and what is still missing. Call it again at any time: it changes nothing when all is done. Back up ONLYMEMES_HOME together with the password file; the account's keys there are encrypted with that password.
3. Fund it
Send devnet SOL (fees and SOL leases) and devnet USDC (USDC leases) to the solana address account_setup returned: SOL from https://faucet.solana.com, USDC from https://faucet.circle.com (network: Solana Devnet).
4. Your first lease
For a VM: pass your SSH public key (ssh-ed25519 AAAA…, never the private key) as sshKey in lease_open; once the machine reports its ports, lease_state shows access.ssh (onlymemes@<host> -p <port>) and access.https.
A real run (an MCP client on stdio, devnet USDC, an inference offer, 2026-11-12):
registry_state {"connect":"omnet-session","currency":"usdc"}lists the offers. Each row hasnode(the machine's node key, whichlease_opentakes aspeer),records.binding,records.offer,pricePerHourin base units (USDC has 6 decimals:100000= 0.10 USDC/h),settleEvery,models(["TinyLlama-1.1B"]),connect(vmrows also carryendpoint).lease_open {"peer":<node>,"binding":<records.binding>,"offer":<records.offer>,"term":3600}(add"sshKey":"ssh-ed25519 AAAA…"for avmoffer, never the private key) returnsleaseId,sessionIdandspend {"maxCost":"0.1 usdc","pricePerHour":"0.1 usdc"}. This account now pays under the lease you just signed, with no prompts, up to the term.lease_state {"leaseId":…}showsstage: "admitting"until the machine accepts (about two seconds; if it answersUnknownLease, ask again), thenlivewithsession.phase: "active". Avmlease also showsaccess.ssh(onlymemes@<host> -p <port>) andaccess.httpsonce the machine reports its ports.session_command {"sessionId":<sessionId>,"command":{"v":1,"id":"inf-1","capability":"inference","method":"complete","params":{"prompt":"In one sentence: what is a decentralized compute marketplace?","maxTokens":64}}}runs one of the offer's commands on the machine. Without om installed the reply carries the result (payload.result, about 6 s); with om, it only accepts the command, so callsession_listuntil a row'sresult.idisinf-1(four polls, about 8 s, in this run):{"id":"inf-1","ok":true,"payload":{"model":"TheBloke/TinyLlama-1.1B-Chat-v1.0-GGUF::Q4_K_M","text":"A decentralized compute marketplace is a platform that enables users to connect with other users and use their computing resources…","firstTokenMs":695.6}}Queued is not done; never resend a command whose result has not arrived.SessionNotActivemeans the lease session is still opening: try again in a second. (TinyLlama is a small model and sometimes answers in another language.)lease_end {"leaseId":…}stops it early (status: "ending"). You pay only what accrued: herelease_stateshowedstage: "settling",accrued: "417",paid: "417"(0.000417 USDC), andlease_paymentslisted the Solana payment withstatus: "credited", the machine's word that it was received.
Only the row's own params are accepted, typed as the catalog declares.
The tools are the catalog's tenant rows (registry_state, lease_open, lease_list, lease_state, lease_payments, lease_end, lease_pause, lease_resume, wallet_state, session_command, session_list) plus account_setup. Only a row's own params are accepted, typed as the catalog declares.
Running your own node
On a machine with the OnlyMemes package installed (Debian 13: curl -fsSL https://deb.apt.onlymemes.com/install.sh | sudo sh -s -- --channel dev --cuda no), the server uses that machine's om and its full node instead (set OM_BIN, or have om on PATH): same tools, same replies.
