# searchcode

> Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.

- name: com.searchcode/mcp
- version: 1.0.0
- connection class: R0 (autonomous)
- trust: 69/100 flags: no-repository
- quality: 76/100 (good)
- owner: not claimed
- descriptor: https://api.protogrid.dev/v1/servers/com.searchcode%2Fmcp
- tools: https://api.protogrid.dev/v1/servers/com.searchcode%2Fmcp/tools

**An agent can connect right now, no human step.** Remote endpoint, no authentication, reachable on the last probe.

## Connection (mcpServers)

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


## Trust

- hygiene: 80
- liveness: 100
- freshness: 45
- provenance: 45
- drivers: +dns-namespace +reachable +uptime-100% -stale-228d -no-repository
- Derived from observable signals (official registry feed and our own credential-free probes); no code audit performed.

## Quality 76/100 (good)

### protocol: 75 (weight 25)

- warn `protocol.modern`: newest supported version is 2025-03-26; 2026-07-28 not supported, older versions are deprecated until 2027-07-28
- n/a `protocol.stateless`: only applies to 2026-07-28 servers
- pass `protocol.transport`: streamable HTTP
- n/a `protocol.list_ttl`: only applies to 2026-07-28 servers

### authorization: n/a (weight 15)

- n/a `auth.prm`, `auth.as_metadata`, `auth.cimd`: no remote uses OAuth
- n/a `auth.secret_in_url`: no templated URL

### tool hygiene: 64 (weight 30)

- pass `tools.descriptions`: every tool has a description
- warn `tools.description_length`: 1 tools have descriptions over 1,024 characters, which crowds the context
- pass `tools.schemas`: every tool has an object input schema
- fail `tools.annotations`: no tool declares readOnlyHint or destructiveHint, so clients cannot tell safe calls from risky ones
- fail `tools.directory_hints`: no tool declares all four of readOnlyHint, destructiveHint, idempotentHint and openWorldHint; missing: code_get_findings (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); code_analyze (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); code_get_file (readOnlyHint, destructiveHint, idempotentHint, openWorldHint); …
- pass `tools.token_cost`: about 4,783 tokens to load every tool
- pass `tools.api_dump`: tools are not a one-to-one API dump

### stability: 100 (weight 15)

- pass `stability.changes`: 2 tool changes in 30 days
- pass `stability.rug_pull`: no tool changed its meaning under the same name

### dependencies: n/a (weight 15)

- n/a `deps.known_vulns`, `deps.mcp_sdk_version`, `deps.resolvable`: no npm or PyPI package

- tools: 7, about 4,783 tokens to load them all
- tool set hash: 19467bd0511464b2e98e02fa40670050
- tools last changed: 2026-09-30T12:28:39.115Z
- badge: [![protogrid quality](https://protogrid.dev/badge/com.searchcode/mcp.svg)](https://protogrid.dev/servers/com.searchcode/mcp)
- Checks run on what our credential-free, read-only probes observe; tools are never called and no code audit is performed.

### Tool changes

- 2026-09-30 `code_get_findings` changed (inputSchema)
- 2026-09-30 `code_analyze` changed (inputSchema)

Full history: https://api.protogrid.dev/v1/servers/com.searchcode%2Fmcp/changes

## Remotes

- https://api.searchcode.com/v1/mcp (streamable-http, auth none, reachable true, uptime30d 1)

## Packages

_none_

## Tools (7)

- `code_analyze`: Instant repo overview — languages, complexity, file count, tech stack, code quality findings, and secret scanning. Use as your first call to understand any remote public codebase. This is the tool that scans for LEAKED CREDENTIALS: security_summary is a dedicated secret and credential scanner covering API keys, access tokens, private keys and connection strings, each with a file, a line and a confidence grade. Prefer it over grepping for key prefixes with code_search — a pattern search only finds what you thought to spell, and finds nothing at all in the repositories where you guessed wrong. Supports language filtering and path scoping (for large monorepos, analyze a subdirectory instead of the full repo). When analysing multiple repositories, call in parallel rather than sequentially. Dependency/build directories excluded by default.
- `code_file_tree`: List files and directories in any public git repo. Supports fuzzy file search (query parameter), language/path filtering, and depth control. Combine query with path_filter to search within a directory subset. Use to explore project layout, find files by name, or browse specific directories. Results capped at 1000 files; response includes total_files, files_shown, and truncated fields. Use language or path_filter to narrow large repos. Dependency/build directories excluded by default.
- `code_find_usages`: Find which files in a repository use a given technology, library or framework — with the line number and the import keyword that proves it. Use after code_analyze reports a technology in tech_stack and you need to know which files it is actually in, rather than searching for import statements by hand. Returns file, line, evidence keyword and language. COVERAGE LIMIT: technology detection reads only the first 150 lines of each file, so a file that imports the technology further down, or uses it without a top-of-file import, does not appear. Absence from these results is not proof the file does not use the technology. The count matches the files_using value code_analyze reports for the same technology. Shares the analysis cache with code_analyze — no duplicate work if analyze already ran.
- `code_get_file`: Get code from a remote public git repository — either a specific function/class by name, a line range, or a full file. PREFERRED WORKFLOW: When search results or findings have already identified a specific function, method, or class, use symbol_name to extract just that declaration. This avoids fetching entire files and keeps context focused. Only fetch full files when you need a broad understanding of a file you haven't seen before. For supported languages (Go, Python, TypeScript, JavaScript, Java, C, C++, C#, Kotlin, Swift, Rust) the response includes a symbols list of declarations with line ranges. This is not a first-call tool — use code_analyze or code_search first to identify targets, then extract precisely what you need.
- `code_get_files`: Get contents of multiple files from a remote public git repository in a single call. Reduces round-trips when you need to read several related files. Max 10 files per batch, 5000 total lines budget across all files. Each file supports optional line ranges. Failed files return per-file errors without blocking other files.
- `code_get_findings`: Get detailed code quality findings from a remote public git repository. Returns rule IDs, line numbers, severity, category, descriptions, and source snippets. Supports filtering by file path, severity (error, warning, info), category (security, deprecated, safety, correctness, maintainability, accessibility, modernization, performance, concurrency), and kind (security, quality) — kind=security is every security-category finding in one call, kind=quality is everything else. code_analyze.top_findings shows only the quality half; use kind=security here to see the security-category findings it leaves out. THIS IS NOT THE SECRET SCANNER. kind=security means insecure code — weak hashes, unsafe deserialization, injection-shaped patterns — and it will not find a leaked API key or private key. Leaked credentials are code_analyze.security_summary, which is a different scanner over different rules; the two sets do not overlap, so an audit wants both. Use after code_analyze to drill into specific findings. Shares the same analysis cache — no duplicate work if analyze already ran.
- `code_search`: Fast code search across any public git repo. Returns file paths, line numbers, and code snippets with context. Supports regex, boolean queries, fuzzy matching, and structural filters (declarations, usages, strings, comments). Dependency/build directories excluded by default. Searching for leaked secrets? Call code_analyze instead and read security_summary — it runs a real secret and credential scanner over the whole repository, where searching for key prefixes like "sk-", "ghp_" or "AIza" only matches the spellings you happened to think of.
