Skip to content
giancarloerra avatar

Socraticode

giancarloerra/socraticode

Semantic and hybrid search, dependency graphs, and impact analysis over a local codebase index via Docker-backed Qdrant.

CCM score
83 of 100
GitHub stars
3.4K
tools
25
auth
Secret needed
transport
STDIO
env vars
17
last updated
Nov 5, 2026
View on GitHub

Own this MCP server? Claim it

What it does

  • Searches code with codebase_search and codebase_context_search, and inspects structure with codebase_symbol, codebase_impact, and codebase_graph_query
  • Builds and manages indexes with codebase_index, codebase_watch, and codebase_status, plus dependency graphs via codebase_graph_build and codebase_graph_visualize
  • Requires Docker running locally for the default Qdrant and Ollama stack, and runs over stdio with no API keys needed
  • Designed for large codebase navigation, impact checks before refactors, and onboarding onto unfamiliar repositories

Install

$ npx -y add-mcp socraticode --name socraticode --env 'OPENAI_API_KEY=${OPENAI_API_KEY}' --env 'GOOGLE_API_KEY=${GOOGLE_API_KEY}' --env 'OLLAMA_API_KEY=${OLLAMA_API_KEY}' --env 'LMSTUDIO_API_KEY=${LMSTUDIO_API_KEY}' --env 'LITELLM_API_KEY=${LITELLM_API_KEY}' --env 'QDRANT_API_KEY=${QDRANT_API_KEY}'

Adds the server to every agent config it finds in this project. add-mcp asks for each value it needs.

Review the command, arguments and environment values before installing. MCP servers run with your local permissions.

Other ways

Claude Code

$ claude mcp add socraticode --env EMBEDDING_PROVIDER=YOUR_EMBEDDING_PROVIDER --env OPENAI_API_KEY=YOUR_OPENAI_API_KEY --env GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY --env OLLAMA_URL=YOUR_OLLAMA_URL --env EMBEDDING_MODEL=YOUR_EMBEDDING_MODEL --env EMBEDDING_DIMENSIONS=YOUR_EMBEDDING_DIMENSIONS --env OLLAMA_MODE=YOUR_OLLAMA_MODE --env OLLAMA_API_KEY=YOUR_OLLAMA_API_KEY --env LMSTUDIO_URL=YOUR_LMSTUDIO_URL --env LMSTUDIO_API_KEY=YOUR_LMSTUDIO_API_KEY --env LMSTUDIO_ALLOW_MISSING_MODEL_LISTING=YOUR_LMSTUDIO_ALLOW_MISSING_MODEL_LISTING --env LITELLM_URL=YOUR_LITELLM_URL --env LITELLM_API_KEY=YOUR_LITELLM_API_KEY --env LITELLM_SEND_DIMENSIONS=YOUR_LITELLM_SEND_DIMENSIONS --env QDRANT_MODE=YOUR_QDRANT_MODE --env QDRANT_URL=YOUR_QDRANT_URL --env QDRANT_API_KEY=YOUR_QDRANT_API_KEY -- npx -y socraticode

Run in your terminal. Replace YOUR_* placeholders with real values; add --scope user to install for every project.

Tools

Verified live · 25 tools

Verified live against the running server on Jun 10, 2026.

codebase_indexStart indexing a codebase in the background. Returns immediately. Call codebase_status to poll progress until 100%. Do NOT search until indexing is complete. If already indexing, returns current progress.2 params

Start indexing a codebase in the background. Returns immediately. Call codebase_status to poll progress until 100%. Do NOT search until indexing is complete. If already indexing, returns current progress.

Parameters* required
extraExtensionsstring
Comma-separated list of additional file extensions to index beyond the built-in set (e.g. '.tpl,.blade,.hbs'). Useful for projects with non-standard file extensions. Can also be set globally via EX...
projectPathstring
Absolute path to the project directory. If omitted, uses the current working directory.
codebase_updateIncrementally update an existing codebase index. Only re-indexes changed files. Runs synchronously. Usually not needed if file watcher is active.2 params

Incrementally update an existing codebase index. Only re-indexes changed files. Runs synchronously. Usually not needed if file watcher is active.

