searchcode.com — Code Intelligence for LLMs

Structured access to code analysis, search, and retrieval for any public git repository—purpose-built for large language models.

MCP Server for Code Intelligence

Code intelligence

for LLMs.

Turn $50 in API costs into $0.50.

Structured access to code analysis, search, and retrieval for any public git repository—purpose-built for large language models.

Enterprise — Run on your private code →

Get Started See Example

Any

Public Git Repo

99%

Token Reduction

6

API Tools

1

Call vs Dozens

ApproachTool callsTokensLLM Cost
Raw file reads (clone + cat)~30+~50,000~$50
code_analyze1~500~$0.50

clone + cat ~50k tokens

searchcode ~500 tokens

Pied Piper
Middle-out compression for code

Trusted by world-class LLMs.

Claude GPT Gemini Grok Kimi DeepSeek Mistral Qwen Llama

Capabilities

Six specialized tools.

Each tool returns structured, pre-computed data—so LLMs spend tokens on reasoning, not parsing.

code_analyze

Language breakdowns, complexity metrics, tech stack detection, code quality, and security scanning. Scope to a subdirectory for large monorepos.

code_search

Full-text code search with boolean queries, regex, and structural filters—declarations, usages, strings, comments.

code_get_file

Retrieve full files, line ranges, or specific symbols by name. Include adjacent declarations for context in a single call.

code_get_files

Batch retrieve up to 10 files in a single call—perfect for cross-file analysis.

code_file_tree

Directory structure with language, path, and depth filters, plus optional file stats. Fuzzy file finder to locate files by partial name.

code_get_findings

Drill into code quality and security findings filtered by severity and category.

Example

See it in action.

Try the live API right here—search code or analyze a repository.

code_analyze code_search

repository: https://github.com/expressjs/express

Analyze Repository

Built for LLMs. Works for humans too.

Use Cases

Hours of code research. One call.

The stuff that eats your afternoon—searchcode handles in seconds.

🔍

Understand a new codebase in one call

Skip cloning, skip setup. Get languages, complexity hotspots, tech stack, and quality issues for any repository instantly. The full picture in seconds, not hours of poking around.

🛡

Scan for secrets and security issues

Find hardcoded credentials, quality issues by severity, and security findings across any public repo. Check before you ship it or depend on it—no tooling setup required.

🧩

Evaluate a library before you integrate it

Full evaluation without cloning—zero disk footprint, zero setup. Analyze tech stack, API surface, code quality, and dependency overlap in seconds. Structured results save bandwidth and tokens compared to cloning and parsing raw files.

Compare projects with real data

Stack two libraries side by side with hard numbers: complexity, code quality, tech stack, and size. Make adoption decisions based on data, not GitHub stars.

📦

Evaluate dependencies beyond the README

READMEs lie. See if the code is actually well-maintained, what deprecated patterns exist, and where the complexity hides. Know what you're importing before it's in your dependency tree.

📋

Due diligence on inherited code

Acquisition, contractor handoff, or new team—get an honest picture of what you're walking into. Complexity distribution, quality findings, and tech stack, laid out in structured data.

🔧

Debug a dependency without cloning it

Search for a symbol, pull the exact function, see surrounding context. Fix the problem without git clone, IDE setup, or reading through a repo you'll never touch again.

🤖

Give AI agents structured code context

Purpose-built MCP tools that feed LLMs code intelligence in structured format. One call replaces dozens of file reads, saving thousands of tokens and giving agents what they actually need to reason.

🔬

Research how other projects solved the same problem

Survey how multiple open-source projects implement the same feature before building yours. Search across repos for patterns, compare approaches, and read specific implementations—all without cloning a single repo.

📈

Screen candidates through their public repos

Build a portfolio-level picture from a candidate's public repositories. Compare language proficiency, complexity handling, code quality, and engineering patterns across repos—real evidence of what they build, not what they claim.

Built on a decade of code intelligence.

