codesearch MCP Server
Summary: A multi-source code search and intelligence MCP server for repositories, packages, docs, Q&A, vulnerabilities, and academic papers.
Check connectivity and API reachability with
ping.Run broad multi-source discovery and optional synthesized answers with
search_all.Analyze GitHub repositories, search repo code, inspect quality findings, list files, and read files via
analyzeandsearchcode.Ask repository architecture questions across one or many repos via
wiki.Navigate indexed npm/PyPI/crates package source with
code_search,code_files, andcode_read.Query package registries, changelogs, upgrade reviews, dependencies, metadata, and source-rank data via
search_package,pkg, andsearch_libraries.Scan vulnerabilities, fetch vulnerability details, check latest versions, and inspect licenses via
vulns.Search and fetch documentation with smart fallbacks via
docs.Search Stack Overflow, Stack Exchange, and SOFA content via
so_search.Search Hacker News stories, comments, users, and sentiment via
hn.Search academic papers, citations, references, authors, and recommendations via
papers.Enrich, deduplicate, and rerank search results via
enrich.Benefit from optional local reranking, per-source caching, SSRF-validated URL fetching, and optional API-key integrations.
Searches arXiv for academic papers as part of the papers search workflow, with single-source arXiv search also available.
Provides per-repository intelligence through the GitHub API, including repository metadata, code search within a repo, quality findings, file trees, and file retrieval.
Retrieves Libraries.io package metadata and source rank, helping compare dependency candidates and find the repository behind a package.
Enables querying npm package metadata and source: versions, dist-tags, dependency graphs, code search, file listing, and file reading for indexed npm dependencies.
Enables querying PyPI package metadata and source: versions, dependency information, code search, file listing, and file reading for indexed PyPI dependencies.
Searches academic papers through Semantic Scholar, with optional API-key access for dedicated rate limits.
Queries Sonatype Guide for vulnerability scans, vulnerability details, latest package versions, and license information.
Uses the Stack Exchange API to search authoritative Q&A answers across Stack Exchange sites.
Searches Stack Overflow for resolved answers and can optionally use Stack Overflow for Agents content via SOFA.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@codesearch MCP Server analyze the repo facebook/react and summarize its architecture"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 usesearchcodeoranalyze.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. Needsrepositoryfor 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 usepkg.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)ordevdocs_fetch_contentfor full pages.so_search — Stack Overflow:
stackexchange(authoritative resolved answers) orsofa(fresher agent content, needsSOFA_KEY).hn — Hacker News discussion and sentiment (search, stories, items, users).
papers — Academic papers. Prefer
action=search(S2 → arXiv → OpenAlex → CORE fallback chain);arxiv_searchis 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.
Related MCP server: Code Search MCP
Setup
Requires Python 3.14+.
python3 -m venv .venv && source .venv/bin/activate
pip install -r requirements.txt
cp run.example run # fill in your API keys (run is gitignored — never commit it)
chmod +x runPoint your MCP client at run (stdio):
{ "codesearch": { "command": "/path/to/codesearch/run" } }API keys (run)
Key | Used for | Required? |
| GitHub API (repo ops, higher rate limits) | Recommended |
| Context7 docs | Optional |
| Tavily lane in search_all | Optional |
| Semantic Scholar (1 rps dedicated vs shared anonymous pool) | Optional |
| Stack Exchange / Stack Overflow for Agents | Optional |
| Libraries.io | Optional |
| Sonatype OSS Index | Optional |
| Firecrawl fallback | Optional |
| NVIDIA embedding endpoint | Optional |
Install from PyPI
pip install skdev-codesearch-mcp # core install, small
pip install skdev-codesearch-mcp[all] # + browser/OCR/extract extras (multi-GB)The codesearch-mcp console script speaks MCP over stdio:
{ "codesearch": { "command": "codesearch-mcp" } }Docker
docker build -t codesearch-mcp .
docker run --rm -i codesearch-mcpKeys 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).
Available Tools
17 toolsanalyzeA
Deep repo analysis: parallel-fetch GitHub metadata + SearchCode code quality + DeepWiki architecture + CodeWiki sections in one call. Start here for unfamiliar repos before surgical wiki/searchcode calls. Accepts GitHub URLs or owner/repo strings. May take 10-15s (parallel API calls). e.g. analyze(repository='sst/opencode')
Inputs: repository (required).
code_filesA
List files in an indexed dependency by package-scoped path (e.g. npm:express/src/). PkgSeer + jsDelivr; indexes npm/pypi/crates ONLY (github: specs rejected). e.g. code_files(spec='npm:express')
Inputs: spec (required), path_prefix.
code_readA
Read a file from an indexed dependency by package-scoped path. PkgSeer + jsDelivr; indexes npm/pypi/crates ONLY (github: specs rejected). e.g. code_read(spec='npm:express', path='src/index.js')
Inputs: path (required), spec (required).
code_searchA
Search code, docs, and symbols across indexed dependencies and public repositories. Package scope (npm:express, pypi:requests) via PkgSeer; global public-code search via Sourcegraph (keyless). Supports qualifiers like kind:, category:, lang:. e.g. code_search(query='handleAuth', target='npm:express')
Inputs: query (required), lang, limit, source, +1 more.
docsC
Documentation operations. Default action runs smart fallback (ReadTheDocs→DevDocs→llms.txt→Context7, quota-free sources first). After finding docs, use fetch(url) to read full pages or devdocs_fetch_content for structured content. e.g. docs(query='authentication', library='express')
Inputs: fast, path, slug, query, +7 more.
enrichA
Fetch full content for a list of search results, deduplicate, and rerank by relevance. Give it results from any search tool plus the original query. e.g. enrich(query='rust async', results=[{'url':'...','title':'...'}])
Inputs: query (required), results (required), top_k, include_html, +1 more.
hnB
Hacker News: search, item detail, user profile, or story lists (top/new/best/ask/show). Use for tech-community discussion and sentiment; for resolved Q&A use so_search. e.g. hn(query='rust', tags='story', min_points=50)
Inputs: action (required), tags, count, query, +6 more.
papersB
Academic papers from Semantic Scholar, CORE API, and arXiv. Prefer action=search for topic queries (multi-source S2→arXiv→OpenAlex→CORE fallback); arxiv_search is single-source and rate-limited. e.g. papers(query='transformer attention', fields_of_study='Computer Science')
Inputs: action (required), year, count, query, +8 more.
pingA
Lightweight connectivity check — verifies internet and key API endpoints are reachable. Use before expensive calls when connectivity is uncertain. No params needed. e.g. ping()
Inputs: no named parameters.
pkgA
Package intelligence: info (composite metadata — Libraries.io + Sonatype + PkgSeer), changelog (release notes), upgrade_review (vulns+changelog+deps diff between versions), files (list source files), read (read a source file). For raw single-source registry queries (npm versions, crates categories), use search_package instead. e.g. pkg(name='express', action='info')
Inputs: name (required), path, count, action, +6 more.
search_allA
Unified search across 14+ sources with embedding dedup and reranking. Use for broad multi-source discovery; for surgical single-source work call so_search/hn/papers/code_search directly. e.g. search_all(query='rust async runtime', language='rust')
Inputs: query (required), repo, count, owner, +8 more.
searchcodeA
Per-repo code intelligence via SearchCode (free, no auth). Use analyze for instant repo overview (languages, complexity, tech stack, credentials), search for searching code within a repo, findings for code quality issues, file_tree to list files, or get_file to read a file. No rate limits. e.g. searchcode(action='analyze', repository='https://github.com/expressjs/express')
Inputs: action (required), path, query, category, +10 more.
search_librariesB
Libraries.io dependency metadata and source rank. Use to compare dependency candidates or find the repo behind a package; for registry versions/vulns use search_package/pkg/vulns. e.g. search_libraries(name='lodash', platform='npm')
Inputs: name, repo, sort, count, +9 more.
search_packageA
Raw package registry queries (npm/PyPI/crates + deps.dev). Use for fast single-source lookups. For composite intelligence (Libraries.io + Sonatype vulns), use pkg instead. e.g. search_package(name='express', registry='npm')
Inputs: name (required), action, version, registry, +3 more.
so_searchB
Stack Overflow: Stack Exchange API (free, 300 req/day, resolved/accepted answers with score/tags) or SOFA (Stack Overflow for Agents, beta, agent-contributed content with trust scores, requires SOFA_KEY env). Use stackexchange for authoritative resolved answers, sofa for fresher agent-contributed content. e.g. so_search(query='python async', tags='python', accepted=true)
Inputs: ids, page, site, sort, +15 more.
vulnsA
Sonatype Guide + OSV.dev fallback: scan packages, vulnerability details, latest version, or license analysis by PURL. scan needs platform+name+version (or coordinates) — on Sonatype 401/429/quota errors it falls back to keyless OSV.dev automatically. detail accepts Sonatype ids, GHSA-* (GitHub Advisory enrichment), or CVE-* ids. latest_version/license need purl. e.g. vulns(action='scan', name='lodash', version='4.17.20')
Inputs: name, purl, action, version, +3 more.
wikiC
Repo architecture and wiki via DeepWiki + CodeWiki. For single-repo queries use owner+repo; for multi-repo questions pass repos (array of owner/repo strings, max 10). e.g. wiki(owner='torvalds', repo='linux', question='How does the scheduler work?')
Inputs: action (required), repo, limit, owner, +5 more.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 17 tools
The set has several overlapping clusters: code_files/code_read vs pkg(files/read) vs searchcode(file_tree/get_file), wiki vs analyze, and search_all vs direct source-specific searches. Descriptions usually clarify when to use each alternative, but an agent still faces non-trivial misselection risk among repo analysis, file reading, and package intelligence tools.
Most names are lowercase and somewhat readable, but conventions are mixed: verb_noun names (search_all, code_search), noun-only names (wiki, docs, vulns, papers, pkg), and single verbs (analyze, enrich). The one-word searchcode also contrasts awkwardly with code_search, making the pattern less predictable.
Seventeen tools are slightly above the ideal compact range, but the server genuinely spans many sources and operations: packages, code, docs, papers, HN, Stack Overflow, vulnerabilities, repo analysis, and enrichment. The count is reasonable for this broad scope, though a few overlapping tools could be consolidated.
The surface covers discovery, source reading, package metadata, dependency/vulnerability checks, documentation, academic papers, community discussion, repo analysis, file listing/reading, enrichment, and connectivity. No obvious domain-critical gap remains for a broad code-search/research MCP server.
Maintenance
Related MCP Connectors
GitHub, npm, PyPI, Stack Overflow, arXiv and OpenAlex paper search as agent tools.
Code intelligence for coding agents: semantic, AST, graph, and full-text search. 279+ languages.
Search public open-source code, documentation, metadata, vulnerabilities, changelogs, and examples.
Code intelligence for LLMs. Analyze, search, and retrieve code from any public git repository.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables semantic code search across multiple repositories using natural language queries. Provides intelligent code discovery, symbol lookups, and cross-repo dependency analysis for AI coding agents.MIT
- AlicenseNot gradedqualityDmaintenanceEnables LLMs to perform high-performance code search and analysis across multiple languages using symbol indexing, regex text search, and structural AST pattern matching. It also provides tools for technology stack detection and dependency analysis with persistent caching for optimized performance.11MIT
- AlicenseBqualityDmaintenanceEnables AI agents to perform comprehensive search across 27 search engines including web, academic, code, community, package managers, video, images, podcasts, and maps, with multi-modal support, caching, and security features.14MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI agents to perform hybrid code search, get explanations, analyze relations and impacts, retrieve context packs, and generate documentation across ~45 languages via 17 MCP tools, all powered by a local vector database and LLM.2Apache 2.0