← Back to directory
S

SocratiCode

Community
Local, private codebase intelligence: hybrid semantic search and dependency-impact analysis for enterprise-scale repos
Category
Dev Tools #26 of 438
Stars
★ 3.4k Very popular
Transport
stdio (local process)
Runtime
Node.js 18+ · Docker
Credentials
No credential needed
License
AGPL-3.0
Last commit
Tools
21
67FMRS · C

SocratiCode is a fairly comprehensive local codebase-intelligence MCP server offering hybrid semantic search, polyglot dependency graphs, and symbol-level impact analysis, running by default in local Docker containers with no API key required — well suited for deep exploration of large, multi-language repositories. Adopting it means accepting locally-run Docker containers, optional cloud API keys for alternate embedding providers, and AGPL-3.0 licensing terms; the documentation is explicit that its static-analysis call graph has blind spots around dynamic dispatch and framework magic, so impact-analysis results should be paired with manual review.

Strongest · Documentation 18/20 Weakest · Reliability 9/20

Reliability
9/20
Security and permissions
14/20
Maintenance
13/20
Documentation
18/20
Setup experience
13/20
Why each score
Reliability 9/20
The README shows a CI badge (github actions ci.yml) and a 'Testing' section anchor, but no actual workflow contents or test files are present in the supplied material, and there is no reproducible log of an MCP init/tool-list handshake. The manifest declares an npm package run over stdio with 21 tools described in detail, but claims like 'production-ready' and 'battle-tested on ~40M LOC' are unverified marketing statements with no execution evidence behind them. Per the static calibration rule, without committed tests proving key paths, the score cannot exceed 12; a 9 reflects a plausible-looking happy path that remains entirely unverified.
Security and permissions 14/20
The manifest correctly marks OPENAI_API_KEY, GOOGLE_API_KEY, and QDRANT_API_KEY as isSecret, and the default mode (local Ollama + managed Qdrant) requires no keys at all — cloud embedding providers only activate via explicit env vars, showing reasonable least-privilege design. No red-line risk (credential theft, covert exfiltration) is evident. However, the server auto-pulls Docker images and starts containers plus downloads models on first use, a side-effecting automated action with no described user confirmation step in the README; the 'fully local/private, no data leaves your machine' claims are documentation-only assertions that cannot be verified against source code in this static review. That missing verification is a deduction, so it falls short of full marks.
Maintenance 13/20
The repo has 3203 stars, 0 open issues, is not archived, uses the AGPL-3.0 license, ships an npm package at version 1.0.1 with a CI badge, and maintains a Discord community channel — signals of some activity and governance. However, 0 open issues on a 3000+-star project is atypical (could indicate closed/restricted issues or a young project), and no commit history, release cadence, or version-evolution evidence is provided, limiting confidence in sustained maintenance, so a higher score is not warranted.
Documentation 18/20
The README is unusually thorough: concrete install examples for over a dozen MCP hosts/editors, all 21 tools individually documented, per-provider required vs. optional environment variables and defaults for five embedding backends (Ollama/OpenAI/Google/LM Studio/LiteLLM), and an 'Accepted limits' section that candidly discloses blind spots in the static call-graph analysis (dynamic dispatch, reflection, DI/decorator-driven routing) plus a detailed writeup of edge cases in the cross-project search scoring formula. This proactive disclosure of limitations meets a high documentation bar, earning a near-top score; it stops short of full marks only for lacking independently verifiable third-party evaluation or real troubleshooting transcripts.
Setup experience 13/20
Concrete configuration examples are given for npx one-liner install, the Claude Code plugin marketplace, VS Code/Open VSX extensions, Cursor deep links, and Codex/Gemini CLI, with clear step-by-step instructions. However, the prerequisites are heavy: Docker must be installed and running, first launch auto-pulls images and downloads an embedding model (README states ~5 minutes), and the server depends on complex background behavior (indexing, file watching) by default. Per the static calibration rule, setup cannot exceed 15 without actual execution verification, and the Docker dependency adds fragility, so 13 is assigned.

Static review · not runListed 2026-08-06

Read the FMRS scoring method →

Fit and risk

What it can accessReads local filesUses the network