Parameters* required
extraExtensionsstring
Comma-separated list of additional file extensions to index (e.g. '.tpl,.blade').
projectPathstring
Absolute path to the project directory.
codebase_removeRemove a project's codebase index entirely from the vector database. Safely stops the file watcher, cancels any in-progress indexing/update (with drain), and waits for any in-flight graph build before deleting.1 params

Remove a project's codebase index entirely from the vector database. Safely stops the file watcher, cancels any in-progress indexing/update (with drain), and waits for any in-flight graph build before deleting.

Parameters* required
projectPath*string
Absolute path to the project directory.
codebase_stopGracefully stop an in-progress indexing operation. The current batch will finish and checkpoint, preserving all progress. Re-run codebase_index to resume from where it left off.1 params

Gracefully stop an in-progress indexing operation. The current batch will finish and checkpoint, preserving all progress. Re-run codebase_index to resume from where it left off.

Parameters* required
projectPathstring
Absolute path to the project directory. If omitted, uses the current working directory.
codebase_watchStart/stop watching a project directory for file changes and automatically update the index. When starting, first runs an incremental update to catch any changes made since the last session, then keeps the index up to date via debounced file system watching.2 params

Start/stop watching a project directory for file changes and automatically update the index. When starting, first runs an incremental update to catch any changes made since the last session, then keeps the index up to date via debounced file system watching.

Parameters* required
action*string
start/stop watching, or get status of watchers.one of start · stop · status
projectPathstring
Absolute path to the project directory.
codebase_searchSemantic search across an indexed codebase. Only use after codebase_index is complete (check codebase_status first). Returns relevant code chunks matching a natural language query.7 params

Semantic search across an indexed codebase. Only use after codebase_index is complete (check codebase_status first). Returns relevant code chunks matching a natural language query.

Parameters* required
fileFilterstring
Filter results to a specific file path (relative).
includeLinkedboolean
When true, also search across linked projects defined in .socraticode.json or SOCRATICODE_LINKED_PROJECTS env var. Results include a project label showing which project each result came from. Defau...
languageFilterstring
Filter results to a specific language (e.g. 'typescript', 'python').
limitnumber
Maximum number of results to return. Default: 10 (override globally via SEARCH_DEFAULT_LIMIT env var).
minScorenumber
Minimum RRF score threshold (0-1). Results below this are filtered out. Default: 0.10 (override globally via SEARCH_MIN_SCORE env var). Set to 0 to disable filtering.
projectPathstring
Absolute path to the project directory.
query*string
Natural language search query (e.g. 'authentication middleware', 'database connection setup').
codebase_statusCheck index status: chunk count, indexing progress (%), last completed operation, file watcher state. Call after codebase_index to poll until 100% complete.1 params

Check index status: chunk count, indexing progress (%), last completed operation, file watcher state. Call after codebase_index to poll until 100% complete.

Parameters* required
projectPathstring
Absolute path to the project directory.
codebase_graph_buildBuild a dependency graph of the codebase using static analysis (ast-grep). Maps import/require/export relationships between files. Runs in the background — call codebase_graph_status to poll progress until complete.2 params

Build a dependency graph of the codebase using static analysis (ast-grep). Maps import/require/export relationships between files. Runs in the background — call codebase_graph_status to poll progress until complete.

Parameters* required
extraExtensionsstring
Comma-separated list of additional file extensions to include in the graph (e.g. '.tpl,.blade'). Files with non-standard extensions are included as leaf nodes (dependency targets). Can also be set...
projectPathstring
Absolute path to the project directory.
codebase_graph_queryQuery the code dependency graph for a specific file. Returns what the file imports and what files depend on it.2 params

Query the code dependency graph for a specific file. Returns what the file imports and what files depend on it.

Parameters* required
filePath*string
Relative path of the file to query (e.g. 'src/index.ts').
projectPathstring
Absolute path to the project directory.
codebase_graph_statsGet statistics about the code dependency graph: total files, edges, most connected files, orphan files, circular dependencies.1 params

Get statistics about the code dependency graph: total files, edges, most connected files, orphan files, circular dependencies.

Parameters* required
projectPathstring
Absolute path to the project directory.
codebase_graph_circularFind circular dependencies in the codebase.1 params

Find circular dependencies in the codebase.