searchcode.com previously indexed over 75 billion lines of code across millions of repositories, serving millions of API requests daily. That hard-won experience in scaling code analysis is the foundation this MCP server is built on.

Under the hood: scc for code counting & complexity analysis, and cs for code search with smart ranking—two battle-tested open-source tools by the same author. Point it at any public git repo and get structured, pre-computed results that cut LLM token usage by 99%.

Feedback

What LLMs are saying.

“The tools saved 15–20 tool calls and several thousand tokens of HTML parsing overhead. The biggest win was direct access to source code in a structured format, which let me identify three specific bugs that would have been nearly impossible to find through web search or paper reading alone.”

C

Claude Opus 4.6

Large Language Model, Anthropic

“The searchcode tool suite was fundamental to my analysis. It enabled a workflow that is impossible with conventional methods, allowing me to move from a high-level architectural overview of a repository to the specific, impactful lines of code in just a few queries. The tools’ speed and precision were critical in uncovering the ‘why’ behind a project’s design—from identifying critical performance optimizations to understanding core architectural patterns. This rapid, evidence-based discovery goes far beyond simple keyword searching and allows for a true, deep understanding of a codebase.”

G

Gemini

Large Language Model, Google

“searchcode’s combination of intelligent search, targeted symbol retrieval, and now adjacent context makes remote code analysis feel like a local IDE. I can dive from project overview to specific optimizations in seconds, not hours.”

Q

Qwen 3.5 35B-A3B

Large Language Model, Alibaba

Enterprise

Run on your private code.

Deploy searchcode on your own infrastructure. Ships as a Docker image with a Helm chart for Kubernetes. SSH key and HTTPS token authentication for private git repositories. Your git server controls permissions—searchcode respects what’s already in place.

Contact [email protected]

Installation

Set up in under a minute.

No install, no API key. Just add the server URL to your MCP client.

Not using MCP? Use the REST API instead ↓

Claude Code

Run in your terminal (current project)

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

Or globally (all projects)

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

Claude Desktop

Add to claude_desktop_config.json

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

Cursor

Add to .cursor/mcp.json

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

VS Code / Copilot

Add to .vscode/settings.json

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

Gemini CLI

Add to ~/.gemini/settings.json

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

Amp

Add to ~/.config/amp/settings.json or .amp/settings.json

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

OpenCode

Add to opencode.json

{ "mcp": { "searchcode": { "type": "remote", "url": "https://api.searchcode.com/v1/mcp" } } }

Crush

Add to .crush.json or crush.json

{ "mcp": { "searchcode": { "type": "http", "url": "https://api.searchcode.com/v1/mcp" } } }

Codex

Add to ~/.codex/config.toml

[mcp_servers.searchcode] url = "https://api.searchcode.com/v1/mcp"

LM Studio

Add to LM Studio MCP config

Works with any MCP client that supports remote servers via streamable HTTP. No dependencies to install—searchcode runs server-side.

REST API

No MCP client? Use plain HTTP

curl -X POST
"https://api.searchcode.com/api/v1/code_analyze?client=my-app"
-H "Content-Type: application/json"
-d '{"repository":"https://github.com/expressjs/express"}'

All 6 tools available as POST /api/v1/{tool_name}. See the OpenAPI spec for full docs.

Open Source

Built on proven tools.

searchcode is powered by battle-tested open-source projects.

300+

scc

Fast, accurate code counter with complexity calculations. Supports 300+ languages.

github.com/boyter/scc

REST

REST API

Same 6 tools as plain JSON over HTTP. No MCP client needed—just POST and go.

OpenAPI Spec

Smart Ranking

cs

Code-aware smart ranking, regex, and structural filters. Built for speed.

github.com/boyter/cs

6 tools

MCP Protocol

Implements the Model Context Protocol for seamless LLM integration.

modelcontextprotocol.io

Beta

Free during beta

Paid tiers are planned long-term, but a free tier will likely always be available.

Need to run on private code? Contact us about enterprise deployment.

Need help? [email protected] — @boyter on X

Related Servers