codesurface MCP server
✓ 인증됨Indexes a codebase's public API and serves compact search, signature, and class-lookup results to AI clients via MCP tools.
다른 이름 Codeturion/codesurface
- 스타
- 21
- Tools
- 7
- 다운로드, 30일
- 275
- 최신 버전
- 0.8.0
- 마지막 커밋
- 2026년 7월 28일
- 라이선스
- MIT
codesurface MCP란?
codesurface은(는) MCP server입니다. Indexes a codebase's public API and serves compact search, signature, and class-lookup results to AI clients via MCP tools. 7개 도구를 제공합니다. 예: search, get_signature, get_class.
프로젝트 README에서 생성된 요약
codesurface MCP server 정보
Indexing a codebase's public API to provide compact search results for AI agents is what codesurface enables. It parses source files to extract classes, methods, properties, fields, and events, serving this data through specialized tools. This approach helps reduce token usage compared to reading entire source files by providing targeted information like signatures and class members.
Developers can use this server with Claude Code, Cursor, Windsurf, or any MCP-compatible client. It supports multiple languages including C#, C++, Go, Java, Python, and TypeScript/JavaScript. Setup involves pointing the tool at a project directory using the --project argument via uvx or pip. The server automatically detects languages and skips common directories like node_modules or .git to keep the index efficient.
To ensure accuracy, the server provides tools for searching by keyword, retrieving exact signatures, and viewing full class member lists. It also includes a reindex command for incremental updates when files change. By providing specific line numbers for every record, it allows AI clients to perform targeted reads of only the necessary code segments.
활용 사례
- 1Locate specific API membersAn AI agent can find a specific service or class by searching for a keyword within the codebase.
- 2Retrieve exact method signaturesA developer can ask the AI to find the exact parameters and return types for a specific function.
- 3Inspect class structuresYou can request a full list of all public members belonging to a particular class.
- 4Perform targeted code readsInstead of reading a whole file, the AI can use line numbers from the index to read only the relevant lines.
프로젝트의 README를 바탕으로 작성되었습니다. 모든 활용 사례는 해당 내용의 인용문과 대조하여 확인합니다.
codesurface MCP 설치 방법
형식 확인: 2026년 11월 10일Claude Code에 codesurface MCP 설치
$ claude mcp add codesurface -- uvx codesurfaceCursor에 codesurface MCP 설치
~/.cursor/mcp.json
{
"mcpServers": {
"codesurface": {
"command": "uvx",
"args": [
"codesurface"
]
}
}
}VS Code에 codesurface MCP 설치
.vscode/mcp.json
{
"servers": {
"codesurface": {
"type": "stdio",
"command": "uvx",
"args": [
"codesurface"
]
}
}
}Claude Desktop에 codesurface MCP 설치
claude_desktop_config.json
{
"mcpServers": {
"codesurface": {
"command": "uvx",
"args": [
"codesurface"
]
}
}
}Codex에 codesurface MCP 설치
~/.codex/config.toml
[mcp_servers.codesurface] command = "uvx" args = ["codesurface"]
Gemini CLI에 codesurface MCP 설치
~/.gemini/settings.json
{
"mcpServers": {
"codesurface": {
"command": "uvx",
"args": [
"codesurface"
]
}
}
}codesurface MCP 도구 7
README에서 감지됨searchget_signatureget_classget_statsreindexfile_pathinclude_tests
| search | — | |
| get_signature | — | |
| get_class | — | |
| get_stats | — | |
| reindex | — | |
| file_path | — | |
| include_tests | — |
자동 검사
2026년 11월 14일에 실행됨전체 보고서 →자동 검사를 통과했습니다. 이는 보안 감사가 아닙니다. 코드를 직접 읽고 서버에 필요한 최소한의 권한만 부여하십시오. 검사 방식
- 소스 저장소 연결 및 접근 가능codeturion/codesurface is public and reachablegithub.com/codeturion/codesurface ↗통과
- 패키지가 이 저장소를 소스로 지정codesurface names codeturion/codesurface as sourcepypi.org/project/codesurface/ ↗통과
- 빌드 출처(Sigstore 증명)Sigstore attestation for codesurfacepypi.org/project/codesurface/ ↗통과
- 오픈 소스 라이선스 (OSI)MITspdx.org/licenses/MIT.html ↗통과
- 최근 1년 내 커밋 또는 릴리스Last commit or release 2026-07-28github.com/codeturion/codesurface ↗통과
- OpenSSF Scorecard검사되지 않음
- 패키지 이름이 인기 패키지와 유사하지 않음No popular package one edit away from codesurface통과
- 패키지와 의존성에 심각한 보안 권고 없음37 resolved dependencies checked; no critical advisoryosv.dev ↗통과
- 모델에 대한 숨겨진 지침 없음7 tool descriptions and the README read; no override phrases, credential paths or hidden characters통과
- 파괴적인 도구에 라벨 표시됨No tool named like delete, drop or exec통과
- 원격 endpoint가 MCP 핸드셰이크에 응답검사되지 않음
README
GitHub에서 보기codesurface
MCP server that indexes your codebase's public API at startup and serves it via compact tool responses, saving tokens vs reading source files.
Parses source files, extracts public classes/methods/properties/fields/events, and serves them through 5 MCP tools. Works with Claude Code, Cursor, Windsurf, or any MCP-compatible AI tool.
Supported languages: C# (.cs), C++ headers (.h, .hpp, .hxx, .h++), Go (.go), Java (.java), Python (.py), TypeScript/JavaScript (.ts, .tsx, .js, .jsx)
Quick Start
Add to your .mcp.json:
{
"mcpServers": {
"codesurface": {
"command": "uvx",
"args": ["codesurface", "--project", "/path/to/your/src"]
}
}
}
Point --project at any directory containing supported source files (a Unity Assets/Scripts folder, a Spring Boot project, a .NET src/ tree, a Node.js/React project, a Python package, etc.). Languages are auto-detected.
Restart your AI tool and ask: "What methods does MyService have?"
CLAUDE.md Snippet
Add this to your project's CLAUDE.md (or equivalent instructions file). This step is important. Without it, the AI has the tools but won't know when to reach for them.
## Codebase API Lookup (codesurface MCP)
Use codesurface MCP tools BEFORE Grep, Glob, Read, or Task (subagents) for any class/method/field lookup. This applies to you AND any subagents you spawn.
| Tool | Use when | Example |
|------|----------|---------|
| `search` | Find APIs by keyword | `search("MergeService")` |
| `get_signature` | Need exact signature | `get_signature("TryMerge")` |
| `get_class` | See all members on a class | `get_class("BlastBoardModel")` |
| `get_stats` | Codebase overview | `get_stats()` |
Every result includes file path + line numbers. Use them for targeted reads:
- `File: Service.cs:32` → `Read("Service.cs", offset=32, limit=15)`
- `File: Converter.java:504-506` → `Read("Converter.java", offset=504, limit=10)`
Never read a full file when you have a line number. Only fall back to Grep/Read for implementation details (method bodies, control flow).
Tools
| Tool | Purpose | Example |
|---|---|---|
search |
Find APIs by keyword | "MergeService", "BlastBoard", "GridCoord" |
get_signature |
Exact signature by name or FQN | "TryMerge", "CampGame.Services.IMergeService.TryMerge" |
get_class |
Full class reference card with all public members | "BlastBoardModel" → all methods/fields/properties |
get_stats |
Overview of indexed codebase | File count, record counts, namespace breakdown |
reindex |
Incremental index update (mtime-based) | Only re-parses changed/new/deleted files. Also runs automatically on query misses |
search, get_signature, and get_class accept two optional filters:
file_path: scope results to a directory prefix or exact file (e.g."src/services/"or"src/services/MergeService.ts")include_tests: include test files in results (defaultfalse). Detects__tests__/,tests/,test/,*.test.*,*.spec.*,*_test.*,test_*
Tested On
| Project | Language | Files | Records | Time |
|---|---|---|---|---|
| vscode | TypeScript | 6,611 | 88,293 | 9.3s |
| Paper | Java | 2,909 | 33,973 | 2.3s |
| client-go | Go | 219 | 2,760 | 0.4s |
| langchain | Python | 1,880 | 12,418 | 1.1s |
| pydantic | Python | 365 | 9,648 | 0.3s |
| guava | Java | 891 | 8,377 | 2.4s |
| immich | TypeScript | 919 | 7,957 | 0.6s |
| fastapi | Python | 881 | 5,713 | 0.5s |
| ant-design | TypeScript | 2,947 | 5,452 | 0.9s |
| dify | TypeScript | 4,903 | 5,038 | 1.9s |
| crawlee-python | Python | 386 | 2,473 | 0.3s |
| flask | Python | 63 | 872 | <0.1s |
| cobra | Go | 15 | 249 | <0.1s |
| gin | Go | 41 | 574 | <0.1s |
| Unity game (private) | C# | 129 | 1,018 | 0.1s |
Line Numbers for Targeted Reads
Every record includes line_start and line_end (1-indexed). Multi-line declarations span the full signature:
[METHOD] com.google.common.base.Converter.from
Signature: static Converter<A, B> from(Function<...> forward, Function<...> backward)
File: Converter.java:504-506 ← multi-line signature
[METHOD] server.AlbumController.createAlbum
Signature: createAlbum(@Auth() auth: AuthDto, @Body() dto: CreateAlbumDto)
File: album.controller.ts:46 ← single-line
This lets AI agents do targeted reads instead of reading full files:
# Instead of reading the entire 600-line file:
Read("Converter.java") # 600 lines, ~12k tokens
# Read just the method + context:
Read("Converter.java", offset=504, limit=10) # 10 lines, ~200 tokens
Benchmarks
Measured across 5 real-world projects in 5 languages, each using a 10-step cross-cutting research workflow.

