Skip to content
appsgit

Socraticode

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.

github.com/giancarloerra/SocratiCode (opens in a new tab)

Install Socraticode

Generated from the server's MCP registry entry. Replace your-value with your own values.

Claude Desktop

claude_desktop_config.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

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
{
  "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
{
  "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 Oct 7, 2026: modelcontextprotocol.io (opens in a new tab), code.claude.com (opens in a new tab), cursor.com (opens in a new tab), code.visualstudio.com (opens in a new tab).

Environment variables

Variables the server reads at startup.

NameRequiredDescription
EMBEDDING_PROVIDERNoEmbedding provider to use: ollama (default), openai, google, lmstudio, or litellm
OPENAI_API_KEYsecretNoAPI key for OpenAI embeddings (required only when EMBEDDING_PROVIDER=openai)
GOOGLE_API_KEYsecretNoAPI key for Google embeddings (required only when EMBEDDING_PROVIDER=google)
OLLAMA_URLNoURL of the Ollama server (default: auto-detected; Docker-managed or http://localhost:11434)
EMBEDDING_MODELNoEmbedding model name (defaults per provider; required for lmstudio and litellm)
EMBEDDING_DIMENSIONSNoEmbedding vector dimensions (defaults per provider; required for lmstudio and litellm)
OLLAMA_MODENoOllama mode: auto (default), docker, or external
OLLAMA_API_KEYsecretNoOptional API key for authenticated Ollama proxies
LMSTUDIO_URLNoLM Studio OpenAI-compatible base URL (default: http://localhost:1234/v1)
LMSTUDIO_API_KEYsecretNoOptional API key when LM Studio authentication is enabled
LMSTUDIO_ALLOW_MISSING_MODEL_LISTINGNoAllow compatible embedding servers without a models endpoint to be probed directly
LITELLM_URLNoLiteLLM OpenAI-compatible base URL (default: http://localhost:4000/v1)
LITELLM_API_KEYsecretNoLiteLLM master or virtual API key (required when EMBEDDING_PROVIDER=litellm)
LITELLM_SEND_DIMENSIONSNoForward the dimensions parameter through LiteLLM when explicitly enabled
QDRANT_MODENoQdrant mode: managed (default, Docker-managed) or external (user-provided instance)
QDRANT_URLNoFull URL for remote/cloud Qdrant (e.g. https://xyz.cloud.qdrant.io:6333). Only needed when QDRANT_MODE=external
QDRANT_API_KEYsecretNoAPI key for remote Qdrant instance. Only needed when QDRANT_MODE=external

Tools (26)

Parsed from the Tools section of the README; check the repository for the current list.

  • 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)

About Socraticode

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

  • ai
  • ai-assistant
  • embeddings
  • mcp
  • semantic
  • vector-database
  • vector-embeddings
  • vector-search
  • claude
  • codebase-intelligence

FAQ

Socraticode FAQ

Still curious? Email info@appsgit.com.

What is Socraticode?

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. The source code is at github.com/giancarloerra/SocratiCode.

How do I install the Socraticode MCP server?

Add the command npx -y socraticode to your MCP client: put it in claude_desktop_config.json for Claude Desktop, run claude mcp add for Claude Code, or add it to .cursor/mcp.json (Cursor) or .vscode/mcp.json (VS Code). The snippets on this page are ready to paste.

Is Socraticode free?

The server is open source under the AGPL-3.0 license, so running it is free. It needs credentials (OPENAI_API_KEY, GOOGLE_API_KEY, OLLAMA_API_KEY, LMSTUDIO_API_KEY, LITELLM_API_KEY and QDRANT_API_KEY) for the service it connects to, which may require a paid account.

Is Socraticode actively maintained?

The most recent commit was on Oct 2, 2026. The latest release is v1.16.0, published Sep 28, 2026. appsgit only lists MCP servers with a commit in the last six months and re-checks every server daily.