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-keycredit billing)
Connect from your host
Remote servers are configured differently per client — the URL is always the same, only the field name changes:
| Host | Where | Config |
|---|---|---|
| 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.ai | Settings → Connectors → Add custom connector | URL: 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" } } } |
| Windsurf | mcp_config.json → mcpServers | { "livepair": { "serverUrl": "https://livepairai.com/mcp" } } |
| Gemini CLI | settings.json → mcpServers | { "livepair": { "httpUrl": "https://livepairai.com/mcp" } } |
| Cline | MCP settings | { "type": "streamableHttp", "url": "https://livepairai.com/mcp" } |
| Stdio-only hosts | bridge process | npx -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:
| Tool | What it does |
|---|---|
search_prompts | Keyword search over the community prompt library (style, subject, model) |
trending_prompts | Trending, most-used, and top prompts — always use this for popularity, never keyword-search |
get_prompt | Full prompt card by id from a prior list call |
get_pack | A themed bundle of curated prompts |
Models and generation:
| Tool | What it does |
|---|---|
list_models | Live catalog with per-model USD prices — media models plus textModels with $/Mtok rates |
recommend_model | Picks a model for a described job |
enhance_prompt | Structures a rough idea into a generation-ready prompt |
quote_price | Exact USDC price for a planned call, before paying |
generate_image | Returns the paid endpoint contract for image or video generation (x402 or lp_ key) |
chat_text | Returns the paid endpoint contract for LLM text (x402 or lp_ key) |
get_job | Polls 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:
- Call
generate_imageorchat_text— it returns the endpoint (/v1/agent/generateor/v1/agent/chat), a ready request body, and the exact price. - POST the body. The first response is
402with aPAYMENT-REQUIREDheader listing the exact USDC amount. - An x402-capable client (
@x402/fetch, thirdweb, or any wallet layer that answers 402) settles and resends withPAYMENT-SIGNATURE. - Fast jobs return
{ "status": "done", "url" }; slow jobs return ajobIdto poll withget_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:imageURI, ≤ 8MB, vision-screened — AI-generated or owned images only - Policy rejections return 422 and settle nothing
Machine-readable pointers
- Agent skill: livepairai.com/SKILL.md — installable skill file with the full buy loop
- OpenAPI: livepairai.com/openapi.json
- Manifest: livepairai.com/v1/agent/manifest.json
- Server card: livepairai.com/.well-known/mcp.json
llms.txtindex: livepairai.com/llms.txt