Best for

  • Large, long-lived, multi-language codebases (up to tens of millions of lines) where an AI assistant needs a durable code index
  • Privacy-conscious teams that want embeddings and index data to stay entirely on their own machine or infrastructure
  • Users of Claude Code, Cursor, VS Code Copilot, or Gemini CLI who want their AI to prefer semantic search and dependency graphs over raw file reads
  • Teams running multiple AI agents or collaborators against a shared, coordinated codebase index

Not for

  • Environments where Docker cannot be installed or run (e.g. locked-down machines or restricted CI)
  • Small projects (a few hundred lines) where the overhead of standing up Docker/Qdrant/Ollama outweighs the benefit
  • Teams needing a fully managed, production-ready shared cloud index today — SocratiCode Cloud is still in private beta, not generally available
  • Environments with strict approval requirements around new local containers, background file watchers, or third-party npm packages

Required permissions

  • Read access to the local project's file system for AST-based chunking and indexing
  • Ability to start and manage local Docker containers for Qdrant (vector DB) and Ollama (embeddings)
  • Local file system write access to persist indexes, graph data, and optional interactive HTML graph output
  • File system watch access to detect changes and keep the index incrementally updated
  • Outbound network access and API keys (OPENAI_API_KEY, GOOGLE_API_KEY, QDRANT_API_KEY) when cloud embeddings or an external Qdrant instance are configured

Risks and side effects

  • By default it automatically pulls and runs Docker images (Qdrant, Ollama) — requires trusting those images and their runtime behavior
  • Switching to OpenAI or Google cloud embeddings sends code snippets to a third-party API, breaking the 'fully local/private' guarantee — evaluate against code confidentiality requirements
  • API keys (OPENAI_API_KEY, GOOGLE_API_KEY, QDRANT_API_KEY) are configured as environment variables — protect config files and shell profiles from leaking them
  • Misconfigured external/remote Qdrant instances could expose indexed content, including code snippets or sensitive strings
  • The project is licensed AGPL-3.0, which has copyleft implications for integration with proprietary or closed-source software
  • Any connected MCP client gets full read/write/delete access to indexing, graph, and context-artifact operations — no fine-grained per-tool permission model is described
  • The call graph is static-analysis based and cannot see dynamic dispatch, reflection, or framework magic (e.g. dependency injection, decorator-based routing) — 'zero callers' results should be manually double-checked, not trusted blindly

Setup

Before you start

Runtime:Node.js 18+ · Docker

