Socraticode
@giancarloerra
关于 Socraticode
Enterprise-grade (40m+ lines) codebase intelligence in a zero-setup, private and local MCP: managed indexing, hybrid semantic search, polyglot code dependency graphs, and DB/API/infra knowledge. Benchmark: 61% less tokens, 84% fewer calls, 37x faster than standard AI grep.
基本信息
配置
使用下面的配置,将此服务器添加到你的 MCP 客户端。
{
"mcpServers": {
"socraticode": {
"command": "npx",
"args": [
"-y",
"socraticode"
]
}
}
}工具
25Start 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.
Incrementally update an existing codebase index. Only re-indexes changed files. Runs synchronously. Usually not needed if file watcher is active.
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.
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.
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.
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.
Check index status: chunk count, indexing progress (%), last completed operation, file watcher state. Call after codebase_index to poll until 100% complete.
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.
Query the code dependency graph for a specific file. Returns what the file imports and what files depend on it.
Get statistics about the code dependency graph: total files, edges, most connected files, orphan files, circular dependencies.
Find circular dependencies in the codebase.
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 self-contained HTML page (vendored Cytoscape.js + Dagre, works offline) and opens it in the user's default browser. Shows the file graph and, when a symbol graph is available and fits, a Symbols toggle with the symbol-level call graph. Interactions: click node for sidebar with imports/dependents/symbols list; right-click node to highlight its blast radius (reverse-transitive closure); live search; layout switcher (Dagre / force / concentric / breadth-first / grid / circle); PNG export. Use this when the user asks for a visual/interactive view, wants to explore visually, or needs a shareable diagram.
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.
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.
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 symbol-mode. Use this BEFORE refactoring, renaming, or deleting code to know what depends on it.
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 the call tree.
360° view of a symbol: definition, kind, callers, callees, confidence levels. Use to understand a function or class before changing it.
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.
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 code.
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.
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.
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.
Check the health of all infrastructure: Docker, Qdrant container, Ollama, and embedding model. Use this to diagnose setup issues.
List all projects that have been indexed (have collections in Qdrant).
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.
概览
What is Socraticode?
SocratiCode gives AI assistants deep semantic understanding of your codebase through hybrid search, polyglot code dependency graphs, and searchable context artifacts — all with zero configuration and fully private by default. It is a Qdrant-based MCP server that automatically manages local Docker deployment for code intelligence.
How to use Socraticode?
Add it to any MCP host with zero configuration; SocratiCode manages everything automatically — indexing is batched, resumable, and the file watcher keeps the index updated on every file change. No API keys are required; Docker handles all local execution.
Key features of Socraticode
- Production-ready, battle-tested on enterprise repositories up to ~40M lines
- Batched automatic resumable indexing with checkpoint persistence
- Hybrid semantic + BM25 (RRF-fused) code search
- Polyglot dependency graphs with circular-dependency visualization
- Searchable infra/API/database artifacts
- Private and local by default; cloud-ready for embeddings (OpenAI, Google Gemini)
Use cases of Socraticode
- AI assistants gaining instant deep codebase intelligence without manual setup
- Exploring large monorepos with hybrid search and dependency graphs
- Automatically indexing and searching database schemas, API specs, and infrastructure configs
- Maintaining up-to-date context for AI tools via automatic file watching
- Running fully private code analysis with no data leaving the machine
FAQ from Socraticode
What makes Socraticode different from grep‑based exploration?
SocratiCode uses 61% less context, 84% fewer tool calls, and is 37x faster than grep‑based exploration, as benchmarked on a 2.45M‑line VS Code repository with Claude Opus.
Does Socraticode require any API keys or external services?
No. It is private and local by default — Docker handles everything, no API keys required, and no data leaves your machine. Cloud embeddings (OpenAI, Google Gemini) and Qdrant are optional extras.
What is the maximum repository size supported?
SocratiCode is production-ready and battle-tested on enterprise-level large repositories up to and over approximately 40 million lines of code.
Does the index stay up to date automatically?
Yes. A file watcher keeps the index automatically updated at every file change and across sessions. Checkpoints make indexing resumable after pauses, crashes, or restarts.
How are dependencies managed?
Docker is used for local deployment. The server itself is a single tool with no manual configuration required. Cloud storage and embedding providers are optional.
记忆与知识 分类下的更多 MCP 服务器

Dash Api Docs Mcp Server
KapeliMCP server for Dash, the macOS API documentation browser
RAG Documentation MCP Server
hannesrudolphAn MCP server implementation that provides tools for retrieving and processing documentation through vector search, enabling AI assistants to augment their responses with relevant documentation context.
Notion MCP Server
awkoyNotion MCP server for Claude, Cursor, ChatGPT & Claude Desktop. Connect AI agents to Notion via Model Context Protocol — pages, databases, blocks, comments, files.
Obsidian MCP Server
cyanheadsRead, write, search, and surgically edit Obsidian vault notes, tags, and frontmatter via MCP. STDIO or Streamable HTTP.
Notion MCP Server
suekouA Model Context Protocol server for connecting Notion to MCP-compatible clients
评论