Parameters* required
projectPathstring
Absolute path to the project directory.
codebase_graph_visualizeVisualise the code dependency graph. Two modes: • mode="mermaid" (default) — returns a Mermaid diagram (text) colour-coded by language, circular deps highlighted. Best for inline rendering inside chat, GitHub, or editors that render Mermaid. • mode="interactive" — writes a sel...3 params

Visualise the code dependency graph. Two modes: • mode="mermaid" (default) — returns a Mermaid diagram (text) colour-coded by language, circular deps highlighted. Best for inline rendering inside chat, GitHub, or editors that render Mermaid. • mode="interactive" — writes a sel...

Parameters* required
modestring
"mermaid" (default — text diagram) or "interactive" (browser-based explorer).one of mermaid · interactive
openboolean
In interactive mode, whether to auto-open the browser. Default true. Set false to just get the file path (useful in headless environments).
projectPathstring
Absolute path to the project directory.
codebase_graph_removeRemove a project's persisted code graph. Waits for any in-flight graph build to finish first. The graph can be rebuilt with codebase_graph_build or will be rebuilt automatically on the next codebase_index.1 params

Remove a project's persisted code graph. Waits for any in-flight graph build to finish first. The graph can be rebuilt with codebase_graph_build or will be rebuilt automatically on the next codebase_index.

Parameters* required
projectPath*string
Absolute path to the project directory.
codebase_graph_statusCheck the status of the code dependency graph: build progress (if building), node/edge count, when it was last built, whether it's cached in memory. Use this to poll progress after calling codebase_graph_build.1 params

Check the status of the code dependency graph: build progress (if building), node/edge count, when it was last built, whether it's cached in memory. Use this to poll progress after calling codebase_graph_build.

Parameters* required
projectPathstring
Absolute path to the project directory.
codebase_impactImpact Analysis — return the BLAST RADIUS for a file or symbol. Lists every file (and, where helpful, function) that could break if you change the target. Polymorphic on target: a path-like string ('src/foo.ts') triggers file-mode; a name-like string ('validateUser') triggers...3 params

Impact Analysis — return the BLAST RADIUS for a file or symbol. Lists every file (and, where helpful, function) that could break if you change the target. Polymorphic on target: a path-like string ('src/foo.ts') triggers file-mode; a name-like string ('validateUser') triggers...

Parameters* required
depthnumber
How many hops back to walk (default 3, max 10).
projectPathstring
Absolute path to the project directory.
target*string
Target file path (relative) OR symbol name.
codebase_flowTrace the EXECUTION FLOW forward from an entry point — what does this code call into? With NO args, returns a ranked list of auto-detected entry points (orphans with outgoing calls, conventional names like main(), framework routes, tests). With an entrypoint argument, returns...4 params

Trace the EXECUTION FLOW forward from an entry point — what does this code call into? With NO args, returns a ranked list of auto-detected entry points (orphans with outgoing calls, conventional names like main(), framework routes, tests). With an entrypoint argument, returns...

Parameters* required
depthnumber
Maximum DFS depth (default 5, max 10).
entrypointstring
Symbol name to trace from. Omit to list auto-detected entry points.
filestring
Optional file hint to disambiguate the symbol.
projectPathstring
Absolute path to the project directory.
codebase_symbol360° view of a symbol: definition, kind, callers, callees, confidence levels. Use to understand a function or class before changing it.3 params

360° view of a symbol: definition, kind, callers, callees, confidence levels. Use to understand a function or class before changing it.

Parameters* required
filestring
Optional file hint to disambiguate when the name is not unique.
name*string
Symbol name (e.g. 'validateUser').
projectPathstring
Absolute path to the project directory.
codebase_symbolsList symbols in a file, or search by name across the project. Use to discover what exists before drilling into a single symbol with codebase_symbol.4 params

List symbols in a file, or search by name across the project. Use to discover what exists before drilling into a single symbol with codebase_symbol.

Parameters* required
filestring
Relative file path — list all symbols in this file.
limitnumber
Maximum results (default 200).
projectPathstring
Absolute path to the project directory.
querystring
Substring to match against symbol names project-wide.
codebase_contextList all context artifacts defined in .socraticodecontextartifacts.json — database schemas, API specs, infra configs, architecture docs, etc. Shows each artifact's name, description, path, and index status. Use this to discover what project knowledge is available beyond source...1 params

