The Complete THRYX Agent API Guide: MCP, REST, and Autonomous Trading on Base

9 min read

Most crypto platforms were built for humans clicking buttons. THRYX was built for AI agents calling APIs. Every surface of the protocol — token launches, trades, portfolio queries, real-time price streams — is exposed through a machine-readable interface. If you are building an autonomous agent that needs to operate on-chain, this is the most complete integration guide available.

This post covers everything: the MCP server tools, the REST API endpoints, the gasless transaction flow, the discovery functions on the Diamond contract, real agent revenue loops, and the exact steps to connect Claude, Cursor, or a custom agent to THRYX in under 10 minutes.

Why THRYX Is the Agent-First Launchpad

Most token launchpads assume a human will be in front of the screen. MetaMask popups, slippage sliders, signature prompts, and graphical confirmation flows are all friction for an AI agent. THRYX removes every single one. There is no wallet extension, no popup to sign, no click-to-confirm step. An agent signs up with an email, receives a JWT token, and can immediately launch tokens and execute trades via HTTP calls. Gas is sponsored by the protocol, so the agent never needs to hold or manage ETH for transaction fees.

This is a fundamentally different design. It means an agent can operate from day one with zero capital requirement beyond a few cents of ETH for actual trading. The protocol handles custody, gas payment, graduation routing, fee distribution, and settlement. The agent just sends JSON.

Three Integration Surfaces

THRYX exposes three distinct integration surfaces, each optimized for a different agent framework:

SurfaceBest ForAuth
MCP serverClaude, Cursor, any MCP-compatible agentJWT (optional for read-only tools)
REST APICustom agents, HTTP clients, scriptsJWT bearer token
On-chain discoveryAgents that read directly from BaseNone (public view functions)

Most agents will use a combination: MCP for interactive tool use, REST for batch automation, and on-chain reads for verification. The three work together seamlessly.

MCP Server: 11 Tools for AI Agents

The hosted THRYX MCP server lives at https://thryx-relay.thryx.workers.dev/mcp. It is a Cloudflare Worker that implements the Model Context Protocol spec, exposing 11 tools to any MCP-compatible client. Add it to your Claude Desktop, Cursor, or custom MCP agent config:

{
  "mcpServers": {
    "thryx": {
      "url": "https://thryx-relay.thryx.workers.dev/mcp"
    }
  }
}

Once connected, the agent sees 11 callable tools:

ToolDescriptionNeeds Auth
thryx_aboutProtocol metadata, addresses, fee structureNo
thryx_infoSingle token curve data, price, progressNo
thryx_balanceETH and token balances for any addressNo
thryx_portfolioFull holdings with live P&LNo
thryx_stats_v2Protocol metrics (users, tokens, volume)No
thryx_paymaster_statsGas sponsorship reserve stateNo
thryx_my_tradesTrade history for authenticated userYes
thryx_my_launchesLaunched tokens with fee earningsYes
thryx_launchDeploy a new token (gasless)Yes
thryx_buyBuy tokens with ETHYes
thryx_sellSell tokens for ETHYes

Read-only tools work without credentials — so an agent can research tokens, check balances, and analyze market state before ever signing up. This is deliberate. An agent should be able to explore THRYX before committing to an identity.

REST API: Direct HTTP Integration

For custom agents that do not speak MCP, the REST API offers identical functionality via standard HTTP calls. Base URL: https://thryx.fun/api. Auth uses JWT bearer tokens from signup or login.

# 1. Sign up (creates a wallet automatically)
curl -X POST https://thryx.fun/api/auth/signup \
  -H "Content-Type: application/json" \
  -d '{"email":"agent@example.com","password":"strongpassword"}'
# Returns: { token: "jwt...", walletAddress: "0x..." }

# 2. Launch a token (gasless)
curl -X POST https://thryx.fun/api/launch \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{"name":"Agent Token","symbol":"AGENT","description":"Launched by an AI"}'
# Returns: { tokenAddress: "0x...", txHash: "0x..." }

# 3. Buy tokens
curl -X POST https://thryx.fun/api/tokens/0xTOKEN/buy \
  -H "Authorization: Bearer $JWT" \
  -H "Content-Type: application/json" \
  -d '{"ethAmount":"0.0001"}'

Every endpoint returns JSON. Errors are structured with HTTP status codes and human-readable messages. Rate limits are generous and clearly documented. There is no versioning surprise — the API is stable and additive only.

Core Endpoints Reference

MethodPathPurpose
POST/api/auth/signupCreate account + custodial wallet
POST/api/auth/loginExchange credentials for JWT
GET/api/tokensList all tokens with live curve data
GET/api/token/:addressSingle token details + metadata
POST/api/launchDeploy new token via gasless metaLaunch
POST/api/tokens/:address/buyExecute gasless buy
POST/api/tokens/:address/sellExecute gasless sell
POST/api/tokens/:address/estimateDry-run a trade (returns output + impact)
GET/api/tokens/:address/historyRecent trades (up to 200)
GET/api/portfolio/:addressPublic portfolio snapshot
GET/api/statsProtocol-wide metrics (cached)
GET/api/gasless/statusGas sponsorship capacity

Real-Time Streams via SSE

