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.

Permissionless by design. The server uses a self-correcting security model where funds always flow to the wallet owner. No API keys, no OAuth — just connect and start earning.

Quick Start

1

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/mcp

Using another client? See Setup Instructions for VS Code, Windsurf, Zed, and more.

Tip: In Claude Code, you can just type: “Add Laguna's MCP server at https://agents.laguna.network/mcp”
2

Search for merchants

Ask your AI agent to find merchants:

prompt
"Search for travel merchants with good commission rates in Southeast Asia"
3

Create a link and start earning

Provide your wallet address or email to mint a tracking link:

prompt
"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.

Endpoint URL
https://agents.laguna.network/mcp

No API keys required

No OAuth or wallet signatures needed

Withdrawals on Base chain, 1% fee

Native vs bridge clients: Clients like Claude Desktop, Cursor, and Claude Code support remote MCP servers natively. For clients like VS Code, Windsurf, and Zed, use the 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:

Connector URL
https://agents.laguna.network/mcp

Claude Code

Run the following command in your terminal:

Terminal
claude mcp add --transport http laguna https://agents.laguna.network/mcp

Codex

Run the following command in your terminal:

Terminal
codex mcp add laguna --url https://agents.laguna.network/mcp

Cursor

Open Cursor Settings > MCP > Add Server, or add the following to .cursor/mcp.json in your project root:

.cursor/mcp.json
{
  "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:

Command
npx mcp-remote https://agents.laguna.network/mcp
settings.json
{
  "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:

mcp_config.json
{
  "mcpServers": {
    "laguna": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "https://agents.laguna.network/mcp"]
    }
  }
}

Zed

Cmd + , to open Zed settings and add the following:

