> ## Documentation Index
> Fetch the complete documentation index at: https://docs.langsearch.com/llms.txt
> Use this file to discover all available pages before exploring further.

# LangSearch MCP

> Connect your tools to the web through the official LangSearch MCP server.

The hosted MCP server lets compatible agents use LangSearch without a custom HTTP integration.

<div className="ls-plan"><span className="ls-kicker">OFFICIAL MCP ENDPOINT</span><p><code>[https://mcp.langsearch.com/mcp](https://mcp.langsearch.com/mcp)</code></p><a href="https://langsearch.com/dashboard">Get your free API key →</a></div>

## Choose your client

Replace `YOUR_LANGSEARCH_API_KEY` before connecting. Merge the configuration into the existing file rather than replacing other servers. For Codex, keep the key available in the environment where you launch the client.

<AccordionGroup>
  <Accordion title="Codex" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/openai.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=ca6c98a1383d5965b4adea737f187412" width="16" height="16" data-path="images/tools/openai.svg">
    **Terminal**

    ```bash theme={null}
    export LANGSEARCH_API_KEY="YOUR_LANGSEARCH_API_KEY"

    codex mcp add langsearch --url https://mcp.langsearch.com/mcp --bearer-token-env-var LANGSEARCH_API_KEY
    ```
  </Accordion>

  <Accordion title="Claude Code" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/claude.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=42a12b285b73c1fc5f3c758df53f306b" width="16" height="16" data-path="images/tools/claude.svg">
    **Terminal**

    ```bash theme={null}
    claude mcp add --transport http langsearch https://mcp.langsearch.com/mcp \
      --scope user \
      --header "Authorization: Bearer YOUR_LANGSEARCH_API_KEY"
    ```
  </Accordion>

  <Accordion title="Cursor" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/cursor.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=144190eed518e6deb8c61c710825160e" width="16" height="16" data-path="images/tools/cursor.svg">
    **.cursor/mcp.json**

    ```json theme={null}
    {
      "mcpServers": {
        "langsearch": {
          "url": "https://mcp.langsearch.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_LANGSEARCH_API_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="VS Code" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/vscode.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=7137af3cbd24fa7477d0db401352d41b" width="128" height="128" data-path="images/tools/vscode.svg">
    **MCP: Open User Configuration, or workspace .vscode/mcp.json**

    ```json theme={null}
    {
      "servers": {
        "langsearch": {
          "type": "http",
          "url": "https://mcp.langsearch.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_LANGSEARCH_API_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Gemini CLI" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/gemini.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=29d9e462198884552c0d9a91c94da3f6" width="16" height="16" data-path="images/tools/gemini.svg">
    **.gemini/settings.json**

    ```json theme={null}
    {
      "mcpServers": {
        "langsearch": {
          "httpUrl": "https://mcp.langsearch.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_LANGSEARCH_API_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="OpenCode" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/opencode.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=856f8153ffefbaea1a9df7d47a0c6aa2" width="16" height="16" data-path="images/tools/opencode.svg">
    **opencode.json**

    ```json theme={null}
    {
      "$schema": "https://opencode.ai/config.json",
      "mcp": {
        "langsearch": {
          "type": "remote",
          "url": "https://mcp.langsearch.com/mcp",
          "enabled": true,
          "oauth": false,
          "headers": {
            "Authorization": "Bearer YOUR_LANGSEARCH_API_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Windsurf" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/windsurf.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=fde17e22257136e34246e0648b44122c" width="16" height="16" data-path="images/tools/windsurf.svg">
    **\~/.codeium/mcp\_config.json**

    ```json theme={null}
    {
      "mcpServers": {
        "langsearch": {
          "serverUrl": "https://mcp.langsearch.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_LANGSEARCH_API_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Cline" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/cline.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=94dbfd74fb91e0ed7fcd8385def443ab" width="16" height="16" data-path="images/tools/cline.svg">
    **MCP Servers → Configure MCP Servers**

    ```json theme={null}
    {
      "mcpServers": {
        "langsearch": {
          "type": "streamableHttp",
          "url": "https://mcp.langsearch.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_LANGSEARCH_API_KEY"
          },
          "disabled": false,
          "autoApprove": []
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Roo Code" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/roo.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=8c7049d8d7119b850da15891994b0c6c" width="16" height="16" data-path="images/tools/roo.svg">
    **.roo/mcp.json**

    ```json theme={null}
    {
      "mcpServers": {
        "langsearch": {
          "type": "streamable-http",
          "url": "https://mcp.langsearch.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_LANGSEARCH_API_KEY"
          }
        }
      }
    }
    ```
  </Accordion>

  <Accordion title="Zed" icon="https://mintcdn.com/lang-search/I85VXobitlEjoyxh/images/tools/zed.svg?fit=max&auto=format&n=I85VXobitlEjoyxh&q=85&s=037c6cc60dac0246f680ea30629f1d92" width="24" height="24" data-path="images/tools/zed.svg">
    **Zed settings.json**

    ```json theme={null}
    {
      "context_servers": {
        "langsearch": {
          "url": "https://mcp.langsearch.com/mcp",
          "headers": {
            "Authorization": "Bearer YOUR_LANGSEARCH_API_KEY"
          }
        }
      }
    }
    ```
  </Accordion>
</AccordionGroup>

## Verify the connection

1. Save the configuration or run the command in your installed client.
2. Start or reload the LangSearch MCP connection and complete any client trust prompt.
3. Check that the client lists the server's tools.
4. Ask your agent to search the web for a specific topic and include source links.

## Troubleshooting

* **Unauthorized:** check the API key and the `Authorization: Bearer ...` header.
* **No tools listed:** confirm the endpoint ends in `/mcp`, then restart the connection and inspect the client log.
* **Rate limited:** check account usage. Creating another connection does not create another allowance.

Client settings differ: VS Code uses `servers`, Cursor uses `mcpServers`, and other clients may use different fields. Keep the format for your selected client.

Prefer installation instructions for your agent? Use the [Agent Skill](/integrations/skill).
