How to Add the searchcode MCP Server to Claude Code, Cursor, or Copilot

Updated

Add the searchcode MCP server by pointing your client at the HTTP endpoint https://api.searchcode.com/v1/mcp. Claude Code takes a one-line CLI command; Cursor and VS Code/Copilot take a small JSON block in a config file; Claude Desktop needs an npx bridge. The server is free during beta with no signup and no API key, so the only thing you supply is the URL. Once connected, your assistant gets six tools (code_analyze, code_search, code_get_file, and three more) that work over any public git repository.

What you need before starting

  • A client that supports MCP servers: Claude Code, Cursor, VS Code/Copilot, Claude Desktop, or another listed client.
  • The endpoint URL: https://api.searchcode.com/v1/mcp.
  • No account, API key, or payment step — the beta is open and keyless.
  • A public repo you want to inspect, in owner/repo form (e.g. fastapi/fastapi).

Claude Code

Run this from your terminal:

claude mcp add searchcode --transport http https://api.searchcode.com/v1/mcp

The --transport http flag tells Claude Code this is a remote HTTP server rather than a local process, and the trailing URL is the endpoint. After it registers, ask Claude Code something like "analyze fastapi/fastapi" and it should call code_analyze instead of cloning and grepping.

Cursor

Create or edit .cursor/mcp.json in your project:

{"mcpServers":{"searchcode":{"url":"https://api.searchcode.com/v1/mcp"}}}

The key name (searchcode) is just a label — it's how the server shows up in your client. The url field is what actually connects it. Restart or reload Cursor so it picks up the new server.

VS Code / Copilot

Edit .vscode/settings.json:

{"mcp":{"servers":{"searchcode":{"url":"https://api.searchcode.com/v1/mcp"}}}}

Note the nesting differs from Cursor: VS Code wraps servers under an mcp object with a servers key, while Cursor uses mcpServers at the top level. Copying one config into the other client won't work.

Claude Desktop

Claude Desktop can't hit the HTTP endpoint directly, so it runs a local bridge through npx:

{"mcpServers":{"searchcode":{"command":"npx","args":["-y","mcp-remote","https://api.searchcode.com/v1/mcp"]}}}

Here command and args describe a local process that mcp-remote uses to reach the remote server. The -y flag auto-confirms the package install so it doesn't stall on a prompt.

Other clients

For OpenCode, Crush, Codex, Gemini CLI, Amp, or LM Studio, the site points to a full setup guide rather than inline snippets. The pattern is the same across all of them — register a server named searchcode with the URL https://api.searchcode.com/v1/mcp — but the config file location and key names vary by client, so check that client's own MCP documentation for where the block goes.

Verifying it works

Ask your assistant to analyze a known public repo, for example redis/redis. A working setup returns a structured dossier: language breakdown, complexity metrics, detected tech stack, code quality signals, and findings. If the assistant instead starts cloning, running cat, or grepping, the server isn't connected — recheck the URL and that you reloaded the client.

Common snags

  • Wrong config shape. Cursor uses mcpServers; VS Code uses mcp.servers. Mixing them silently fails.
  • No reload. Most clients only read MCP config at startup, so restart after editing.
  • Expecting a local install. This is a remote HTTP server — there's nothing to clone or run yourself except the npx bridge for Claude Desktop.
  • Private repos. The tools operate on public repositories; don't expect access to private ones.

Why the setup is worth it

Without the server, understanding a new repo can take roughly 30+ tool calls and ~50,000 tokens (about $0.50 per investigation) as the model clones, cats, and greps. With it, the same question resolves in about 1 call and ~500 tokens (about $0.005) because the server returns pre-computed, structured data. Same answer, far fewer tokens — which is the whole point of wiring it in.