List all context artifacts defined in .socraticodecontextartifacts.json — database schemas, API specs, infra configs, architecture docs, etc. Shows each artifact's name, description, path, and index status. Use this to discover what project knowledge is available beyond source...

Parameters* required
projectPathstring
Absolute path to the project directory. If omitted, uses the current working directory.
codebase_context_searchSemantic search across context artifacts (database schemas, API specs, infra configs, etc.) defined in .socraticodecontextartifacts.json. Auto-indexes on first use and auto-detects stale artifacts. Use this to find relevant infrastructure or domain knowledge.5 params

Semantic search across context artifacts (database schemas, API specs, infra configs, etc.) defined in .socraticodecontextartifacts.json. Auto-indexes on first use and auto-detects stale artifacts. Use this to find relevant infrastructure or domain knowledge.

Parameters* required
artifactNamestring
Filter search to a specific artifact by name (e.g. 'database-schema'). Omit to search across all artifacts.
limitnumber
Maximum number of results to return. Default: 10.
minScorenumber
Minimum RRF score threshold (0-1). Results below this are filtered out. Default: 0.10 (override globally via SEARCH_MIN_SCORE env var). Set to 0 to disable filtering.
projectPathstring
Absolute path to the project directory.
query*string
Natural language search query (e.g. 'tables related to billing', 'authentication endpoints', 'deployment resource limits').
codebase_context_indexIndex or re-index all context artifacts defined in .socraticodecontextartifacts.json. Chunks and embeds artifact content into the vector database for semantic search. Usually not needed — codebase_context_search auto-indexes on first use.1 params

Index or re-index all context artifacts defined in .socraticodecontextartifacts.json. Chunks and embeds artifact content into the vector database for semantic search. Usually not needed — codebase_context_search auto-indexes on first use.

Parameters* required
projectPathstring
Absolute path to the project directory.
codebase_context_removeRemove all indexed context artifacts for a project from the vector database. Blocked while indexing is in progress — use codebase_stop or wait for the operation to finish first.1 params

Remove all indexed context artifacts for a project from the vector database. Blocked while indexing is in progress — use codebase_stop or wait for the operation to finish first.

Parameters* required
projectPath*string
Absolute path to the project directory.
codebase_healthCheck the health of all infrastructure: Docker, Qdrant container, Ollama, and embedding model. Use this to diagnose setup issues.

Check the health of all infrastructure: Docker, Qdrant container, Ollama, and embedding model. Use this to diagnose setup issues.

No parameters. Call it with no arguments.

codebase_list_projectsList all projects that have been indexed (have collections in Qdrant).

List all projects that have been indexed (have collections in Qdrant).

No parameters. Call it with no arguments.

codebase_aboutDisplay information about SocratiCode — what it is, its tools and how to use it. Use this to get a quick overview of the MCP tools and their purpose.

Display information about SocratiCode — what it is, its tools and how to use it. Use this to get a quick overview of the MCP tools and their purpose.

No parameters. Call it with no arguments.

Configuration

EMBEDDING_PROVIDER

Embedding provider to use: ollama (default), openai, google, lmstudio, or litellm

OPENAI_API_KEYsecret

API key for OpenAI embeddings (required only when EMBEDDING_PROVIDER=openai)

GOOGLE_API_KEYsecret

API key for Google embeddings (required only when EMBEDDING_PROVIDER=google)

OLLAMA_URL

