MCP Server Documentation
The Laguna MCP Server enables AI agents to earn USDC commissions through affiliate commerce. With 7 tools, your agent can search 200+ merchants, create tracking links, monitor conversions, and withdraw earnings.
Quick Start
Add the MCP server config
Add the Laguna MCP server to your client. For Claude Desktop, use Settings > Connectors. For others, copy the config:
https://agents.laguna.network/mcpUsing another client? See Setup Instructions for VS Code, Windsurf, Zed, and more.
“Add Laguna's MCP server at https://agents.laguna.network/mcp”Search for merchants
Ask your AI agent to find merchants:
"Search for travel merchants with good commission rates in Southeast Asia"Create a link and start earning
Provide your wallet address or email to mint a tracking link:
"Create a tracking link for Trip.com using my wallet 0x1234...abcd"Setup Instructions
General
Laguna's MCP server supports Streamable HTTP transport. No API keys or OAuth required — just connect and start earning.
https://agents.laguna.network/mcpNo API keys required
No OAuth or wallet signatures needed
Withdrawals on Base chain, 1% fee
mcp-remote package for backwards compatibility.Claude Desktop
From Claude Desktop, go to Settings > Connectors and add a new custom connector with the following URL:
https://agents.laguna.network/mcpClaude Code
Run the following command in your terminal:
claude mcp add --transport http laguna https://agents.laguna.network/mcpCodex
Run the following command in your terminal:
codex mcp add laguna --url https://agents.laguna.network/mcpCursor
Open Cursor Settings > MCP > Add Server, or add the following to .cursor/mcp.json in your project root:
{
"mcpServers": {
"laguna": {
"url": "https://agents.laguna.network/mcp"
}
}
}VS Code
Ctrl/Cmd + P and search for MCP: Add Server. Select Command (stdio) and enter the following command:
npx mcp-remote https://agents.laguna.network/mcp{
"mcpServers": {
"laguna": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://agents.laguna.network/mcp"]
}
}
}Windsurf
Ctrl/Cmd + , to open Windsurf settings. Scroll to Cascade > MCP servers, select Add Server > Add custom server, and add the following:
{
"mcpServers": {
"laguna": {
"command": "npx",
"args": ["-y", "mcp-remote", "https://agents.laguna.network/mcp"]
}
}
}Zed
Cmd + , to open Zed settings and add the following:
{
"context_servers": {
"laguna": {
"source": "custom",
"command": "npx",
"args": ["-y", "mcp-remote", "https://agents.laguna.network/mcp"],
"env": {}
}
}
}OpenClaw
Install the Laguna skills from our OpenClaw skills repo. OpenClaw handles the MCP connection automatically:
openclaw skills install github:Laguna-Team/Laguna-OpenClaw-SkillsOthers
Hundreds of other tools now support MCP servers. Configure them with these settings: Command: npx, Arguments: -y mcp-remote https://agents.laguna.network/mcp, Environment: None
npx -y mcp-remote https://agents.laguna.network/mcpTools Reference
search_merchants
Search or browse affiliate merchants. All parameters are optional — call with no params to see top cashback deals. Provide a query for fuzzy name search, or a category to browse by category.
| Parameter | Type | Description |
|---|---|---|
| query | string | Fuzzy search query for merchant name (min 2 chars). Omit to browse all. |
| category | string | Filter by merchant category (e.g. "travel", "fashion") |
| geo | string | ISO country code to filter by availability (e.g. "SG", "US") |
| sort | string | Sort: "relevance", "cashback_rate", or "name" |
| limit | number | Max results (default: 10, max: 50) |
Example response
{
"merchants": [
{
"id": "trip-com",
"name": "Trip.com",
"category": "travel",
"top_cashback": "4.95%"
}
],
"total": 1
}get_categories
Browse available merchant categories on Laguna. Returns categories with merchant counts, top cashback rates, and example merchants.
| Parameter | Type | Description |
|---|---|---|
| geo | string | ISO country code to filter to categories with merchants available in this country |
Example response
{
"categories": [
{
"slug": "travel",
"name": "Travel",
"merchant_count": 12,
"top_cashback_rate": "4.95%",
"example_merchants": ["Trip.com", "Agoda", "Airalo"]
}
]
}get_merchant_info
Get detailed information about a specific merchant including cashback rates, cookie duration, and payout timeline.
| Parameter | Type | Description |
|---|---|---|
| merchant_id | string | Canonical merchant slug (e.g. "nike", "trip-com") |
| geo | string | ISO country code to filter rates by availability |
Example response
{
"merchant": {
"id": "trip-com",
"name": "Trip.com",
"category": "travel",
"description": "Global travel platform for flights, hotels, and activities",
"cashback_rates": [
{ "sub_category": "Hotel", "rate": "4.95%" },
{ "sub_category": "Flight", "rate": "1.5%" }
],
"cookie_days": 30,
"payout_days": 60
}
}mint_link
Create an affiliate tracking link for a merchant. Auto-provisions your agent account on first use. Returns a shortlink that earns USDC commission when users purchase through it.
| Parameter | Type | Description |
|---|---|---|
| merchant_id | string | Canonical merchant slug from search_merchants results |
| wallet_address | string | Your wallet address (EVM or TON). Recommended. |
| string | Email address as alternative identity | |
| geo | string | ISO country code for geo-targeted route selection |
| target_url | string | Deep link URL to a specific product page |
Example response
{
"link": {
"shortcode": "abc123",
"url": "https://l.laguna.network/r/abc123",
"merchant": "trip-com",
"created_at": "2026-03-27T10: 00: 00Z"
},
"agent": {
"status": "active",
"wallet_address": "0x1234...abcd"
}
}get_dashboard
Get your agent dashboard with balance, performance summary, and optionally your links, conversions, and analytics. Call with no include for a quick balance check; add include sections for detailed data.
| Parameter | Type | Description |
|---|---|---|
| wallet_address | string | Your wallet address (EVM or TON) |
| string | Your email address | |
| include | string[] | Sections to include: "links", "conversions", "analytics" |
| merchant_id | string | Filter links and conversions by merchant |
| conversion_status | string | Filter conversions: "pending", "confirmed", "paid", "rejected" |
| limit | number | Max results for links/conversions (default: 20, max: 100) |
Example response
{
"balance": {
"pending_usdc": "12.50",
"available_usdc": "45.00",
"total_earned_usdc": "57.50"
},
"summary": {
"total_links": 15,
"total_clicks": 342,
"total_conversions": 8
}
}withdraw
Request USDC withdrawal to your wallet. Currently supports Base chain (EVM wallets). TON and Solana wallet support coming soon. A 1% fee applies. Withdraws full available balance by default.
| Parameter | Type | Description |
|---|---|---|
| wallet_address | string | Your registered wallet address (EVM or TON) |
| amount | number | Amount in USDC to withdraw. Defaults to full available balance. |
Example response
{
"withdrawal": {
"id": "wd_abc123",
"amount_usdc": "45.00",
"fee_usdc": "0.45",
"net_usdc": "44.55",
"wallet_address": "0x1234...abcd",
"status": "processing"
}
}get_withdrawal_status
Check the status of a withdrawal by its ID. Returns the current status, transaction hash (if completed), and BaseScan URL. Transfer typically completes within 5-15 seconds.
| Parameter | Type | Description |
|---|---|---|
| withdrawal_id | string | The withdrawalId returned by the withdraw tool (UUID) |
Example response
{
"withdrawal": {
"id": "wd_abc123",
"status": "completed",
"amount_usdc": "44.55",
"tx_hash": "0xabc...def",
"basescan_url": "https://basescan.org/tx/0xabc...def",
"completed_at": "2026-03-27T10: 00: 15Z"
}
}Agent Personas
Copy these system prompts into your agent's config to give it a monetization personality.
Influencer / Creator
Turn every content piece into a monetization opportunity. Your agent auto-embeds tracked affiliate links in social posts, blog articles, and roundups.
Core Journey — “Every Post Earns”
User drafts a social post about a product (e.g. Nike, Trip.com)
Agent detects the brand and checks if it's on Laguna
Agent generates a tracked referral link via mint_link
Link is embedded naturally in the post with disclosure
Monitor performance and earnings via get_dashboard
You are a social media content assistant that helps users create engaging posts. You also have access to Laguna's affiliate network to monetize product mentions in posts.
When the user asks you to write or draft a post:
1. Identify all brands/products mentioned in the content
2. For each brand, check: search_merchants({ query: "brand" })
3. For each match, create a link: mint_link({ merchant_id, wallet_address: "{{WALLET}}", target_url? })
4. Embed shortlinks naturally in the post content
5. Add affiliate disclosure (platform-appropriate)
Content quality comes FIRST — never degrade a post just to fit an affiliate link. For roundup/listicle posts: batch-create links for all partnered brands, skip non-partnered ones gracefully.
ALWAYS use mint_link to generate your tracked link before sharing. Never share a raw merchant URL — only Laguna shortlinks.
Check your earnings anytime with get_dashboard and withdraw USDC to your wallet with withdraw.Personal Shopper
Your always-on shopping companion. Silently checks for cashback on every brand mentioned in conversation and nudges before you buy.
Core Journey — “Never Miss Cashback”
User asks about travel or shopping (e.g. "Plan my Bangkok trip")
Agent detects partnered brands in its response (Agoda, Trip.com, Airalo)
Agent fetches cashback details via get_merchant_info
Nudge: "Book through this link for 9.9% cashback in USDC"
User clicks the link and purchases — commission accrues
You are a helpful AI assistant with an always-on commerce awareness layer. You have access to Laguna's affiliate cashback network. Your primary job is to help the user with whatever they need. Your secondary job is to NEVER let the user miss a cashback opportunity.
Whenever ANY brand, store, or product is mentioned in conversation — by the user OR by you — immediately check if it's on Laguna via search_merchants. If it is, get the rate with get_merchant_info and show the effective price after cashback.
Ask for the user's wallet address and country once at the start.
Always use mint_link with the user's wallet and geo to generate their tracked link. Make sure the purchase is done via this link.
Never mention cashback for merchants not on Laguna. Always answer the user's actual question first, cashback mention second.
Always remind user to buy via the mint_link to earn the cashback. Cashback pays for your compute or their next purchase.Payout & Cookie Days
Cookie Days
The window after a user clicks your link during which any purchase is attributed to you. If a merchant has cookie_days=30, the user can buy within 30 days of clicking and you still earn the commission. Typical values: 7–30 days.
Payout Days
The time from a confirmed purchase to USDC becoming available for withdrawal. Merchants need time to confirm no returns or chargebacks. Typical values: 30–60 days. Once the payout period ends, your USDC moves to “available” status.
Transaction Statuses
Purchase detected, waiting for merchant confirmation.
Merchant confirmed the sale. Waiting for payout period to end.
USDC is ready for withdrawal to your wallet.
USDC has been sent to your wallet on Base chain.
Merchant rejected the transaction (return, cancellation, or fraud).
Example Integrations
AISA provides cloud-hosted OpenClaw instances with prebuilt Twitter skills and scheduling. Combined with Laguna's MCP skills, you can deploy an affiliate agent that truly never sleeps — it posts content with tracked links on a schedule, earns commissions 24/7, and withdraws USDC to your wallet automatically.
Cloud-hosted OpenClaw instance — no local setup required
Prebuilt Twitter skills + scheduled posting
Install Laguna skills — agent earns USDC commissions autonomously, around the clock
Animocamind integrated Laguna MCP into their AI agent to earn USDC commissions autonomously. Their agent uses the Deal Hunter persona — whenever a user asks about travel or shopping, the agent silently checks Laguna for cashback opportunities and embeds tracked links in its responses.
Connected via MCP — zero API keys, zero setup
Agent auto-provisions on first mint_link call
Earns USDC commissions on every conversion
Authentication
Laguna MCP uses a simple identity model. No API keys or signatures are required.
No identity needed. Browse the full merchant catalog and view cashback rates freely.
Provide a wallet_address OR email parameter. Agent is auto-provisioned on first call. Email agents earn into an internal ledger and can connect a wallet later.
Requires a wallet_address. USDC is sent directly on Base chain. Self-correcting security: funds always flow TO the wallet owner.
Error Handling
All MCP tool errors return the following format:
{
"error": "ERROR_CODE",
"message": "Human-readable description"
}Error Codes
| Code | Tools | Description |
|---|---|---|
| MERCHANT_NOT_FOUND | get_merchant_info | Merchant slug doesn't exist in catalog. |
| IDENTITY_REQUIRED | mint_link, get_dashboard, withdraw | Neither wallet_address nor email was provided. |
| INVALID_WALLET_ADDRESS | mint_link | Wallet address format is invalid (EVM/TON/Solana). |
| INVALID_EMAIL_ADDRESS | mint_link | Email address format is invalid. |
| NO_ROUTES_AVAILABLE | mint_link | No active affiliate routes for this merchant. |
| AGENT_NOT_FOUND | get_dashboard | No agent exists for this identity. Use mint_link first. |
| NO_WALLET | withdraw | Agent has no registered wallet. Use mint_link with a wallet_address first. |
| INSUFFICIENT_BALANCE | withdraw | Available balance is less than the requested withdrawal amount. |
| NOT_FOUND | get_withdrawal_status | Withdrawal ID doesn't exist. |
| INTERNAL_ERROR | all | Unexpected server error. |
Rate Limits
| Scope | Limit | Window |
|---|---|---|
| All tools (per IP) | 100 requests | 60 seconds (rolling) |
| mint_link (per agent) | 50 links | 1 day (resets midnight UTC) |
| withdraw (per agent) | 3 withdrawals | 1 day (resets midnight UTC) |
Rate limit errors return rate_limit_exceeded with a retryAfter field (seconds).