# Socraticode (MCP server)

> Socraticode is an MCP server that adds search and knowledge tools to AI assistants such as Claude Desktop, Claude Code and Cursor. MCP server for enterprise local codebase indexing, semantic search, and code dependency graphs. It has 3,336 GitHub stars, is released under the AGPL-3.0 license and runs locally with npx -y socraticode.

"There is only one good, knowledge, and one evil, ignorance." — Socrates Your AI reads code. SocratiCode understands it.

## Key facts

| Fact | Value |
|---|---|
| Repository | https://github.com/giancarloerra/SocratiCode |
| GitHub stars | 3,336 |
| License | AGPL-3.0 |
| Language | TypeScript |
| Transport | stdio |
| Packages | npm: socraticode |
| Remote URL | none |
| Needs API key | yes |
| Official | no |
| Works with | Claude Desktop, Claude Code, Cursor, VS Code |
| Category | AI & search |
| Latest release | v1.16.0 (Sep 28, 2026) |
| Last commit | Oct 2, 2026 |
| MCP registry name | io.github.giancarloerra/socraticode |

## Install

### Claude Desktop (claude_desktop_config.json)

```json
{
  "mcpServers": {
    "socraticode": {
      "command": "npx",
      "args": [
        "-y",
        "socraticode"
      ],
      "env": {
        "OPENAI_API_KEY": "your-value",
        "GOOGLE_API_KEY": "your-value",
        "OLLAMA_API_KEY": "your-value",
        "LMSTUDIO_API_KEY": "your-value",
        "LITELLM_API_KEY": "your-value",
        "QDRANT_API_KEY": "your-value"
      }
    }
  }
}
```

Settings > Developer > Edit Config. macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\. Restart Claude Desktop afterwards.

### Claude Code

```sh
claude mcp add --env OPENAI_API_KEY=your-value --env GOOGLE_API_KEY=your-value --env OLLAMA_API_KEY=your-value --env LMSTUDIO_API_KEY=your-value --env LITELLM_API_KEY=your-value --env QDRANT_API_KEY=your-value --transport stdio socraticode -- npx -y socraticode
```

### Cursor (.cursor/mcp.json)

```json
{
  "mcpServers": {
    "socraticode": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "socraticode"
      ],
      "env": {
        "OPENAI_API_KEY": "your-value",
        "GOOGLE_API_KEY": "your-value",
        "OLLAMA_API_KEY": "your-value",
        "LMSTUDIO_API_KEY": "your-value",
        "LITELLM_API_KEY": "your-value",
        "QDRANT_API_KEY": "your-value"
      }
    }
  }
}
```

Project file; use ~/.cursor/mcp.json to enable it in every project.

### VS Code (.vscode/mcp.json)

```json
{
  "inputs": [
    {
      "type": "promptString",
      "id": "openai_api_key",
      "description": "OPENAI_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "google_api_key",
      "description": "GOOGLE_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "ollama_api_key",
      "description": "OLLAMA_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "lmstudio_api_key",
      "description": "LMSTUDIO_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "litellm_api_key",
      "description": "LITELLM_API_KEY",
      "password": true
    },
    {
      "type": "promptString",
      "id": "qdrant_api_key",
      "description": "QDRANT_API_KEY",
      "password": true
    }
  ],
  "servers": {
    "socraticode": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "socraticode"
      ],
      "env": {
        "OPENAI_API_KEY": "${input:openai_api_key}",
        "GOOGLE_API_KEY": "${input:google_api_key}",
        "OLLAMA_API_KEY": "${input:ollama_api_key}",
        "LMSTUDIO_API_KEY": "${input:lmstudio_api_key}",
        "LITELLM_API_KEY": "${input:litellm_api_key}",
        "QDRANT_API_KEY": "${input:qdrant_api_key}"
      }
    }
  }
}
```

Config formats checked against the official docs on 2026-10-07.

## Environment variables