| Language | Project | Files | Records | MCP | Skilled | Naive | MCP vs Skilled |
|---|---|---|---|---|---|---|---|
| C# | Unity game | 129 | 1,034 | 1,021 | 4,453 | 11,825 | 77% fewer |
| TypeScript | immich | 694 | 8,344 | 1,451 | 4,500 | 14,550 | 68% fewer |
| Java | guava | 891 | 8,377 | 1,851 | 4,200 | 26,700 | 56% fewer |
| Go | gin | 38 | 534 | 1,791 | 2,770 | 15,300 | 35% fewer |
| Python | codesurface | 9 | 40 | 753 | 2,000 | 10,400 | 62% fewer |

Even with follow-up reads for implementation detail, the hybrid MCP + targeted Read approach uses 44% fewer tokens than a skilled Grep+Read agent and 87% fewer than a naive agent:

Per-question breakdown

See workflow-benchmark.md for the full step-by-step analysis across all languages.
Filtering What Gets Indexed
By default, codesurface skips common vendored, build, and VCS directories: node_modules, vendor, bin, obj, dist, build, target, .git, .venv, __pycache__, and a few dozen others. Git worktrees and submodules are also skipped.
To exclude additional paths:
Project-level (committed): create a .codesurfaceignore file at your project root with one glob per line.
generated/**
docs/**
**/*.pb.go
Per-instance (CLI): pass --exclude with comma-separated globs.
{
"command": "uvx",
"args": ["codesurface", "--project", "src", "--exclude", "generated/**,vendor/**"]
}
Other indexing flags:
--include-submodules: index git submodules (skipped by default)--language <name>: pin to a single parser (e.g.--language cpp) instead of auto-detecting
Multiple Projects
Each --project flag indexes one directory. To index multiple codebases, run separate instances with different server names:
{
"mcpServers": {
"codesurface-backend": {
"command": "uvx",
"args": ["codesurface", "--project", "/path/to/backend/src"]
},
"codesurface-frontend": {
"command": "uvx",
"args": ["codesurface", "--project", "/path/to/frontend/src"]
}
}
}
Each instance gets its own in-memory index and tools. The AI agent sees both and can query across projects.
Setup Details
Using pip install:
pip install codesurface
{
"mcpServers": {
"codesurface": {
"command": "codesurface",
"args": ["--project", "/path/to/your/src"]
}
}
}
codesurface/
├── src/codesurface/
│ ├── server.py # MCP server with 5 tools
│ ├── db.py # SQLite + FTS5 database layer
│ ├── filters.py # PathFilter (default exclusions, .codesurfaceignore, --exclude)
│ └── parsers/
│ ├── base.py # BaseParser ABC
│ ├── cpp.py # C++ header parser
│ ├── csharp.py # C# parser
│ ├── go.py # Go parser
│ ├── java.py # Java parser
│ ├── python_parser.py # Python parser
│ └── typescript.py # TypeScript/JavaScript parser
├── pyproject.toml
└── README.md
"No codebase indexed"
- Ensure
--projectpoints to a directory containing supported source files (.cs,.h,.hpp,.go,.java,.py,.ts,.tsx,.js,.jsx) - The server indexes at startup. Check stderr for
[codesurface] scanning N files...and[codesurface] done:lines
Server won't start
- Check Python version:
python --version(needs 3.10+) - Check
mcp[cli]is installed:pip install mcp[cli]
Stale results after editing source files
- The index auto-refreshes on query misses. If you add a new class and query it, the server reindexes and retries automatically
- You can also call
reindex()manually to force an incremental update
Contact
License
codesurface MCP 질문
codesurface MCP를 Claude Code에 추가하려면 어떻게 하나요?
터미널에서 claude mcp add codesurface -- uvx codesurface를 실행합니다. 모든 프로젝트에서 사용할 수 있게 하려면 --scope user를 추가합니다.
codesurface MCP를 Cursor에 추가하려면 어떻게 하나요?
~/.cursor/mcp.json를 열고 mcpServers 아래에 서버를 추가합니다. 위 설치 섹션에 표시된 Cursor 구성을 사용합니다.
codesurface MCP는 어떤 도구를 제공하나요?
7개 도구를 제공합니다. 예: search, get_signature, get_class, get_stats, reindex.
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.