Web search in Gemini CLI with x402serps
Gemini CLI supports streamable HTTP MCP servers with headers. Use httpUrl for streamable HTTP (url is for SSE).
One command
gemini mcp add --transport http --header "X-Trial: 1" x402serps https://x402serps.com/api/mcp
Or edit settings.json
~/.gemini/settings.json (all projects) or .gemini/settings.json (one project):
{
"mcpServers": {
"x402serps": {
"httpUrl": "https://x402serps.com/api/mcp",
"headers": {
"X-Trial": "1"
}
}
}
}With card credits
Gemini CLI expands environment variables in settings:
{
"mcpServers": {
"x402serps": {
"httpUrl": "https://x402serps.com/api/mcp",
"headers": {
"Authorization": "Bearer $X402SERPS_KEY"
}
}
}
}Check it with /mcp in a session.
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