Cursor's AI agent generates code and answers questions based on your codebase and its training data, but it can hallucinate about current API versions, library changes, and best practices. Grounding the agent with live web search reduces these errors by giving it access to current documentation and community discussions. This tutorial shows how to add the Scavio MCP server to Cursor so the agent can verify information against live search results. The setup takes under two minutes and dramatically improves the accuracy of agent responses for current topics.
Prerequisites
- Cursor IDE installed (v0.40+)
- A Scavio API key from scavio.dev
- MCP support enabled in Cursor
Walkthrough
Step 1: Add MCP configuration to Cursor
Create or edit the MCP configuration file to add the Scavio search server.
# Create .cursor/mcp.json in your project root:
# {
# "mcpServers": {
# "scavio": {
# "url": "https://mcp.scavio.dev/mcp",
# "headers": {
# "x-api-key": "your_scavio_api_key"
# }
# }
# }
# }Step 2: Restart Cursor and verify
Restart Cursor to load the new MCP server and verify the connection.
# After saving mcp.json:
# 1. Restart Cursor
# 2. Check Settings > MCP Servers - scavio should be connected
# 3. The agent now has a "search" tool available
# 4. Ask the agent to search for something to testStep 3: Use grounded search in prompts
Ask the agent to verify information against live search data before answering.
# Example prompts that trigger grounded search:
# "Search for the latest Next.js 15 migration guide and help me upgrade"
# "Check if this API endpoint is still current: [paste URL]"
# "What is the recommended way to handle auth in FastAPI in 2026?"Step 4: Test the API directly
Verify the search API works to confirm your key and configuration are correct.
import os, requests
API_KEY = os.environ["SCAVIO_API_KEY"]
resp = requests.post("https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY},
json={"platform": "google", "query": "Next.js 15 migration guide 2026"})
for r in resp.json().get("organic_results", [])[:3]:
print(f"{r['title']}: {r['link']}")Python Example
import os, requests
API_KEY = os.environ["SCAVIO_API_KEY"]
resp = requests.post("https://api.scavio.dev/api/v1/search",
headers={"x-api-key": API_KEY},
json={"platform": "google", "query": "FastAPI auth best practices 2026"})
for r in resp.json().get("organic_results", [])[:5]:
print(r["title"])JavaScript Example
const H = {"x-api-key": process.env.SCAVIO_API_KEY, "Content-Type": "application/json"};
const r = await fetch("https://api.scavio.dev/api/v1/search", {
method: "POST", headers: H,
body: JSON.stringify({platform: "google", query: "FastAPI auth best practices 2026"})
});
(await r.json()).organic_results.slice(0,5).forEach(r => console.log(r.title));Expected Output
A Cursor IDE with live search grounding enabled, allowing the agent to verify information against current web data and reduce hallucinations in code suggestions.