settings.json
{
  "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:

Terminal
openclaw skills install github:Laguna-Team/Laguna-OpenClaw-Skills
See https://github.com/Laguna-Team/Laguna-OpenClaw-Skills for details and available personas. Also coming soon on ClawHub.

Others

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

Command
npx -y mcp-remote https://agents.laguna.network/mcp

Tools Reference

Using an AI client like Claude or Cursor? You don't need to memorize any of these tools or parameters — just talk to your agent in natural language. Say things like “find me travel deals” or “create a link for Nike” and the agent will figure out which tools and parameters to use.

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.

ParameterTypeDescription
querystringFuzzy search query for merchant name (min 2 chars). Omit to browse all.
categorystringFilter by merchant category (e.g. "travel", "fashion")
geostringISO country code to filter by availability (e.g. "SG", "US")
sortstringSort: "relevance", "cashback_rate", or "name"
limitnumberMax results (default: 10, max: 50)

Example response

json
{
  "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.

ParameterTypeDescription
geostringISO country code to filter to categories with merchants available in this country

Example response

json
{
  "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.

ParameterTypeDescription
merchant_idstringCanonical merchant slug (e.g. "nike", "trip-com")
geostringISO country code to filter rates by availability

Example response

json
{
  "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
  }
}

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.

ParameterTypeDescription
wallet_addressstringYour wallet address (EVM or TON)
emailstringYour email address
includestring[]Sections to include: "links", "conversions", "analytics"
merchant_idstringFilter links and conversions by merchant
conversion_statusstringFilter conversions: "pending", "confirmed", "paid", "rejected"
limitnumberMax results for links/conversions (default: 20, max: 100)

Example response

json
{
  "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.

ParameterTypeDescription
wallet_addressstringYour registered wallet address (EVM or TON)
amountnumberAmount in USDC to withdraw. Defaults to full available balance.

Example response

json
{
  "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.

ParameterTypeDescription
withdrawal_idstringThe withdrawalId returned by the withdraw tool (UUID)

Example response

json
{
  "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”

1.

User drafts a social post about a product (e.g. Nike, Trip.com)

2.

Agent detects the brand and checks if it's on Laguna

3.

Agent generates a tracked referral link via mint_link

4.

Link is embedded naturally in the post with disclosure

5.

Monitor performance and earnings via get_dashboard

influencer-creator-skills.md
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”

1.

User asks about travel or shopping (e.g. "Plan my Bangkok trip")

2.

Agent detects partnered brands in its response (Agoda, Trip.com, Airalo)

3.

Agent fetches cashback details via get_merchant_info

4.

Nudge: "Book through this link for 9.9% cashback in USDC"

5.

User clicks the link and purchases — commission accrues

personal-shopper-skills.md
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.
More personas and use cases are available in the Skills.md file on our GitHub.

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

Pending

Purchase detected, waiting for merchant confirmation.

Approved

Merchant confirmed the sale. Waiting for payout period to end.

Available

USDC is ready for withdrawal to your wallet.

Withdrawn

USDC has been sent to your wallet on Base chain.

Rejected

Merchant rejected the transaction (return, cancellation, or fraud).

Example Integrations

AISA

Content Creatoraisa.one

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

Deal Hunteranimocamind.com

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.

Public Toolssearch_merchants, get_categories, get_merchant_info

No identity needed. Browse the full merchant catalog and view cashback rates freely.

Agent Toolsmint_link, get_dashboard

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.

Wallet Toolswithdraw, get_withdrawal_status

Requires a wallet_address. USDC is sent directly on Base chain. Self-correcting security: funds always flow TO the wallet owner.

Self-correcting security: The wallet address serves as both the identifier and payout destination. An attacker calling tools with someone else's wallet address cannot redirect funds — they would only trigger a payment to the victim.

Error Handling

All MCP tool errors return the following format:

Error Response
{
  "error": "ERROR_CODE",
  "message": "Human-readable description"
}

Error Codes

CodeToolsDescription
MERCHANT_NOT_FOUNDget_merchant_infoMerchant slug doesn't exist in catalog.
IDENTITY_REQUIREDmint_link, get_dashboard, withdrawNeither wallet_address nor email was provided.
INVALID_WALLET_ADDRESSmint_linkWallet address format is invalid (EVM/TON/Solana).
INVALID_EMAIL_ADDRESSmint_linkEmail address format is invalid.
NO_ROUTES_AVAILABLEmint_linkNo active affiliate routes for this merchant.
AGENT_NOT_FOUNDget_dashboardNo agent exists for this identity. Use mint_link first.
NO_WALLETwithdrawAgent has no registered wallet. Use mint_link with a wallet_address first.
INSUFFICIENT_BALANCEwithdrawAvailable balance is less than the requested withdrawal amount.
NOT_FOUNDget_withdrawal_statusWithdrawal ID doesn't exist.
INTERNAL_ERRORallUnexpected server error.

Rate Limits

ScopeLimitWindow
All tools (per IP)100 requests60 seconds (rolling)
mint_link (per agent)50 links1 day (resets midnight UTC)
withdraw (per agent)3 withdrawals1 day (resets midnight UTC)

Rate limit errors return rate_limit_exceeded with a retryAfter field (seconds).

FAQ

Do I need an API key?+
No. Laguna MCP is fully permissionless. Public tools (search_merchants, get_categories, get_merchant_info) require no authentication. Agent-identified tools accept a wallet address or email as a parameter.
How does agent provisioning work?+
When you call mint_link for the first time with a new wallet address or email, the system automatically creates an agent record for you. There is zero setup required — your agent is provisioned on first use.
What currencies are supported for payouts?+
Payouts are in USDC on Base chain. When your commissions mature, your available balance can be withdrawn directly to your EVM wallet. A 1% fee applies to withdrawals.
How do withdrawals work?+
Call the withdraw tool with your wallet_address. USDC is transferred on Base chain, typically within 5-15 seconds. Use get_withdrawal_status to get the transaction hash and BaseScan URL.
Can I use an email instead of a wallet?+
Yes. All agent-identified tools accept either wallet_address or email. With email, commissions accumulate in Laguna's internal ledger. Later, sign up on app.laguna.network with the same email, connect a wallet, and withdraw.
What chains are supported?+
Currently EVM wallets on Base chain for withdrawals. TON and Solana wallet support is coming soon.
What are cookie days?+
Cookie days is the window after a user clicks your link during which any purchase is attributed to you. For example, if a merchant has cookie_days=30 and a user clicks your link then buys 15 days later, you still earn the commission. Typical values range from 7-30 days depending on the merchant.
How long until I get paid?+
After a purchase is confirmed by the merchant, the commission enters a payout waiting period (payout_days). This is typically 30-60 days — the merchant needs time to confirm no returns or chargebacks. Once the payout period ends, your USDC becomes available for withdrawal.
What do the transaction statuses mean?+
Pending: purchase detected, waiting for merchant confirmation. Approved: merchant confirmed the sale, waiting for payout period to end. Available: USDC is ready for withdrawal. Withdrawn: USDC has been sent to your wallet. Rejected: merchant rejected the transaction (e.g. return or cancellation).