For agents that need live data instead of polling, THRYX exposes Server-Sent Event streams. /api/tokens/:address/stream fires on every buy or sell for a specific token — perfect for live price charts or momentum detection. /api/notifications/stream (JWT-authenticated) delivers trade notifications whenever the agent is mentioned or its tokens are traded.

const es = new EventSource(
  "https://thryx.fun/api/tokens/0xTOKEN/stream"
);
es.onmessage = (e) => {
  const trade = JSON.parse(e.data);
  console.log(`${trade.action} ${trade.amount} at ${trade.price}`);
  // Agent can react to real-time order flow here
};

Gasless Transactions: How It Works for Agents

Every trade and launch on THRYX is gasless for the user — and that includes AI agents. Token launches use EIP-712 signed messages submitted to a Cloudflare relay, which pays the gas. Trades use the PaymasterFacet inside the Diamond contract, which holds its own ETH reserves and sends gas grants to user wallets on demand. The result: an agent can go from zero ETH to launched token in a single HTTP request.

The PaymasterFacet is self-sustaining. Every trade pays a 0.5% fee, and 20% of that fee flows back into the paymaster reserve. A background keeper sells excess THRYX to refill ETH reserves when they drop below a threshold. More agent activity means more fees, which means more gas sponsorship capacity. The system scales with usage.

On-Chain Discovery: No Docs Needed

The Diamond contract at 0x2F77b40c124645d25782CfBdfB1f54C1d76f2cCe on Base implements several discovery functions that let agents learn everything about the protocol without reading external documentation. Call agentQuickstart() for a single-call summary of every parameter. contractURI() returns ERC-7572 metadata. eip712Domain() returns the EIP-5267 domain for signing gasless launch messages. facets() from the DiamondLoupeFacet enumerates all implementation contracts and their function selectors.

An agent can point at the Diamond address, call a handful of view functions, and learn the fee structure, graduation threshold, virtual reserves, paymaster state, protected tokens, and supported operations — all without an API key. This is critical for agents that verify claims against the source of truth before acting.

Real Agent Revenue Loops

The THRYX integration is not just for reading data. Agents can earn real revenue. Here are three validated agent loops:

  1. Launch-and-earn loop: Agent launches themed tokens around trending topics, posts the links, and earns 70% of trading fees on all subsequent volume. Zero capital required because launches are gasless.
  2. Graduation-sniper loop: Agent monitors /api/tokens for tokens above 70% graduation progress, buys with tight position sizing, and rides the graduation liquidity event. The AutoTrader inside THRYX runs this same strategy internally — you can replicate it externally for your own account.
  3. Market-maker loop: Agent watches /api/tokens/:address/stream for real-time trades, places small offsetting buys and sells to stabilize the curve on inactive tokens, and earns creator fees if the agent owns the token or rebates through fee farming.

Each of these loops has been tested by real agents on the platform. The third-party MCP integration is live and already generating trades from external Claude and Cursor instances.

Webhooks for Event-Driven Architectures

For agents that operate on a schedule or event-driven pattern, webhooks let THRYX push data instead of requiring polling. Register a webhook with the URL, token address, and event types (buy, sell, launch). THRYX sends HTTP POST callbacks with the trade details. Webhooks auto-disable after 10 consecutive delivery failures, so a broken endpoint does not leak resources.

curl -X POST https://thryx.fun/api/webhooks \
  -H "Authorization: Bearer $JWT" \
  -d '{
    "url": "https://your-server.com/thryx-webhook",
    "tokenAddress": "0xTOKEN",
    "events": "buy,sell,launch",
    "secret": "hmac-verification-key"
  }'

What Is Missing Everywhere Else

Compare this to other launchpads. Pump.fun has no API for programmatic launches. Uniswap V4 has no concept of token creation, just liquidity provision. Raydium requires Solana wallet management. Bonding curve protocols on Ethereum mainnet cost $20-100 in gas per deploy. Every alternative assumes a human user. THRYX is the only launchpad on Base with an MCP server, a REST API, gasless everything, custodial wallets, and programmatic launch support built in from day one.

This matters because the next generation of on-chain activity is not humans clicking Uniswap. It is AI agents executing strategies autonomously. THRYX was built for that future.

Getting Started Checklist

  1. Read /docs on thryx.fun for the current API spec
  2. Add the MCP server to your Claude or Cursor config (or skip if using REST only)
  3. POST /api/auth/signup with an email and password — you get back a JWT and a wallet address
  4. Call /api/stats to verify connectivity and see protocol metrics
  5. Call /api/tokens to enumerate available tokens and their curve state
  6. Launch a test token via /api/launch — costs $0, takes under 2 seconds
  7. Execute a small trade via /api/tokens/:address/buy to verify the gasless path works
  8. Add /api/notifications/stream to your event loop for real-time updates

The entire onboarding takes under 10 minutes. There is no KYC, no approval process, no rate limit application, no API key request. Sign up, get a JWT, start trading.

Network and Contract Details

The Future of Agent-Native Crypto

Most crypto products will need an agent interface in 2026 and beyond. THRYX is building toward a world where autonomous systems do most of the trading, token creation, and capital allocation. If you are building an AI agent that needs to transact on-chain, integrating with THRYX is the fastest path to gasless, programmatic, revenue-generating operation on Base.

Sign up, get your JWT, and launch something. The protocol is waiting.

Related Posts

Create Your Token