searchcode

com.searchcode由 searchcode.com 發布官方發布者v1.0.0更新於 Oct 24, 2026

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

已驗證Streamable HTTP可網頁執行開發者工具安全與監控

概覽

AI 產生的概覽

讓助理分析、搜尋並讀取任意公開 git 儲存庫的程式碼,包括程式碼品質問題與外洩憑證掃描。

可以做什麼
提供七個針對遠端公開 git 儲存庫的工具:code_analyze 提供儲存庫概覽,包含語言、複雜度、技術堆疊、品質問題與密鑰掃描摘要;code_search 支援正規表達式、布林、模糊與結構化查詢,回傳路徑、行號與程式碼片段;code_get_file 與 code_get_files 可依符號、行範圍或整個檔案取得程式碼;code_file_tree 列出目錄;code_get_findings 回傳規則層級的品質問題;code_find_usages 顯示哪些檔案使用了指定程式庫或框架。
適用情境
適合在助理需要理解或瀏覽不熟悉的公開程式碼庫、定位特定函式或類別、檢查程式碼品質或掃描外洩憑證、確認某項技術實際用在哪些檔案時使用。
執行需求
遠端 streamable HTTP 端點;未宣告任何套件、環境變數、標頭或身分驗證。需要能連線至該端點的網路,且僅涵蓋公開 git 儲存庫。
安裝前請注意
密鑰掃描與問題查詢工具會揭露公開儲存庫中的外洩憑證與安全問題,應將結果視為敏感資訊,避免把密鑰複製到後續提示或日誌中。查詢內容與儲存庫內容會傳送至該遠端服務。

安裝

在 SourceWeft 中

  1. 開啟 儀表板中的 searchcode,將其新增到工作區。
  2. 為需要使用其工具的對話啟用該服務。

Web executable,透過 Streamable HTTP。 遠端服務在工作區中設定後即可從網頁執行環境執行。

交給代理程式安裝

把這段提示詞貼上到 Claude Code、Codex、Cursor 等代理程式,或 SourceWeft 對話中。代理程式會讀取該伺服器的安裝指南,先向你展示發布者、端點和登入方式,經你同意後再把它新增到你的客戶端。金鑰不會寫進任何命令。

閱讀 https://sourceweft.com/mcp/com.searchcode%2Fmcp/install.md,並按其中說明把這個 MCP 伺服器接入我的客戶端。修改任何設定之前,先告訴我它的發布者、端點和登入方式,等我確認。不要把 API 金鑰寫進命令或我會提交的檔案;問我金鑰應從哪裡取得。

檢視代理程式所依據的安裝指南

其他 MCP 客戶端

把它新增到你客戶端的 mcpServers 設定中。

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

工具

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.

輸入參數pathtestslanguagerepository必填detail_levelscan_test_filesinclude_all_dirs

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.

輸入參數path必填end_linemax_linesrepository必填start_linesymbol_nameinclude_adjacent_symbols

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.

輸入參數querylanguagemax_depthrepository必填max_resultspath_filterinclude_statsinclude_all_dirs

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.

輸入參數paths必填max_linesrepository必填

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.

輸入參數kindpathtestsoffsetcategoryseverityrepository必填max_resultsscan_test_files

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.

輸入參數offsetlanguagerepository必填technology必填max_resultspath_filter

版本歷史

1
  1. v1.0.0最新Sep 16, 2026

評分

已滿足適用檢查項的 83%

該評分衡量此收錄條目的完整程度,依據註冊中心條目、端點與公開來源計算得出。它不是對伺服器本身的評價,也不表示伺服器安全或目前可用:可連通性是帶日期的檢查結果,評分也不包含安裝量或使用者評價。

  • 近 30 天內可連通必需25 分
  • 已宣告認證方式必需10 分
  • 已列出工具必需15 分
  • 描述必需15 分
  • 圖示10 分
  • 文件15 分

    請宣告包含 README 的 GitHub 儲存庫,或在 OAuth 受保護資源後設資料中提供 resource_documentation。

  • 授權條款不適用

    託管服務按其提供方的條款使用,因此這裡不要求授權條款。此檢查項不計入百分比。