# Cursor

> Give Cursor's agent live web access — install the Search1API plugin from the Cursor Directory in one click, or configure the hosted MCP server in mcp.json.

Canonical URL: https://s1.dev/docs/integrations/cursor

Search1API is published as a plugin in the [Cursor Directory](https://cursor.directory/plugins/search1api). Installing it points Cursor at the hosted Search1API MCP server, so the agent can search the web, read pages and check what's trending while it works on your code — without leaving the editor or writing an integration.

## What the agent gets

| Tool | What it does | Required |
| --- | --- | --- |
| `search` | Web search | `query` |
| `news` | News search | `query` |
| `crawl` | Read a URL | `url` |
| `sitemap` | List a site's links | `url` |
| `trending` | GitHub / Hacker News trends | `search_service` |

## Install

### One click from the Cursor Directory

1. Open [cursor.directory/plugins/search1api](https://cursor.directory/plugins/search1api).
2. Select **Add to Cursor**. Your browser hands the install off to the Cursor desktop app.
3. Review the configuration Cursor shows you — it should be exactly the hosted endpoint:

   ```json
   {
     "url": "https://mcp.search1api.com/mcp"
   }
   ```

4. Confirm the install, then sign in when Cursor opens the Search1API authorization page in your browser.

No API key is involved: the entry carries only the server URL, and Cursor completes OAuth on the first connection.

### By hand in `mcp.json`

Cursor reads MCP servers from two files:

| File | Scope |
| --- | --- |
| `~/.cursor/mcp.json` | Every project |
| `.cursor/mcp.json` | One project |

<Tabs items={['OAuth', 'API key']}>

<Tab value="OAuth">

Configure the endpoint and nothing else. Cursor discovers the authorization server from Search1API's `WWW-Authenticate` challenge, registers itself, and prompts you to sign in:

```json
{
  "mcpServers": {
    "search1api": {
      "url": "https://mcp.search1api.com/mcp"
    }
  }
}
```

</Tab>

<Tab value="API key">

Create a key at [app.s1.dev](https://app.s1.dev) and send it as a bearer token:

```json
{
  "mcpServers": {
    "search1api": {
      "url": "https://mcp.search1api.com/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_SEARCH1API_KEY"
      }
    }
  }
}
```

For `~/.cursor/mcp.json` that is all you need. For a project's `.cursor/mcp.json`, which usually ends up in version control, swap the key for `"Bearer ${env:SEARCH1API_KEY}"` and export `SEARCH1API_KEY` from your shell profile — Cursor resolves `${env:NAME}` inside `url` and `headers`. Note that Cursor's `envFile` field will not do this for you: it is stdio-only and is ignored for remote servers.

</Tab>

</Tabs>

Restart Cursor after editing the file.

## Verify

1. Open **Customize** in the Cursor sidebar and confirm the Search1API server is listed and enabled. It should report the tools above.
2. In a chat, ask: `Search the web for the latest Next.js release notes and cite the sources.`
3. Approve the tool call when Cursor asks.

Cursor lists the connected tools under `Available Tools` and uses them on its own when a request needs current information, including in Plan mode. You can also name a tool directly — for example, "use the crawl tool on this URL".

## Troubleshooting

### The server does not appear

Check the JSON is valid and sits at `~/.cursor/mcp.json` or `<project>/.cursor/mcp.json`, then restart Cursor. Confirm the server is toggled on under **Customize**.

### Read the MCP logs

Open the Output panel (`Cmd+Shift+U` on macOS, `Ctrl+Shift+U` on Windows and Linux) and select **MCP Logs** from the dropdown. It shows connection attempts, authorization challenges and tool errors.

### `401 Unauthorized`

On OAuth, the session expired or was revoked — remove and re-add the server to authorize again. On an API key, the key is invalid or revoked. If you used `${env:SEARCH1API_KEY}`, also check the variable actually reaches Cursor: launch it from a shell where `echo $SEARCH1API_KEY` prints the key, or paste the literal key in temporarily to isolate the problem. See [Authentication](https://s1.dev/docs/essentials/authentication).

### `402 Payment Required`

The account is out of credits. See [Credits and limits](https://s1.dev/docs/essentials/credits-and-limits).

### Tools connect but are never used

Describe the need explicitly ("search the web for…", "read this URL…") or name the tool. Cursor decides on its own whether a request warrants a tool call.

## Billing

Tool calls from Cursor are ordinary API calls and spend the same credits at the same rates as calling the endpoints yourself. A search or news request costs one credit; crawling a page costs one credit per page. See [Credits and limits](https://s1.dev/docs/essentials/credits-and-limits).

## Related documentation

- [MCP server](https://s1.dev/docs/integrations/mcp) — the full endpoint reference, OAuth details and other clients
- [Agent skill](https://s1.dev/docs/integrations/skills) — teach an agent *when* to search, not just how
- [Search API](https://s1.dev/docs/basic/search) · [Crawl API](https://s1.dev/docs/basic/crawl)
- [Cursor Directory listing](https://cursor.directory/plugins/search1api) · [Cursor MCP documentation](https://cursor.com/docs/mcp)

Source: [github.com/superagents-lab/search1api-mcp](https://github.com/superagents-lab/search1api-mcp)