Integrations
One-click MCP install
Claude Code: claude mcp add --transport http x402serps https://x402serps.com/api/mcp --header "X-Trial: 1" · Claude Desktop: Settings → Connectors → add https://x402serps.com/api/mcp, or use the JSON config below. Free trial header included; swap for Authorization: Bearer xs_... once you have a credit key.
Auth options: prepaid credit key (Authorization: Bearer xs_..., buy), x402 USDC per call (Base or Solana), or the free trial (X-Trial: 1).
JavaScript (package coming soon)
Source: sdk/js (package x402serps, zero dependencies, Node 18+). Not yet on npm. Copy src/index.js into your project in the meantime.
import { X402Serps } from "x402serps";
const xs = new X402Serps({ apiKey: process.env.X402SERPS_API_KEY });
await xs.search("x402 protocol");
await xs.leads("dentists", "Leeds, UK");
await xs.seoAudit("example.com");
await xs.createMonitor({ type: "rank", domain: "example.com", keywords: ["best widgets"], webhook: "https://you.example/hook" });
// x402 instead of a key: new X402Serps({ fetch: wrapFetchWithPayment(fetch, x402Client) })LangChain (JS and Python) and Vercel AI SDK (packages coming soon)
Ready-to-publish packages: @x402serps/langchain (LangChain.js, source sdk/langchain-js), langchain-x402serps (Python, source sdk/langchain-python) and @x402serps/ai-sdk (Vercel AI SDK, source sdk/ai-sdk). Not yet on npm or PyPI. Each provides search, news, places and extract tools and accepts a credit key, trial: true, or an x402 paying fetch.
// LangChain.js
import { x402serpsTools } from "@x402serps/langchain";
const tools = x402serpsTools({ apiKey: process.env.X402SERPS_API_KEY });
// Vercel AI SDK
import { generateText } from "ai";
import { x402serpsTools as aiTools } from "@x402serps/ai-sdk";
await generateText({ model, tools: aiTools({ apiKey: process.env.X402SERPS_API_KEY }), prompt: "Find 3 sources on x402" });
# Python (LangChain)
from langchain_x402serps import x402serps_tools
tools = x402serps_tools(api_key="xs_...")Python (package coming soon)
Source: sdk/python (package x402serps, depends on requests). Not yet on PyPI; copy the module into your project for now.
from x402serps import X402Serps
xs = X402Serps(api_key="xs_...")
xs.competitor_report("example.com", ["best widgets", "widget reviews"])
xs.news_digest(["x402", "stablecoins"], since="day")LangChain
from langchain_core.tools import tool
from x402serps import X402Serps
xs = X402Serps()
@tool
def web_search(query: str) -> str:
"""Search the web for current information."""
return str(xs.search(query, num=8)["results"])
llm = ChatOpenAI(model="gpt-4o-mini").bind_tools([web_search])OpenAI and Claude function calling
/tools.json has ready-made schemas for every endpoint: openai (Chat Completions tools), anthropic (Messages tools), plus routes mapping each tool name to its API path.
const { openai: tools, anthropic, routes } = await (await fetch("https://x402serps.com/tools.json")).json();
// on a tool call: POST https://x402serps.com + routes[name] with the arguments as JSON bodyMCP
Streamable HTTP endpoint https://x402serps.com/api/mcp, 19 tools. Listed in the official MCP Registry as com.x402serps/search. See /mcp.
OpenSea agent tool registry
Web Search (toolId 893) and URL Extract (toolId 894) are registered on OpenSea's ERC-8257 registry on Base. See /opensea.