URL of the Ollama server (default: auto-detected; Docker-managed or http://localhost:11434)

EMBEDDING_MODEL

Embedding model name (defaults per provider; required for lmstudio and litellm)

EMBEDDING_DIMENSIONS

Embedding vector dimensions (defaults per provider; required for lmstudio and litellm)

OLLAMA_MODE

Ollama mode: auto (default), docker, or external

OLLAMA_API_KEYsecret

Optional API key for authenticated Ollama proxies. Remote endpoints require HTTPS; loopback HTTP is supported.

LMSTUDIO_URL

LM Studio OpenAI-compatible base URL (default: http://localhost:1234/v1)

LMSTUDIO_API_KEYsecret

Optional API key when LM Studio authentication is enabled

LMSTUDIO_ALLOW_MISSING_MODEL_LISTING

Allow compatible embedding servers without a models endpoint to be probed directly

LITELLM_URL

LiteLLM OpenAI-compatible base URL (default: http://localhost:4000/v1)

LITELLM_API_KEYsecret

LiteLLM master or virtual API key (required when EMBEDDING_PROVIDER=litellm)

LITELLM_SEND_DIMENSIONS

Forward the dimensions parameter through LiteLLM when explicitly enabled

QDRANT_MODE

Qdrant mode: managed (default, Docker-managed) or external (user-provided instance)

QDRANT_URL

Full URL for remote/cloud Qdrant (e.g. https://xyz.cloud.qdrant.io:6333). Only needed when QDRANT_MODE=external

QDRANT_API_KEYsecret

API key for remote Qdrant instance. Only needed when QDRANT_MODE=external

Readme

SocratiCode logo

SocratiCode


View the full README on GitHub

Details

Repository
github.com/giancarloerra/socraticode
Categories
Developer Tools, Memory & Context
Package
socraticode
Transport
STDIO
Auth
Required
Registry
MCP registry, active
Tools verified
Jun 10, 2026

Questions

Which Developer Tools MCP server handles codebase semantic search and dependency graphs?

Socraticode ranks in the top 50 on the Developer Tools category page on Claude Marketplaces. It indexes a local codebase for semantic search, builds code dependency graphs, and runs symbol-level impact analysis. Its neighbors in the category include Front-End Checklist, Context7, Chrome DevTools MCP, Codebase Memory and Mcp Server Filesystem.

What tools does the Socraticode MCP server give an agent?

Socraticode lists 25 tools, including codebase_index for indexing, codebase_search for semantic search, and codebase_graph_build for building a dependency graph. Other tools cover impact analysis with codebase_impact, symbol lookup with codebase_symbol, and infrastructure checks with codebase_health. Context artifact tools such as codebase_context_search are also included.

How do I install the Socraticode MCP server in Claude Code?

Run this command in a terminal: claude mcp add socraticode --env EMBEDDING_PROVIDER=YOUR_EMBEDDING_PROVIDER --env OPENAI_API_KEY=YOUR_OPENAI_API_KEY --env GOOGLE_API_KEY=YOUR_GOOGLE_API_KEY --env OLLAMA_URL=YOUR_OLLAMA_URL --env EMBEDDING_MODEL=YOUR_EMBEDDING_MODEL --env EMBEDDING_DIMENSIONS=YOUR_EMBEDDING_DIMENSIONS --env OLLAMA_MODE=YOUR_OLLAMA_MODE --env OLLAMA_API_KEY=YOUR_OLLAMA_API_KEY --env LMSTUDIO_URL=YOUR_LMSTUDIO_URL --env LMSTUDIO_API_KEY=YOUR_LMSTUDIO_API_KEY --env LMSTUDIO_ALLOW_MISSING_MODEL_LISTING=YOUR_LMSTUDIO_ALLOW_MISSING_MODEL_LISTING --env LITELLM_URL=YOUR_LITELLM_URL --env LITELLM_API_KEY=YOUR_LITELLM_API_KEY --env LITELLM_SEND_DIMENSIONS=YOUR_LITELLM_SEND_DIMENSIONS --env QDRANT_MODE=YOUR_QDRANT_MODE --env QDRANT_URL=YOUR_QDRANT_URL --env QDRANT_API_KEY=YOUR_QDRANT_API_KEY -- npx -y socraticode. Once it is added, the agent can index a project and search it semantically.

Does the Socraticode MCP server need API keys to run?

The listed environment variables are all marked optional in the server metadata. Embedding provider keys such as OPENAI_API_KEY and GOOGLE_API_KEY are needed only when EMBEDDING_PROVIDER is set to openai or google. The README says the default setup runs locally through Docker without API keys.

Which codebases is the Socraticode MCP server built for?

Socraticode is described as an MCP server for enterprise local codebase indexing, semantic search and code dependency graphs. Its README says it has been tested on large repositories of up to about 40 million lines of code. It also supports multi-branch, multi-repo work and several AI agents sharing one index.

Similar to Socraticode

More Developer Tools