Codesearch

io.github.SK-DEV-AI由 GitHub 帳號 SK-DEV-AI 發布v1.0.1更新於 Oct 24, 2026

Code, package, docs, paper and vulnerability search. 17 tools, keyless lanes.

概覽

AI 產生的概覽

本機 MCP 伺服器,讓助理跨多個來源搜尋程式碼、套件、文件、論文、漏洞與問答社群。

可以做什麼
  • 在已索引的 npm、PyPI、crates 相依套件中搜尋程式碼、文件與符號,並列出或讀取其檔案
  • 分析 GitHub 儲存庫(中繼資料、程式碼品質、wiki 架構),在儲存庫內搜尋、檢視檔案樹與讀取檔案
  • 查詢套件登錄庫的版本、相依關係與安全公告,取得含變更記錄與升級審查的複合套件情報
  • 查詢漏洞、授權條款與最新版本,並附帶 NVD 資訊
  • 取得文件、Stack Overflow 回答、Hacker News 討論與學術論文
  • 為結果清單補充全文內容、去重並重新排序,另提供連線檢查
適用情境
適合需要在一處完成程式碼、套件、文件、論文與漏洞調查的情境,例如評估某個相依套件、審查升級,或快速熟悉一個陌生的儲存庫。
執行需求
以 Python 套件形式透過 stdio 在本機執行(需 Python 3.14+),可從 PyPI 安裝或以 Docker 執行。許多通道不需金鑰;選用金鑰如 GITHUB_TOKEN、CONTEXT7_API_KEY、TAVILY_KEYS、S2_API_KEY、SE_API_KEY、SOFA_KEY、LI_KEY、OSS_TOKEN、FIRECRAWL_KEYS、NV_KEY 與 GROQ_API_KEYS 可提高速率限制或啟用額外通道。需要網路存取。
安裝前請注意
多個選用密鑰從環境變數讀取,請勿寫入會被提交的檔案。安裝 all 附加元件會下載數 GB 的瀏覽器/OCR 相依套件。它會抓取使用者提供的網址,README 稱已做 SSRF 驗證。未啟用選用的本機重排器時結果可能未排序。

安裝

在 SourceWeft 中

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

Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。

其他 MCP 客戶端

參照 儲存庫 中的啟動說明。

README

codesearch MCP Server

mcp-name: io.github.SK-DEV-AI/codesearch

Companion agent skills: SK-DEV-AI/skills · npx skills add SK-DEV-AI/skills

Code, package, docs, and paper search MCP server. Per-package source navigation (npm/PyPI/crates), per-repo intelligence (GitHub URL or owner/repo), Q&A communities, vulnerability data, documentation, and academic papers — with embedding dedup and a local cross-encoder reranker.

Tools (17)

  • analyze — Start here for unfamiliar repos: GitHub metadata + code quality + wiki architecture in one call (10–15s).
  • search_all — Broad multi-source discovery (Context7, GitHub, DeepWiki, CodeWiki, SO, HN, Libraries.io, npm, DevDocs, Semantic Scholar, Tavily…). For surgical single-source work call the tool below directly.
  • code_search — Search code/docs/symbols across indexed dependencies (target=npm:express). npm/PyPI/crates only — for GitHub repos use searchcode or analyze.
  • code_files / code_read — List files / read a file in an indexed dependency by package spec.
  • searchcode — Per-repo intelligence: analyze (overview), search (code within the repo), findings (quality issues), file_tree, get_file. Needs repository for every action. Free, no auth.
  • wiki — Repo architecture Q&A via DeepWiki + CodeWiki. Single repo (owner+repo) or up to 10 repos (repos).
  • search_package — Raw registry queries: versions, dist-tags, deps.dev graphs, advisories (version='latest' OK). For composite intelligence use pkg.
  • pkg — Composite package intelligence: metadata, changelog, upgrade review (vulns + changelog + deps diff), file list/read.
  • search_libraries — Libraries.io metadata and source rank. Compare dependency candidates, find the repo behind a package.
  • vulns — Sonatype Guide + keyless OSV.dev fallback: scan (needs platform+name+version), detail (needs vuln_id; enriched with NVD CVSS/CWE/references), latest_version/license (need purl).
  • docs — Docs with smart fallback (Context7 → ReadTheDocs → llms.txt → DevDocs); then fetch(url) or devdocs_fetch_content for full pages.
  • so_search — Stack Overflow: stackexchange (authoritative resolved answers) or sofa (fresher agent content, needs SOFA_KEY).
  • hn — Hacker News discussion and sentiment (search, stories, items, users).
  • papers — Academic papers. Prefer action=search (S2 → arXiv → OpenAlex → CORE fallback chain); arxiv_search is single-source and rate-limited.
  • enrich — Fetch full content for a result list from any search tool, dedup + rerank.
  • ping — Connectivity check. Use before expensive calls when uncertain.

Setup

Requires Python 3.14+.

bash
python3 -m venv .venv && source .venv/bin/activatepip install -r requirements.txtcp run.example run   # fill in your API keys (run is gitignored — never commit it)chmod +x run

Point your MCP client at run (stdio):

json
{ "codesearch": { "command": "/path/to/codesearch/run" } }

API keys (run)

KeyUsed forRequired?
GITHUB_TOKENGitHub API (repo ops, higher rate limits)Recommended
CONTEXT7_API_KEYContext7 docsOptional
TAVILY_KEYSTavily lane in search_allOptional
S2_API_KEYSemantic Scholar (1 rps dedicated vs shared anonymous pool)Optional
SE_API_KEY / SOFA_KEYStack Exchange / Stack Overflow for AgentsOptional
LI_KEYLibraries.ioOptional
OSS_TOKENSonatype OSS IndexOptional
FIRECRAWL_KEYSFirecrawl fallbackOptional
NV_KEYNVIDIA embedding endpointOptional

Install from PyPI

bash
pip install skdev-codesearch-mcp          # core install, smallpip install skdev-codesearch-mcp[all]     # + browser/OCR/extract extras (multi-GB)

The codesearch-mcp console script speaks MCP over stdio:

json
{ "codesearch": { "command": "codesearch-mcp" } }

Docker

bash
docker build -t codesearch-mcp .docker run --rm -i codesearch-mcp

Keys are passed at run time, never baked in: -e GROQ_API_KEYS=.... Heavy extras: docker build --build-arg EXTRAS="[all]" -t codesearch-mcp .

Notes

  • Reranker (optional, local): shared with the websearch server — one cross-encoder worker over a Unix socket. Without it, results return unranked; everything still works.
  • Caching: per-source file caches with TTLs; repeat queries are cheap.
  • Safety: all user-URL fetches are SSRF-validated (private-IP blocking + redirect-hop revalidation).

來源:README.md,提交 022c3cc

工具

0
SourceWeft 曾在隔離沙箱中以無憑證方式啟動該軟體包一次,以列出其工具,但未能完成:該軟體包類型無法在沙箱中執行。

版本歷史

1
  1. v1.0.1最新Oct 23, 2026

評分

已滿足適用檢查項的 50%

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

  • 近 30 天內可連通25 分

    請保持端點能夠回應 MCP 握手;SourceWeft 每 30 天探測一次。

  • 已宣告認證方式10 分

    請在註冊中心條目中宣告憑證請求標頭,或保持端點能夠回應探測,以便判定其認證方式。

  • 已列出工具15 分

    請讓伺服器在無憑證時回應 tools/list,或發布可在沙箱中無憑證啟動的軟體包。

  • 描述必需15 分
  • 圖示10 分
  • 文件15 分
  • 授權條款10 分