giancarloerra avatar

Socraticode

giancarloerra/socraticode

Brings local codebase intelligence to Claude through hybrid semantic and BM25 search, AST-aware dependency graphs, and symbol-level impact analysis across 18 languages. Runs entirely in Docker with Qdrant, indexing projects up to 40M+ lines with automatic file watching and resumable checkpoints. Exposes tools for querying code structure, tracing call flows, and analyzing blast radius without leaving your machine. Particularly strong on multi-repo setups where you need cross-project search or want to visualize circular dependencies. The indexer automatically picks up database schemas, API specs, and infra configs as searchable artifacts. If you're tired of grep or want smaller models to handle architectural questions, this gives them the precomputed context to do it.

GitHub stars
3.4K
tools
25
auth
Secret needed
transport
STDIO
env vars
17
last updated
Nov 5, 2026

Install

From registry metadata
$ npx 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}'

Run in your terminal. add-mcp asks which agents to add it to, then asks for each value it needs. Add -g to install it for every project.

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.

Sponsors

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
Category
Search & Web Crawling
Package
socraticode
Transport
STDIO
Auth
Required
Registry
MCP registry, active
Tools verified
Jun 10, 2026

Related Search & Web Crawling MCP servers

View all
1blazickjp avatarArxiv Mcp Serverblazickjp/arxiv-mcp-serverSearch arXiv papers, download full text, semantic search, citation graphs, and alerts via MCP.3.3Kstars
2cocoindex-io avatarCocoIndex Codecocoindex-io/cocoindex-codeSemantic code search over a local repository, with AST-based chunks and incremental re-indexing.3Kstars
3codeaashu avatarClaude Code Explorer MCPcodeaashu/claude-codeExplore the Claude Code CLI source — browse tools, commands, search code, and more.2.9Kstars
4letsfg avatarLetsFG — Flights & Hotelsletsfg/letsfgSearch and book flights and hotels: hundreds of airlines, plus bookable hotel rates.2.2Kstars
5perplexityai avatarPerplexityperplexityai/modelcontextprotocolProvides real-time web search, reasoning, and research through Perplexity APIs for MCP clients.2.2Kstars
6zhuyansen avatarNew-Term Radarzhuyansen/new-term-radarNew AI model, product and repo names as they surface, and the search terms behind them, sized.2.1Kstars