Tutorial

How to Build a Cursor Agent with Web Search

Cursor's agent mode becomes 10x more useful with live search. Wire in the Scavio MCP server in .cursor/mcp.json and ship autonomous agents that know the live web.

Cursor's agent mode can autonomously edit files, run shell commands, and call MCP servers for tools. Without a search MCP, the agent's knowledge is frozen at training time. This tutorial walks through adding Scavio's MCP server to .cursor/mcp.json so every Cursor agent session gets real-time Google, YouTube, Amazon, Walmart, and Reddit.

Prerequisites

  • Cursor IDE installed (latest 2026 build)
  • A Cursor Pro subscription (agent mode)
  • A Scavio API key
  • Node.js 20+ (required by MCP)

Walkthrough

Step 1: Open Cursor MCP config

In Cursor, open the .cursor/mcp.json file in your project root, or create it if it does not exist.

Bash
touch .cursor/mcp.json

Step 2: Add the Scavio MCP entry

Paste the following into .cursor/mcp.json. Replace YOUR_KEY with your Scavio API key.

JSON
{
  "mcpServers": {
    "scavio": {
      "command": "npx",
      "args": ["-y", "@scavio/mcp"],
      "env": { "SCAVIO_API_KEY": "YOUR_KEY" }
    }
  }
}

Step 3: Reload Cursor

Reload the window (Cmd+Shift+P -> Developer: Reload Window) so Cursor picks up the new MCP server.

Bash
# In Cursor command palette
> Developer: Reload Window

Step 4: Enable the Scavio tools

Open Cursor Settings -> MCP and toggle the Scavio tools on.

Bash
# Via Cursor UI: Settings > MCP > scavio > enable all tools

Step 5: Test agent mode

Switch Cursor to agent mode and ask a question that requires live data.

Bash
> find the latest Stack Overflow answer about the 'ReferenceError' in Next.js 15 app router

Python Example

Python
# Validate Scavio works outside Cursor before debugging:
import os, requests
r = requests.post('https://api.scavio.dev/api/v1/search',
    headers={'x-api-key': os.environ['SCAVIO_API_KEY']},
    json={'query': 'stack overflow next.js 15 referenceerror app router'})
print(r.json())

JavaScript Example

JavaScript
const res = await fetch('https://api.scavio.dev/api/v1/search', {
  method: 'POST',
  headers: { 'x-api-key': process.env.SCAVIO_API_KEY, 'Content-Type': 'application/json' },
  body: JSON.stringify({ query: 'stack overflow next.js 15 referenceerror app router' })
});
console.log(await res.json());

Expected Output

JSON
Cursor's agent panel shows scavio.search_google being called, then scavio.search_reddit for community discussion. The agent writes code with the fix, citing specific Stack Overflow and Reddit URLs.

Related Tutorials

Frequently Asked Questions

Most developers complete this tutorial in 15 to 30 minutes. You will need a Scavio API key (free tier works) and a working Python or JavaScript environment.

Cursor IDE installed (latest 2026 build). A Cursor Pro subscription (agent mode). A Scavio API key. Node.js 20+ (required by MCP). A Scavio API key gives you 500 free credits per month.

Yes. The free tier includes 500 credits per month, which is more than enough to complete this tutorial and prototype a working solution.

Scavio has a native LangChain package (langchain-scavio), an MCP server, and a plain REST API that works with any HTTP client. This tutorial uses the raw REST API, but you can adapt to your framework of choice.

Start Building

Cursor's agent mode becomes 10x more useful with live search. Wire in the Scavio MCP server in .cursor/mcp.json and ship autonomous agents that know the live web.