OPENAI_API_KEY optionalsecret Needed only when EMBEDDING_PROVIDER=openai; get one at platform.openai.com.
GOOGLE_API_KEY optionalsecret Needed only when EMBEDDING_PROVIDER=google; get one at aistudio.google.com/apikey.
QDRANT_API_KEY optionalsecret API key for the remote Qdrant instance, needed only when QDRANT_MODE=external.
LMSTUDIO_API_KEY optionalsecret API key if auth is enabled in LM Studio.
LITELLM_API_KEY optionalsecret LiteLLM proxy master/virtual key, required in LiteLLM mode.
Other optional settings (19)
EMBEDDING_PROVIDER optional Embedding provider: ollama (default), openai, google, lmstudio, or litellm; optional.
OLLAMA_URL optional URL of an external Ollama server (default auto-detected, e.g. http://localhost:11434).
OLLAMA_MODE optional Set to external to use a native or remote Ollama; default auto.
EMBEDDING_MODEL optional Embedding model name; defaults per provider, required for LM Studio/LiteLLM modes.
EMBEDDING_DIMENSIONS optional Embedding vector dimensions; required for LM Studio/LiteLLM modes.
QDRANT_MODE optional managed (default Docker-managed) or external (user-provided instance).
QDRANT_URL optional Full URL of remote/cloud Qdrant, needed only when QDRANT_MODE=external.
LMSTUDIO_URL optional LM Studio local server URL, default http://localhost:1234/v1.
LITELLM_URL optional LiteLLM proxy URL, default http://localhost:4000/v1.
LITELLM_SEND_DIMENSIONS optional Whether to forward the dimensions parameter to the proxy; only safe for Matryoshka-aware backends.
SOCRATICODE_LOG_LEVEL optional Log level for structured logging.
SOCRATICODE_PROJECT_ID optional Project ID to share one index across directories/git worktrees.
SOCRATICODE_LINKED_PROJECTS optional Comma-separated linked project paths for cross-project search.
SOCRATICODE_BRANCH_AWARE optional Set true to maintain separate indexes per git branch.
RESPECT_GITIGNORE optional Set false to disable .gitignore processing.
INCLUDE_DOT_FILES optional Set true to include dot-directories (e.g. .agent).
EXTRA_EXTENSIONS optional Include non-standard file extensions (e.g. .tpl), indexed as plaintext.
EXTENSION_LANGUAGE_MAP optional Map a custom extension to a real language (e.g. .inc:php) for AST processing.
SEARCH_MIN_SCORE optional Minimum search score threshold (default 0.10); may need lowering for cross-project search.

1) Make sure Docker is installed and running, and Node.js 18+ is available. 2) Simplest route: add the npx launch command to your MCP client config — {"command":"npx","args":["-y","socraticode"]} under mcpServers (Claude Desktop, Windsurf, Cline, Roo Code) or servers (VS Code project-local .vscode/mcp.json). 3) Claude Code users are recommended to install the official plugin, which bundles workflow skills: run claude plugin marketplace add giancarloerra/socraticode then claude plugin install socraticode@socraticode (or the equivalent /plugin marketplace add and /plugin install slash commands inside Claude Code). 4) VS Code/Cursor users can also install the dedicated extension/plugin from the VS Code Marketplace, Open VSX, or Cursor Marketplace. 5) On first use the server automatically pulls Docker images and starts Qdrant and Ollama containers and downloads the embedding model — a one-time step taking roughly 5 minutes; subsequent starts take seconds. 6) For cloud embeddings (OpenAI/Google) or an external Qdrant instance, set env vars such as EMBEDDING_PROVIDER, OPENAI_API_KEY, GOOGLE_API_KEY, QDRANT_MODE, QDRANT_URL, and QDRANT_API_KEY in the client config. 7) On a project for the first time, ask the AI to 'index this codebase' to trigger codebase_index, then check progress with codebase_status.

.mcp.json
{"mcpServers":{"socraticode":{"command":"npx","args":["-y","socraticode"]}}}

Shown for Claude Code. Other clients may use a different file or key (VS Code uses "servers") — the configurator below converts it.

.vscode/mcp.json
{
  "servers": {
    "socraticode": {
      "command": "npx",
      "args": [
        "-y",
        "socraticode"
      ]
    }
  }
}

Goes in your project's .vscode/mcp.json (VS Code uses a "servers" key).

Terminal
claude mcp add socraticode -- npx -y socraticode

Run it in a terminal; replace any <…> placeholders with your own values first.

Check that it works

After starting the host, the client tool list should show codebase_index, codebase_search, and the other SocratiCode tools; say "Index this codebase" on first use, then poll codebase_status until it reports the index is complete — that proves the connection works.

Troubleshooting

  1. Confirm Docker is running — required for the default managed mode that runs Qdrant and Ollama containers
  2. If codebase_search returns no results, run codebase_status to check whether the project is indexed, and run codebase_index if not
  3. On macOS/Windows, Docker containers cannot access the GPU, slowing embedding for medium-to-large repos — install native Ollama or switch to OpenAI/Google cloud embeddings for speed
  4. npx caches the package after first run; to pick up updates, run `rm -rf ~/.npm/_npx` and restart the MCP host, or use `socraticode@latest` in the config
  5. If SocratiCode was previously added standalone via `claude mcp add`, remove it after installing the plugin (`claude mcp remove socraticode`) to avoid duplicate registrations
  6. For large codebases, have the AI call codebase_status roughly every 60 seconds during indexing to keep the host connection alive and avoid interrupting the background job
  7. When using an external Ollama or Qdrant instance, verify OLLAMA_MODE/OLLAMA_URL and QDRANT_MODE/QDRANT_URL/QDRANT_API_KEY point to a reachable instance

Things to try

Once connected, you can ask your AI assistant things like:

  • Index this codebase
  • Search for how authentication is handled in this project
  • What files depend on src/middleware/auth.ts, and what breaks if I rename validateUser?
  • Check for circular dependencies and show me the dependency graph

Tools 21

