Code Analyze MCP Server

MCP server for code structure analysis using tree-sitter.

Local serverstdioPython

What is the Code Analyze MCP MCP server?

Most developer tooling work still happens through a UI a human drives. Code Analyze MCP MCP server moves it into the conversation instead. MCP server for code structure analysis using tree-sitter.

The short version

Standalone MCP server for code structure analysis using tree-sitter. OpenSSF silver certified: fewer than 1% of open source projects reach this level.

aptu-coder is a Model Context Protocol server that gives AI agents precise structural context about a codebase: directory trees, symbol definitions, and call graphs, without reading raw files. It supports 18 languages (see Supported Languages) and integrates with any MCP-compatible orchestrator.

Getting it running

Setup follows the usual MCP pattern — install or clone the server, register it in your client's configuration file, restart the client.

The tools it exposes

The server publishes 10 tools. What each one is for:

  • summary — boolean
  • cursor — string
  • page_size — integer
  • analyze_directory — Directory tree with LOC, function, and class counts; respects .gitignore
  • analyze_file — Functions, classes, and imports with signatures and line ranges; returns graceful fallback (line count, file head, no AST) for unsupported extensions
  • analyze_module — Lightweight function and import index (~75% smaller than analyze_file); returns graceful fallback (empty index with note) for unsupported extensions
  • analyze_symbol — Call graph for a named symbol across a directory; callers, callees, call depth
  • edit_overwrite — Create or overwrite a file; creates parent directories
  • edit_replace — Replace a unique exact text block or all non-overlapping occurrences (replace_all=true); errors if zero or multiple matches; empty new_text deletes
  • exec_command — Run a shell command; returns stdout, stderr, exit code; output capped and filtered; optional timeout_secs (kill on expiry) and drain_timeout_secs

Things to watch

  • It runs with your machine's permissions. That is convenient and also the reason to think about what you point it at before you approve a tool call.
  • With 10 tools registered it takes up a noticeable share of the context window; turn it off in projects that never touch Code Analyze MCP.
  • Keep per-call confirmation enabled while you learn its behaviour; it is the cheapest safeguard you have.

How it compares

Among the developer tooling options, the useful question is rarely "what can it do" but "what does it cost you to run" — permissions, credentials, and how much of your context its toolset consumes. Code Analyze MCP's toolset — summary, cursor, page_size and 7 more — is a fair guide to whether it matches your workflow. It is maintained by clouatre-labs; worth a glance at recent repository activity before you build anything load-bearing on it.

This entry was verified against Code Analyze MCP's own documentation before publication; SyncDev keeps the directory reviewed rather than auto-generated.

Available tools

ToolWhat it does
summaryboolean
cursorstring
page_sizeinteger
analyze_directoryDirectory tree with LOC, function, and class counts; respects .gitignore
analyze_fileFunctions, classes, and imports with signatures and line ranges; returns graceful fallback (line count, file head, no AST) for unsupported extensions
analyze_moduleLightweight function and import index (~75% smaller than analyze_file); returns graceful fallback (empty index with note) for unsupported extensions
analyze_symbolCall graph for a named symbol across a directory; callers, callees, call depth
edit_overwriteCreate or overwrite a file; creates parent directories
edit_replaceReplace a unique exact text block or all non-overlapping occurrences (replace_all=true); errors if zero or multiple matches; empty new_text deletes the block; CRLF normalized before matching; returns occurrences_replaced
exec_commandRun a shell command; returns stdout, stderr, exit code; output capped and filtered; optional timeout_secs (kill on expiry) and drain_timeout_secs (post-exit drain window); heredoc rejected before spawn (file-write patter

Example prompts to try

  • Use Code Analyze MCP to summary.
  • Use Code Analyze MCP to cursor.
  • Use Code Analyze MCP to page size.

Frequently asked questions

It connects Code Analyze MCP to MCP-compatible AI assistants such as Claude and Cursor, exposing 10 tools (summary, cursor, page_size, and more) that the assistant can call on your behalf. Instead of copying data back and forth by hand, the assistant works with Code Analyze MCP directly.