Web search in CrewAI with x402serps
CrewAI agents can use remote MCP servers directly through the mcps field. MCPServerHTTP takes a url and headers and defaults to streamable HTTP.
CrewAI (mcps field)
from crewai import Agent
from crewai.mcp import MCPServerHTTP
researcher = Agent(
role="Researcher",
goal="Find current, cited facts on the web",
backstory="Uses x402serps for search",
mcps=[MCPServerHTTP(
url="https://x402serps.com/api/mcp",
headers={"Authorization": "Bearer xs_YOUR_KEY"}, # or {"X-Trial": "1"}
streamable=True,
cache_tools_list=True,
)],
)Older versions: MCPServerAdapter
from crewai_tools import MCPServerAdapter
params = {"url": "https://x402serps.com/api/mcp", "transport": "streamable-http",
"headers": {"X-Trial": "1"}}
with MCPServerAdapter(params) as tools:
agent = Agent(role="Researcher", goal="...", backstory="...", tools=tools)Pay per call with x402 instead: tool calls without a trial header or key return the x402 payment requirements, which an x402-aware client can pay in USDC on Base or Solana. Search is $0.004 a call. Buy a credit key on the pricing page.
Pricing · Docs · MCP · Integrations · Help