codebase_index writes
Starts a full background index of a codebase (chunking, embedding, and writing to Qdrant); poll codebase_status for progress.
codebase_stop writes
Gracefully stops an in-progress indexing operation — the current batch finishes and checkpoints so codebase_index can resume later.
codebase_update writes
Incremental update that only re-processes files changed since the last index.
codebase_remove destructive
Removes a project's index, stopping its watcher and canceling any in-flight indexing/update operation first.
codebase_watch writes
Starts or stops file watching: on start it catches up on missed changes, then watches for future ones.
codebase_search read-only
Hybrid semantic + keyword search (dense vector + BM25, RRF-fused) with optional file path/language filters and cross-project search via includeLinked.
codebase_status read-only
Reports index status and chunk/file counts.
codebase_graph_build writes
Builds the polyglot dependency graph in the background; poll codebase_graph_status for progress.
Show 13 more tools
codebase_graph_query read-only
Returns the imports and dependents of a specific file.
codebase_graph_stats read-only
Returns graph statistics such as most-connected files, orphans, and per-language breakdown.
codebase_graph_circular read-only
Detects circular dependencies in the codebase.
codebase_graph_visualize read-only
Generates a Mermaid diagram of the dependency graph, or an offline-capable interactive HTML graph explorer (file/symbol views, blast-radius overlay, live search, PNG export).
codebase_graph_status read-only
Reports dependency-graph build progress or persisted graph metadata.
codebase_graph_remove destructive
Removes a project's persisted dependency graph, waiting for any in-flight build to finish first.
codebase_impact read-only
Symbol-level blast-radius analysis — BFS through reverse call edges to find what files break if a given file/function changes.
codebase_flow read-only
Traces forward execution flow from an entry point; called with no arguments it auto-discovers candidate entry points (orphans, main(), framework routes, tests).
codebase_symbol read-only
Gives a full view of one symbol: its definition, callers, and callees.
codebase_symbols read-only
Lists symbols in a file or searches for symbols by name across the project.
codebase_context read-only
Lists non-code knowledge artifacts available for the project (DB schemas, API specs, infra configs, architecture docs).
codebase_context_search read-only
Searches indexed context artifacts for specific schemas, endpoints, or configuration.
codebase_context_index writes
Re-indexes/refreshes stale context artifacts.

Use cases

Hybrid semantic + keyword search across very large (multi-million-line), multi-language enterprise codebases
Assessing blast radius with codebase_impact before refactoring, renaming, or deleting code
Tracing execution flow from an entry point with codebase_flow to understand unfamiliar code
Visualizing and inspecting module dependency graphs, including circular-dependency detection
Searching across multiple linked repositories or maintaining separate indexes per git branch
Retrieving non-code project knowledge such as database schemas, API specs, and infra configs

Supported clients

Claude Code
VS Code
Cursor
Gemini CLI
Claude DesktopPartial support
WindsurfPartial support
ClinePartial support
Roo CodePartial support
ZedPartial support
OpenAI Codex CLIPartial support
OpenCodePartial support

Listed from the project's documentation, not tested by this site.

Overview

SocratiCode is an open-source MCP server that gives AI assistants deep semantic understanding of a codebase. It runs hybrid semantic + BM25 (RRF-fused) search on top of Qdrant (vector database) and Ollama (local embeddings by default, switchable to OpenAI or Google), uses ast-grep for AST-aware chunking across 18+ languages, and builds a polyglot dependency graph with symbol-level impact analysis (blast radius), call-flow tracing, circular-dependency detection, and an interactive HTML graph viewer. It also supports cross-project and branch-aware search, and indexing of non-code knowledge such as database schemas, API specs, and infra configs. The README reports, from a benchmark on VS Code's 2.45M-line codebase, 61% less context, 84% fewer tool calls, and 37x faster responses versus grep-based exploration. By default everything runs locally via Docker with no API keys required and no code leaving the machine; cloud embedding providers and external Qdrant instances are optional. The project is licensed under AGPL-3.0 and also offers a separate paid cloud offering (SocratiCode Cloud) currently in private beta.

Similar servers

Context7 80 · B

Upstash's official server providing up-to-date third-party library docs for AI coding assistants

★ 64.1k · Tools 2 Compare with this →

Source revision 4aa6fc23ae69 Data synced 2026-11-04 Read the FMRS scoring method