How to connect language models to live search: tool calling, MCP servers for Claude and Cursor, RAG pipelines with web results, a small answer engine, honest comparisons of search APIs for agents, and what generative engine optimization means for your own content.
Tavily, Exa, Parallel, Brave, Perplexity and Google SERP APIs compared from their own docs: where results come from, extracted text vs result lists, price per 1,000 and at 100,000 searches a month, and what the terms let you store and show.
How an agent searches the web: the tool loop, four kinds of search backends with dated prices, a tested Python search tool and schema, measured latency and tokens, the real cost per answer, and how to keep web content from hijacking the agent.
A tested MCP server in TypeScript that gives Claude Desktop, Claude Code and Cursor live Google results through two tools, with retries, compact output, a config for each app and the cost of every tool call.