
Company News
Free Business Plan Upgrades for Open Source Maintainers
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.
@morebetterclaw/forge-swap
Advanced tools
FORGE — cross-chain swap agent powered by THORChain. Protocol-native routing with embedded affiliate fees.
A production-ready HTTP API for cross-chain token swaps via THORChain. It routes swap quotes and executes transactions through THORNode directly — no centralised exchange, no custodian. Designed for agent-to-agent use: any AI agent or automated system can POST a swap request and receive back the deposit memo and vault address needed to execute on-chain.
Every swap routed through this service collects a 0.5% affiliate fee to a configurable THORChain address, making it a self-sustaining revenue-generating infrastructure component. Fees are embedded directly in the THORChain memo and settled natively by the protocol — no invoicing, no off-chain reconciliation.
git clone <your-repo-url>
cd crypto-swap-agent
cp .env.example .env
# Fill in FEE_RECIPIENT_ADDRESS (your thor1... address)
npm install
npm start
# Server at http://localhost:3000
GET /healthService health check. Used by Railway and uptime monitors.
Response:
{ "status": "ok", "version": "0.1.0", "timestamp": "2026-03-14T00:00:00.000Z" }
POST /swap/quoteGet a swap quote with affiliate fee included.
Request body:
{
"fromAsset": "ETH.ETH",
"toAsset": "BTC.BTC",
"amount": "0.1"
}
Response:
{
"fromAsset": "ETH.ETH",
"toAsset": "BTC.BTC",
"amount": "0.1",
"expectedOutput": "0.00315",
"expectedOutputMinusFees": "0.00312",
"affiliateFee": "0.5%",
"route": ["THORChain"],
"slippage": "0.50%",
"expiresAt": "2026-03-14T00:00:30.000Z"
}
POST /swap/executeBuild swap transaction data. Returns the memo and deposit address for on-chain execution.
Request body:
{
"fromAsset": "ETH.ETH",
"toAsset": "BTC.BTC",
"amount": "0.1",
"destinationAddress": "bc1q..."
}
Response:
{
"status": "pending_signature",
"memo": "=:BTC.BTC:bc1q...:0/3/0:thor1ab12:50",
"depositAsset": "ETH.ETH",
"depositAmount": 0.1,
"depositAddress": "0xTHORVault...",
"expectedOutput": "0.00312",
"route": ["THORChain"],
"affiliateFee": "0.5%",
"warning": "Wallet signing required — call wallet.sign(swapData) to execute"
}
GET /swap/status?txHash=<hash>Check the status of a submitted swap transaction via Midgard.
Response: Raw Midgard v2/actions response for the tx.
GET /swap/assetsList all supported assets (THORChain pools via Midgard).
Response: Array of pool/asset objects.
FORGE exposes a Model Context Protocol server at /mcp using Streamable HTTP transport (2026 spec).
Any MCP-compatible AI agent (Claude, GPT, Cursor, etc.) can discover and call FORGE natively.
Endpoint: POST /mcp
Discovery: GET /.well-known/mcp.json
Available tools: forge_quote, forge_execute, forge_assets, forge_status
Claude Desktop config:
{
"mcpServers": {
"forge": {
"url": "https://forge.morebetterstudios.com/mcp",
"transport": "streamable-http"
}
}
}
Why MCP: Enables zero-friction discovery and calling by any frontier AI agent without API key registration or custom integration.
| Variable | Required | Default | Description |
|---|---|---|---|
FEE_RECIPIENT_ADDRESS | Yes | — | THORChain thor1... address for affiliate fee collection |
SWAP_FEE_BPS | No | 50 | Fee in basis points (50 = 0.5%) |
WALLET_PRIVATE_KEY | No | — | EVM private key for autonomous swap execution |
EVM_RPC_URL | No | — | Alchemy/Infura RPC URL for EVM signing |
PORT | No | 3000 | HTTP port |
NODE_ENV | No | production | Node environment |
ALLOWED_ORIGINS | No | * | CORS allowed origins |
LOG_LEVEL | No | info | Logging verbosity |
RATE_LIMIT_WINDOW_MS | No | 60000 | Rate limit window in ms |
RATE_LIMIT_MAX | No | 100 | Max requests per window |
Full Railway deployment guide: deploy/README.md
Every swap routed through this agent includes a 0.5% affiliate fee (configurable via SWAP_FEE_BPS). The fee address (FEE_RECIPIENT_ADDRESS) must be a valid THORChain thor1... address.
The fee is embedded in the THORChain memo at the protocol level:
=:BTC.BTC:bc1q...:0/3/0:thor1xxxx:50
THORChain nodes enforce and distribute this fee natively — there is no off-chain settlement or trust assumption. At current volumes, each basis point of fee on a $10k swap = $1 in RUNE credited to your address.
This service is packaged as an OpenClaw skill. See SKILL.md for the skill definition and invocation instructions.
Additional trading agent integrations coming soon:
FAQs
FORGE — cross-chain swap agent powered by THORChain. Protocol-native routing with embedded affiliate fees.
We found that @morebetterclaw/forge-swap demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Open source maintainers are under more pressure than ever. We're raising our open source program from the Team plan to the Business plan, free.

Security News
The supply chain control that delays freshly published gems now covers lockfile generation and gem vendoring in Ruby projects.

Security News
During a UK cyber test, a Mythos 5 agent used sockpuppets, social engineering, and prompt injection to try to get a maintainer to merge malware.