Simple icons/modelcontextprotocol

MCP Server

Give AI assistants access to real-time data. Search the web, compare flights, find hotels, and more.

Authentication

SearchApi's MCP server supports two authentication methods.

OAuth (Recommended)

Compatible clients (including Claude, Cursor, Codex, VS Code, and Zed) handle authentication automatically. Modern clients use Client ID Metadata Documents; other OAuth clients use secure dynamic registration. Just provide the base MCP URL:

https://www.searchapi.io/mcp

When your client connects for the first time, it will open a browser window where you can sign in and select which MCP integration to authorize. Subsequent connections reuse the stored token automatically.

Token Authentication

For clients without OAuth support or for server-to-server integrations, send your MCP token in the X-MCP-Token header:

X-MCP-Token: YOUR_TOKEN

Get your token from the MCP integrations dashboard. Do not put credentials in an MCP URL; URLs can be retained in browser history and intermediary logs.

Which method should I use?

Use OAuth if your client supports it — it's more secure (tokens expire and rotate automatically) and easier to manage. Use token auth for programmatic access or clients that don't support OAuth.

Set up your client

OAuth (Recommended)

If your client supports OAuth, use the base URL. Authentication is handled automatically on first connect.

No token needed. Your client handles authentication automatically via OAuth.

Claude Code

Run this command in your terminal:

claude mcp add --transport http searchapi https://www.searchapi.io/mcp

Your browser opens on first connect to sign in and pick an integration.

Simple icons/claude Claude Desktop

Add it from the app — no config file needed:

  1. Open Customize → Connectors.
  2. Click Add → Add custom connector.
  3. Paste the URL above, click Add, then follow the OAuth prompt to authorize.

Available on all plans.

VS Code

Create .vscode/mcp.json in your project root:

{
  "servers": {
    "searchapi": {
      "type": "http",
      "url": "https://www.searchapi.io/mcp"
    }
  }
}

Start the SearchApi server from the MCP view; VS Code handles the OAuth sign-in.

Simple icons/zed Zed

Add this under context_servers in your Zed settings:

{
  "context_servers": {
    "searchapi": {
      "url": "https://www.searchapi.io/mcp"
    }
  }
}

Zed uses context_servers instead of mcpServers and runs the OAuth sign-in on first connect.

Simple icons/cursor Cursor

Add this to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "searchapi": {
      "url": "https://www.searchapi.io/mcp"
    }
  }
}

Cursor opens the OAuth sign-in when it first connects.

Codex

Run this command in your terminal:

codex mcp add searchapi --url https://www.searchapi.io/mcp

Codex discovers OAuth automatically. Run codex mcp login searchapi if sign-in is not opened immediately.

Any stdio-only client

Use the OAuth-aware mcp-remote bridge:

{
  "mcpServers": {
    "searchapi": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://www.searchapi.io/mcp"
      ]
    }
  }
}

Requires Node.js (for npx). Your browser opens for authorization on first connect.

Token Authentication

Replace YOUR_TOKEN with the token from your dashboard.

Send the token with the X-MCP-Token header — not in the URL or the Authorization header (that's reserved for OAuth).

Simple icons/cursor Cursor

Add this to ~/.cursor/mcp.json:

{
  "mcpServers": {
    "searchapi": {
      "url": "https://www.searchapi.io/mcp",
      "headers": {
        "X-MCP-Token": "YOUR_TOKEN"
      }
    }
  }
}

Or install it automatically:

Simple icons/cursor Install in Cursor
Simple icons/windsurf Windsurf

Add this to ~/.codeium/windsurf/mcp_config.json:

{
  "mcpServers": {
    "searchapi": {
      "serverUrl": "https://www.searchapi.io/mcp",
      "headers": {
        "X-MCP-Token": "YOUR_TOKEN"
      }
    }
  }
}

Windsurf uses the serverUrl key instead of url.

Codex

Add this to ~/.codex/config.toml:

[mcp_servers.searchapi]
url = "https://www.searchapi.io/mcp"
http_headers = { "X-MCP-Token" = "YOUR_TOKEN" }
VS Code

Create .vscode/mcp.json in your project root:

{
  "servers": {
    "searchapi": {
      "type": "http",
      "url": "https://www.searchapi.io/mcp",
      "headers": {
        "X-MCP-Token": "YOUR_TOKEN"
      }
    }
  }
}
Simple icons/zed Zed

Add this under context_servers in your Zed settings:

{
  "context_servers": {
    "searchapi": {
      "url": "https://www.searchapi.io/mcp",
      "headers": {
        "X-MCP-Token": "YOUR_TOKEN"
      }
    }
  }
}
Simple icons/opencode OpenCode

Add this to opencode.json in your project root:

{
  "mcp": {
    "searchapi": {
      "type": "remote",
      "url": "https://www.searchapi.io/mcp",
      "enabled": true,
      "oauth": false,
      "headers": {
        "X-MCP-Token": "YOUR_TOKEN"
      }
    }
  }
}
Claude Code

Run this command in your terminal:

claude mcp add --transport http searchapi https://www.searchapi.io/mcp --header "X-MCP-Token: YOUR_TOKEN"
Simple icons/claude Claude Desktop

Add this to your claude_desktop_config.json:

{
  "mcpServers": {
    "searchapi": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://www.searchapi.io/mcp",
        "--header",
        "X-MCP-Token:${MCP_TOKEN}"
      ],
      "env": {
        "MCP_TOKEN": "YOUR_TOKEN"
      }
    }
  }
}

Restart Claude Desktop after saving. Requires Node.js (for npx).

Any other client

Bridge a stdio-only client with mcp-remote. Set MCP_TOKEN in its environment:

npx mcp-remote https://www.searchapi.io/mcp --header "X-MCP-Token:${MCP_TOKEN}"

What you can do

Click any tool card to copy an example prompt you can use with your AI assistant.

Limits

  • Maximum 10 MCP integrations per account
  • Standard API rate limits apply
  • Each tool call counts as one API request
By connecting a client you agree to SearchApi's Terms and Privacy Policy.