Developer API and MCP
DeveloperFluxus exposes the shipped backend surface behind Phase 4: free REST reads, an authenticated send endpoint, an MCP tool layer for AI agents, and monetized machine-payment routes over HTTP 402.


Designed for backends, automations, and agent runtimes that need Tempo-native payments.
Architecture
REST API
Free read endpoints for balances, history, and .pay name resolution, plus one authenticated send route for production integrations.
MPP Gateway
Machine-to-machine endpoints monetize send, streaming, and scheduled payment flows with HTTP 402 pricing in pathUSD.
MCP Server
A compact 12-tool surface lets Claude Code style agents inspect accounts, initiate payments, and prepare Tempo-native intents.
REST API
The public REST layer is intentionally small: four free read routes and one authenticated write route for sending TIP-20 payments.
| Method | Endpoint | Access | Notes |
|---|---|---|---|
| GET | /api/v1/balance/:address | Free | Returns balances for all supported Tempo stablecoins. |
| GET | /api/v1/resolve/:name | Free | Resolves a .pay name to a Tempo address. |
| GET | /api/v1/reverse/:address | Free | Performs reverse lookup for registered .pay names. |
| GET | /api/v1/history/:address | Free | Returns indexed activity with a recent-block fallback when needed. |
| POST | /api/v1/send | Bearer auth | Signs and submits a TIP-20 transfer with optional memo. |
Auth: POST /api/v1/send expects an Authorization: Bearer <FLUXUS_API_KEY> header and signs with the configured sender wallet.
MCP server
Fluxus exposes a compact MCP surface tuned for agent workflows: read account state, resolve names, prepare requests, and trigger payment actions without surfacing unrelated app features.
| Tool | Input | Returns |
|---|---|---|
| get_balance | address | Stablecoin balances for the requested account |
| resolve_name | name | .pay resolution result |
| reverse_lookup | address | Reverse name record for an address |
| get_history | address | Recent on-chain history for an account |
| get_name_info | name | Registration metadata for a .pay name |
| check_name_availability | name, duration_years? | .pay availability and registration fee |
| get_tx_status | hash | Pending, success, or reverted transaction status |
| send_payment | to, amount, token, memo? | Authenticated single transfer result |
| batch_send | recipients[].{to, amount, memo?} | Client-side batch payment orchestration |
| create_request | amount, token, memo? | Shareable payment request intent |
| start_stream | to, amount, duration_minutes | Streaming payment setup URL (no on-chain action) |
| create_scheduled | to, amount, delay_minutes, window_minutes | Scheduled payment setup URL (no on-chain action) |
Claude Code JSON config
{
"mcpServers": {
"fluxus": {
"command": "npx",
"args": ["fluxus-mcp"],
"env": {
"FLUXUS_BASE_URL": "https://your-domain.com",
"FLUXUS_API_KEY": "your-bearer-token"
}
}
}
}MPP
Machine Payments Protocol adds paid agent routes. Read endpoints stay free, while send and intent-creation endpoints challenge with HTTP 402 and settle in pathUSD. /api/mpp/send is the one route that executes a transfer end to end; the stream and scheduled routes sell an intent link, not an executed payment. A machine-readable description of all of them lives at /openapi.json.
| Method | Endpoint | Price | Notes |
|---|---|---|---|
| GET | /api/mpp/balance/:address | Free | Machine-readable balance lookup for agent clients. |
| GET | /api/mpp/resolve/:name | Free | Machine-readable .pay resolution. |
| GET | /api/mpp/history/:address | Free | Machine-readable history lookup. |
| POST | /api/mpp/send | 0.01 pathUSD | Paid direct send execution. |
| POST | /api/mpp/stream | 0.02 pathUSD | Intent handoff: returns a deep link a human completes in the app. No channel is opened and no funds stream server-side. |
| POST | /api/mpp/scheduled | 0.02 pathUSD | Intent handoff: returns a deep link a human completes in the app. The payment is scheduled in the app, not by this endpoint. |
Step 1 — get the challenge (runnable, no credentials needed)
curl -i -X POST https://fluxuspay.app/api/mpp/send \
-H 'content-type: application/json' \
-d '{"to":"0x000000000000000000000000000000000000aBcd","amount":"1.50","token":"pathUSD"}'The server answers 402 Payment Required with the challenge in the WWW-Authenticate: Payment ... header and Cache-Control: no-store. The body describes what to pay:
HTTP/1.1 402 Payment Required
www-authenticate: Payment <challenge>
cache-control: no-store
{ "amount": "0.01", "currency": "pathUSD", "recipient": "0x..." }Step 2 — pay and retry
A Credential must be signed by a Tempo account, so plain curl cannot produce one. Any MPP client can: the payment-aware fetch below settles the charge in pathUSD and replays the request with Authorization: Payment <credential>.
import { Mppx, tempo } from "mppx/client";
import { privateKeyToAccount } from "viem/accounts";
const mppx = Mppx.create({
methods: [tempo({ account: privateKeyToAccount(process.env.AGENT_PRIVATE_KEY) })],
});
// mppx.fetch handles the 402 round-trip: challenge -> credential -> retry
const res = await mppx.fetch("https://fluxuspay.app/api/mpp/send", {
method: "POST",
headers: { "content-type": "application/json" },
body: JSON.stringify({ to: "0xRecipient", amount: "1.50", token: "pathUSD" }),
});
console.log(res.status); // 200
console.log(res.headers.get("payment-receipt")); // signed Receipt
console.log(await res.json()); // { hash, explorerUrl, ... }On success the response carries a signed Payment-Receipt header and Cache-Control: private. A replayed or tampered Credential is rejected with a fresh 402 rather than a 200.
Bearer alternative — /api/v1/send (fully runnable with curl)
curl -X POST https://fluxuspay.app/api/v1/send \
-H "authorization: Bearer $FLUXUS_API_KEY" \
-H 'content-type: application/json' \
-d '{"to":"0xRecipient","amount":"1.50","token":"pathUSD","memo":"invoice-42"}'
# → {"amount":"1.50","amountUnits":"1500000","explorerUrl":"https://explore.tempo.xyz/tx/0x...",
# "hash":"0x...","memo":"invoice-42","to":"0xRecipient","token":"pathUSD"}Environment variables
| Variable | Required | Notes |
|---|---|---|
| FLUXUS_API_KEY | Required for /api/v1/send | Bearer token checked before authenticated send execution. |
| FLUXUS_SENDER_PRIVATE_KEY | Required | Signing key used by authenticated send and MPP paid routes. |
| MPP_SECRET_KEY | Required for /api/mpp/* | Enables HTTP 402 challenge and receipt handling. |
| NEXT_PUBLIC_TEMPO_RPC_URL | Optional | Overrides the selected Tempo network's default RPC endpoint. |
Network info
- Chain ID: 4217
- RPC: https://rpc.tempo.xyz
- Explorer: https://explore.tempo.xyz
- Settlement token: pathUSD (6 decimals)

