MCP server

LivePair's MCP server turns the whole agent API into tools any MCP-compatible host can call: a community prompt library, a model catalog with a recommender, prompt enhancement, paid image and video generation, and LLM text. Paid calls settle two ways: per call in USDC on Base (x402, no account) or against a prepaid credit balance with an lp_ API key — see API keys.

  • Endpoint: https://livepairai.com/mcp — Streamable HTTP, no authentication
  • Surface: 11 tools, resources (model catalog, manifest, prompt packs, full docs), 3 prompt templates
  • Cost: browsing tools are free; generation and text tools return the paid endpoint (x402 quote or x-api-key credit billing)

Connect from your host

Remote servers are configured differently per client — the URL is always the same, only the field name changes:

HostWhereConfig
Claude Code.mcp.json at repo root, or run claude mcp add --transport http livepair https://livepairai.com/mcp{ "type": "http", "url": "https://livepairai.com/mcp" } inside mcpServers
Claude Desktop / claude.aiSettings → Connectors → Add custom connectorURL: https://livepairai.com/mcp — remote servers are added through the connector UI, not claude_desktop_config.json (that file is stdio-only)
Cursor~/.cursor/mcp.json{ "livepair": { "url": "https://livepairai.com/mcp" } } inside mcpServers
VS Code.vscode/mcp.json{ "servers": { "livepair": { "type": "http", "url": "https://livepairai.com/mcp" } } }
Windsurfmcp_config.json → mcpServers{ "livepair": { "serverUrl": "https://livepairai.com/mcp" } }
Gemini CLIsettings.json → mcpServers{ "livepair": { "httpUrl": "https://livepairai.com/mcp" } }
ClineMCP settings{ "type": "streamableHttp", "url": "https://livepairai.com/mcp" }
Stdio-only hostsbridge processnpx -y mcp-remote https://livepairai.com/mcp

Restart the host after editing. The tools appear in the host's tool list — no key, no OAuth, no env block to set.

OpenAI Agents & Responses API

The server is a standard remote MCP endpoint, so OpenAI's agent stack can call it as a hosted tool — your lp_ key rides the Authorization header:

# openai-agents-python — MCPServerStreamableHttp
from agents.mcp import MCPServerStreamableHttp

livepair = MCPServerStreamableHttp(
    params={
        "url": "https://livepairai.com/mcp",
        "headers": {"Authorization": "Bearer lp_..."},
    },
    name="livepair",
)
// Responses API — hosted mcp tool
{
  "type": "mcp",
  "server_label": "livepair",
  "server_url": "https://livepairai.com/mcp",
  "headers": { "Authorization": "Bearer lp_..." }
}

Paid tools (generate_image, chat_text) execute inline against the key's prepaid credits; without a key they return the x402 payment contract instead. OpenAI-side tool approval and require_approval settings work as usual — LivePair is just another remote server.

Tools

Prompt library:

ToolWhat it does
search_promptsKeyword search over the community prompt library (style, subject, model)
trending_promptsTrending, most-used, and top prompts — always use this for popularity, never keyword-search
get_promptFull prompt card by id from a prior list call
get_packA themed bundle of curated prompts

Models and generation:

ToolWhat it does
list_modelsLive catalog with per-model USD prices — media models plus textModels with $/Mtok rates
recommend_modelPicks a model for a described job
enhance_promptStructures a rough idea into a generation-ready prompt
quote_priceExact USDC price for a planned call, before paying
generate_imageReturns the paid endpoint contract for image or video generation (x402 or lp_ key)
chat_textReturns the paid endpoint contract for LLM text (x402 or lp_ key)
get_jobPolls a running job until done

Recommended loop: recommend_model or list_models → enhance_prompt → quote_price → generate_image → get_job. For text, chat_text returns the same kind of paid endpoint.

Paying for calls

Generation and text are per-call paid over x402 — HTTP 402 answered with a USDC transfer on Base mainnet:

  1. Call generate_image or chat_text — it returns the endpoint (/v1/agent/generate or /v1/agent/chat), a ready request body, and the exact price.
  2. POST the body. The first response is 402 with a PAYMENT-REQUIRED header listing the exact USDC amount.
  3. An x402-capable client (@x402/fetch, thirdweb, or any wallet layer that answers 402) settles and resends with PAYMENT-SIGNATURE.
  4. Fast jobs return { "status": "done", "url" }; slow jobs return a jobId to poll with get_job.

Settlement runs only on HTTP <400 — invalid input, policy rejection, and provider failure are never charged. Images are flat-priced per model/size; video bills per second at the chosen resolution.

Pass a payer field (your 0x… wallet) in the request body and lifetime settled volume earns automatic discounts — 5% at $100+, 10% at $500+, 15% at $2,000+. Resale is welcome: agents may sell generated media to their own users at their own pricing.

Text completions

POST /v1/agent/chat speaks the standard chat-completions request shape ({model, messages, max_tokens}) and returns the standard {choices, usage} shape, so any client code that already does chat completions works unchanged. Model ids and $/Mtok rates live under textModels in GET /v1/agent/models; the 402 quote is estimated input tokens × input rate + max_tokens × output rate — set max_tokens tight to bill tight (cap 8192). No streaming.

Limits

  • 6 paid generations per minute per payer address; unpaid probes rate-limit per IP
  • i2i/i2v source images: public URL or data:image URI, ≤ 8MB, vision-screened — AI-generated or owned images only
  • Policy rejections return 422 and settle nothing

Machine-readable pointers