- `EMBEDDING_PROVIDER`: Embedding provider to use: ollama (default), openai, google, lmstudio, or litellm
- `OPENAI_API_KEY` (secret): API key for OpenAI embeddings (required only when EMBEDDING_PROVIDER=openai)
- `GOOGLE_API_KEY` (secret): 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_KEY` (secret): Optional API key for authenticated Ollama proxies
- `LMSTUDIO_URL`: LM Studio OpenAI-compatible base URL (default: http://localhost:1234/v1)
- `LMSTUDIO_API_KEY` (secret): 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_KEY` (secret): 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_KEY` (secret): API key for remote Qdrant instance. Only needed when QDRANT_MODE=external

## Tools

- `codebase_index`: Start indexing a codebase in the background (poll codebasestatus for progress)
- `codebase_stop`: Gracefully stop an in-progress indexing operation (current batch finishes and checkpoints; resume with codebaseindex)
- `codebase_update`: Incremental update — only re-indexes changed files
- `codebase_remove`: Remove a project's index (safely stops watcher, cancels in-flight indexing/update, waits for graph build)
- `codebase_prune`: Inventory every stored project identity with its collections and metadata; delete one only by exact identity, fresh…
- `codebase_watch`: Start/stop file watching — on start, catches up missed changes then watches for future ones
- `codebase_search`: Hybrid semantic + keyword search (dense + BM25, RRF-fused) with optional file path, language filters, and…
- `codebase_status`: Check index status and chunk count
- `codebase_graph_build`: Build a polyglot dependency graph (runs in background — poll with codebasegraphstatus)
- `codebase_graph_query`: Query imports and dependents for a specific file
- `codebase_graph_stats`: Get graph statistics (most connected files, orphans, language breakdown)
- `codebase_graph_circular`: Detect circular dependencies
- `codebase_graph_visualize`: Generate a Mermaid diagram (mode=mermaid, default) or an interactive HTML explorer (mode=interactive) of the…
- `codebase_graph_status`: Check graph build progress or persisted graph metadata (advises when few captured imports resolved, so a near-empty…
- `codebase_graph_remove`: Remove a project's persisted code graph (waits for in-flight graph build to finish first)
- `codebase_impact`: Blast radius — what files break if you change file/function X (BFS through reverse-call edges)
- `codebase_flow`: Trace forward execution flow from an entry point. Call with no args to discover entry points (orphans, main(),…
- `codebase_symbol`: 360° view of one symbol — its definition, callers, and callees
- `codebase_symbols`: List symbols in a file or search by name across the project
- `codebase_health`: Check Docker, Qdrant, and embedding provider status
- `codebase_list_projects`: List all indexed projects with paths and metadata
- `codebase_about`: Display info about SocratiCode
- `codebase_context`: List all context artifacts defined in .socraticodecontextartifacts.json with names, descriptions, and index status
- `codebase_context_search`: Semantic search across context artifacts (auto-indexes on first use, auto-detects staleness)
- `codebase_context_index`: Index or re-index all artifacts from .socraticodecontextartifacts.json
- `codebase_context_remove`: Remove all indexed context artifacts for a project (blocked while indexing is in progress)

## Similar MCP servers

- [Context7](https://appsgit.com/mcp-servers/context7): Up-to-date code docs for any prompt. (62,752 stars, MIT, needs API key)
- [FunASR](https://appsgit.com/mcp-servers/funasr): Transcribe local audio with FunASR and SenseVoice using private, on-device inference. (20,596 stars, MIT)
- [Bifrost](https://appsgit.com/mcp-servers/bifrost): Fastest enterprise AI gateway (50x faster than LiteLLM) with adaptive load balancer, cluster mode, guardrails, 1000+ models support & <100 µs overhead at 5k RPS. (8,591 stars, Apache-2.0)
- [Honcho](https://appsgit.com/mcp-servers/honcho): Memory that reasons: continual learning for stateful agents. (7,494 stars, AGPL-3.0, needs API key)
- [Semble](https://appsgit.com/mcp-servers/semble): Fast and Accurate Code Search for Agents. (6,185 stars, MIT)
- [Exa](https://appsgit.com/mcp-servers/exa): Connect AI agents to Exa for web search, content fetching, and multi-step research. (5,088 stars, MIT, official)

---

Canonical page: https://appsgit.com/mcp-servers/socraticode
Source: appsgit (https://appsgit.com), the app store for github. Data from the GitHub API, refreshed nightly.
Machine access: JSON API https://appsgit.com/api/v1/apps (OpenAPI: https://appsgit.com/openapi.json), MCP server https://mcp.appsgit.com/mcp, full index https://appsgit.com/llms-full.txt.
