Skip to content
FluxusDocs
Fluxus DocumentationFluxus Documentation

Developer API and MCP

Developer

Fluxus 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.

Developer API and MCPDeveloper API and MCP

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 nine-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.

MethodEndpointAccessNotes
GET/api/v1/balance/:addressFreeReturns balances for all supported Tempo stablecoins.
GET/api/v1/resolve/:nameFreeResolves a .pay name to a Tempo address.
GET/api/v1/reverse/:addressFreePerforms reverse lookup for registered .pay names.
GET/api/v1/history/:addressFreeReturns indexed activity with a recent-block fallback when needed.
POST/api/v1/sendBearer authSigns 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.

ToolInputReturns
get_balanceaddressStablecoin balances for the requested account
resolve_namename.pay resolution result
reverse_lookupaddressReverse name record for an address
get_historyaddressRecent on-chain history for an account
send_paymentto, amount, token, memo?Authenticated single transfer result
batch_sendrecipients[].{to, amount, memo?}Client-side batch payment orchestration
create_requestamount, token, memo?Shareable payment request intent
start_streamto, amount, duration_minutesStreaming payment setup URL (no on-chain action)
create_scheduledto, amount, delay_minutes, window_minutesScheduled 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.

MethodEndpointPriceNotes
GET/api/mpp/balance/:addressFreeMachine-readable balance lookup for agent clients.
GET/api/mpp/resolve/:nameFreeMachine-readable .pay resolution.
GET/api/mpp/history/:addressFreeMachine-readable history lookup.
POST/api/mpp/send0.01 pathUSDPaid direct send execution.
POST/api/mpp/stream0.02 pathUSDPaid streaming setup intent.
POST/api/mpp/scheduled0.02 pathUSDPaid scheduled payment setup intent.

HTTP 402 flow example

POST /api/mpp/send
→ 402 Payment Required
{
  "paymentMethod": "mpp-tempo-charge",
  "amount": "0.01",
  "currency": "pathUSD"
}

POST /api/mpp/send
(with completed MPP payment)
→ 200 OK
{
  "hash": "0x...",
  "paymentMethod": "mpp-tempo-charge"
}

Environment variables

VariableRequiredNotes
FLUXUS_API_KEYRequired for /api/v1/sendBearer token checked before authenticated send execution.
FLUXUS_SENDER_PRIVATE_KEYRequiredSigning key used by authenticated send and MPP paid routes.
MPP_SECRET_KEYRequired for /api/mpp/*Enables HTTP 402 challenge and receipt handling.
NEXT_PUBLIC_TEMPO_RPC_URLOptionalOverrides the default Moderato RPC endpoint.

Network info

  • Chain ID: 42431
  • RPC: https://rpc.moderato.tempo.xyz
  • Explorer: https://explore.tempo.xyz
  • Settlement token: pathUSD (6 decimals)