# codesurface MCP server

> Indexes a codebase's public API and serves compact search, signature, and class-lookup results to AI clients via MCP tools.

- Repository: https://github.com/Codeturion/codesurface
- Page: https://hostedmcp.org/servers/codeturion/codesurface
- Transport: stdio
- Stars: 21
- License: MIT
- Latest version: 0.8.0

## Install

### Claude Code

```sh
claude mcp add codesurface -- uvx codesurface
```

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

```json
{
  "mcpServers": {
    "codesurface": {
      "command": "uvx",
      "args": [
        "codesurface"
      ]
    }
  }
}
```

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

```json
{
  "servers": {
    "codesurface": {
      "type": "stdio",
      "command": "uvx",
      "args": [
        "codesurface"
      ]
    }
  }
}
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "codesurface": {
      "command": "uvx",
      "args": [
        "codesurface"
      ]
    }
  }
}
```

### Codex (`~/.codex/config.toml`)

```toml
[mcp_servers.codesurface]
command = "uvx"
args = ["codesurface"]
```

### Gemini CLI (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "codesurface": {
      "command": "uvx",
      "args": [
        "codesurface"
      ]
    }
  }
}
```

## Tools (7)

- `search`
- `get_signature`
- `get_class`
- `get_stats`
- `reindex`
- `file_path`
- `include_tests`

## FAQ

### Which programming languages does codesurface support?

It supports C#, C++ headers, Go, Java, Python, and TypeScript/JavaScript files, auto-detecting languages in the project directory.

### How do I configure codesurface as an MCP server?

Add it to your .mcp.json with the uvx command and point --project at the directory containing your source files.

### What MCP tools does codesurface expose?

It provides five tools: search, get_signature, get_class, get_stats, and reindex.

### Does codesurface keep the index up to date when files change?

Yes, the index refreshes automatically on query misses, and you can call reindex manually for an mtime-based incremental update.

### Can I exclude generated or vendored directories from indexing?

Yes, add globs to a .codesurfaceignore file at the project root or pass comma-separated globs with the --exclude flag.
