# SocratiCode MCP server

> Index large codebases locally and search them semantically, with dependency graphs and symbol-level impact analysis.

- Listing: https://mcp.tc/i/socraticode
- Connect: this is a local (stdio) server; install it on your machine (see Install). The listing link is a page, not an MCP endpoint.
- Type: local (stdio)
- Auth: optional (works without sign-in)
- Category: [Developer Tools](https://mcp.tc/c/developer-tools)
- Vendor: giancarloerra
- Homepage: <https://socraticode.cloud>
- Repository: <https://github.com/giancarloerra/socraticode>
- Package: npm `socraticode`

## About

SocratiCode indexes a codebase and gives an AI assistant hybrid semantic and BM25 code search, polyglot dependency graphs, and symbol-level impact analysis with call-flow tracing. It can also index context artifacts such as database schemas, API specs and infrastructure configs, and it offers an interactive HTML graph viewer. A file watcher keeps the index current.

It runs locally over stdio through npx (npm package socraticode). Node.js 18.17 or newer is needed, plus Docker for the default local Qdrant and Ollama stack. No API keys are required by default. OpenAI, Google, LM Studio or LiteLLM embeddings can be selected through environment variables.

## What it can do

- Index a local codebase with AST-aware chunking
- Run hybrid semantic and keyword code search
- Build dependency graphs and spot circular dependencies
- Trace symbol-level impact and call flow
- Index database schemas, API specs and infra configs as searchable context
- Keep the index updated with a file watcher
- Choose Ollama, OpenAI, Google, LM Studio or LiteLLM embeddings

## Example prompts

- "Index this repository and find where user authentication is handled"
- "Show the dependency graph for the payments module"
- "What would break if I change the signature of parseConfig?"
- "Search the indexed database schema for the orders table"

## Install

### Claude Code

1. Run this in a terminal, in your project folder:

```bash
claude mcp add --transport stdio socraticode --env "OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>" --env "GOOGLE_API_KEY=<YOUR_GOOGLE_API_KEY>" --env "OLLAMA_API_KEY=<YOUR_OLLAMA_API_KEY>" --env "LMSTUDIO_API_KEY=<YOUR_LMSTUDIO_API_KEY>" --env "LITELLM_API_KEY=<YOUR_LITELLM_API_KEY>" --env "QDRANT_API_KEY=<YOUR_QDRANT_API_KEY>" -- npx -y socraticode
```

2. Start Claude Code and type `/mcp`. **socraticode** should show as connected.

Add `--scope user` to make it available in every project. Replace the placeholders with your own values.

### Claude Desktop

1. Open **Settings → Developer → Edit Config**. It opens `claude_desktop_config.json`. Add:

`claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "socraticode": {
      "command": "npx",
      "args": [
        "-y",
        "socraticode"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
        "GOOGLE_API_KEY": "<YOUR_GOOGLE_API_KEY>",
        "OLLAMA_API_KEY": "<YOUR_OLLAMA_API_KEY>",
        "LMSTUDIO_API_KEY": "<YOUR_LMSTUDIO_API_KEY>",
        "LITELLM_API_KEY": "<YOUR_LITELLM_API_KEY>",
        "QDRANT_API_KEY": "<YOUR_QDRANT_API_KEY>"
      }
    }
  }
}
```

2. Save the file and restart Claude Desktop. Replace the placeholders with your own values.

Needs Node.js on your computer. The file lives in `~/Library/Application Support/Claude/` on macOS and `%APPDATA%\Claude\` on Windows.

### Cursor

[Add to Cursor](<https://cursor.com/install-mcp?name=socraticode&config=eyJjb21tYW5kIjoibnB4IiwiYXJncyI6WyIteSIsInNvY3JhdGljb2RlIl0sImVudiI6eyJPUEVOQUlfQVBJX0tFWSI6IjxZT1VSX09QRU5BSV9BUElfS0VZPiIsIkdPT0dMRV9BUElfS0VZIjoiPFlPVVJfR09PR0xFX0FQSV9LRVk%2BIiwiT0xMQU1BX0FQSV9LRVkiOiI8WU9VUl9PTExBTUFfQVBJX0tFWT4iLCJMTVNUVURJT19BUElfS0VZIjoiPFlPVVJfTE1TVFVESU9fQVBJX0tFWT4iLCJMSVRFTExNX0FQSV9LRVkiOiI8WU9VUl9MSVRFTExNX0FQSV9LRVk%2BIiwiUURSQU5UX0FQSV9LRVkiOiI8WU9VUl9RRFJBTlRfQVBJX0tFWT4ifX0%3D>) (opens Cursor)

Or add it by hand to `~/.cursor/mcp.json` (all projects) or `.cursor/mcp.json` (this project):

`mcp.json`:

```json
{
  "mcpServers": {
    "socraticode": {
      "command": "npx",
      "args": [
        "-y",
        "socraticode"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
        "GOOGLE_API_KEY": "<YOUR_GOOGLE_API_KEY>",
        "OLLAMA_API_KEY": "<YOUR_OLLAMA_API_KEY>",
        "LMSTUDIO_API_KEY": "<YOUR_LMSTUDIO_API_KEY>",
        "LITELLM_API_KEY": "<YOUR_LITELLM_API_KEY>",
        "QDRANT_API_KEY": "<YOUR_QDRANT_API_KEY>"
      }
    }
  }
}
```

Needs Node.js on your computer. Replace the placeholders with your own values.

### VS Code

Add it to `.vscode/mcp.json`. VS Code asks for the secret the first time and stores it securely:

`.vscode/mcp.json`:

```json
{
  "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}"
      }
    }
  },
  "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
    }
  ]
}
```

Needs Node.js on your computer.

### Devin Desktop

1. Add it to `~/.config/devin/mcp_config.json` (macOS and Linux) or `%APPDATA%\devin\mcp_config.json` (Windows):

`mcp_config.json`:

```json
{
  "mcpServers": {
    "socraticode": {
      "command": "npx",
      "args": [
        "-y",
        "socraticode"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
        "GOOGLE_API_KEY": "<YOUR_GOOGLE_API_KEY>",
        "OLLAMA_API_KEY": "<YOUR_OLLAMA_API_KEY>",
        "LMSTUDIO_API_KEY": "<YOUR_LMSTUDIO_API_KEY>",
        "LITELLM_API_KEY": "<YOUR_LITELLM_API_KEY>",
        "QDRANT_API_KEY": "<YOUR_QDRANT_API_KEY>"
      }
    }
  }
}
```

2. Refresh the MCP server list in Cascade. Replace the placeholders with your own values.

Devin Desktop is the new name for Windsurf.

### Codex

```bash
codex mcp add socraticode --env "OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>" --env "GOOGLE_API_KEY=<YOUR_GOOGLE_API_KEY>" --env "OLLAMA_API_KEY=<YOUR_OLLAMA_API_KEY>" --env "LMSTUDIO_API_KEY=<YOUR_LMSTUDIO_API_KEY>" --env "LITELLM_API_KEY=<YOUR_LITELLM_API_KEY>" --env "QDRANT_API_KEY=<YOUR_QDRANT_API_KEY>" -- npx -y socraticode
```

Or edit `~/.codex/config.toml` directly:

`config.toml`:

```toml
[mcp_servers.socraticode]
command = "npx"
args = ["-y", "socraticode"]
env = { OPENAI_API_KEY = "<YOUR_OPENAI_API_KEY>", GOOGLE_API_KEY = "<YOUR_GOOGLE_API_KEY>", OLLAMA_API_KEY = "<YOUR_OLLAMA_API_KEY>", LMSTUDIO_API_KEY = "<YOUR_LMSTUDIO_API_KEY>", LITELLM_API_KEY = "<YOUR_LITELLM_API_KEY>", QDRANT_API_KEY = "<YOUR_QDRANT_API_KEY>" }
```

Needs Node.js on your computer. Replace the placeholders with your own values.

### Gemini CLI

```bash
gemini mcp add -e "OPENAI_API_KEY=<YOUR_OPENAI_API_KEY>" -e "GOOGLE_API_KEY=<YOUR_GOOGLE_API_KEY>" -e "OLLAMA_API_KEY=<YOUR_OLLAMA_API_KEY>" -e "LMSTUDIO_API_KEY=<YOUR_LMSTUDIO_API_KEY>" -e "LITELLM_API_KEY=<YOUR_LITELLM_API_KEY>" -e "QDRANT_API_KEY=<YOUR_QDRANT_API_KEY>" socraticode npx -- -y socraticode
```

This adds it to the current project. Add `-s user` to use it everywhere.

### Any client

Most clients that start local servers accept this shape:

```json
{
  "mcpServers": {
    "socraticode": {
      "command": "npx",
      "args": [
        "-y",
        "socraticode"
      ],
      "env": {
        "OPENAI_API_KEY": "<YOUR_OPENAI_API_KEY>",
        "GOOGLE_API_KEY": "<YOUR_GOOGLE_API_KEY>",
        "OLLAMA_API_KEY": "<YOUR_OLLAMA_API_KEY>",
        "LMSTUDIO_API_KEY": "<YOUR_LMSTUDIO_API_KEY>",
        "LITELLM_API_KEY": "<YOUR_LITELLM_API_KEY>",
        "QDRANT_API_KEY": "<YOUR_QDRANT_API_KEY>"
      }
    }
  }
}
```

Zed puts servers under `context_servers` in its settings, with the same `command`, `args` and `env` fields.

Needs Node.js on your computer. Replace the placeholders with your own values.

## Recent changes

- 2026-10-06 21:22 UTC: Tracking started: version 1.16.0. Source: automatic check.

More on the History tab, with descriptions before and after for the newest entries: https://mcp.tc/i/socraticode#history (Atom feed: https://mcp.tc/i/socraticode/history.xml). It records what mcp.tc's anonymous checks saw, every 3 hours where the tool list can be read without sign-in; it is not a security review.

## Details

- Server version: 1.16.0
- Last checked: 2026-10-05
- Listed: 2026-10-05
- Updated: 2026-10-07

---
Source: https://mcp.tc/i/socraticode (mcp.tc is an independent directory, not affiliated with this server's publisher). Corrections: https://mcp.tc/report
