Skip to main content

CodeNav

io.github.illescasDaniel/codenav-mcp

v2.0.1Updated Dec 1, 2026stdio · PyPI

Python code navigation and type-checked refactoring through MCP, powered by ty.

Install

Nothing to fill in: copy and run.

Run in your terminal

claude mcp add codenav-mcp -- uvx codenav-mcp==2.0.1

Configuration

10 settings.

  • CODENAV_MCP_WORKSPACE
    Env var· optional
    Project root the server serves (never overridden); default follows the client's MCP roots, CLAUDE_PROJECT_DIR or the working directory
  • CODENAV_MCP_SOURCE_ROOT
    Env var· optional
    Directory scanned for lookup implementations candidates and used to derive dotted import paths (e.g. src); default is the whole workspace
  • CODENAV_MCP_READ_ONLY
    Env var· optional
    Set to 1/true/yes/on to make write tools refuse to write (previews and checks still work)
  • CODENAV_MCP_EXTRA_SOURCE_ROOTS
    Env var· optional
    Comma-separated extra directories for Protocol implementation lookup. Unset scans top-level test/ and tests/ outside the source root. Set to none to scan only the source root.
  • CODENAV_MCP_MAX_OUTPUT_CHARS
    Env var· optional
    Maximum characters of one tool result (default 30000); longer results end with an omission note
  • CODENAV_MCP_ALLOW_READONLY_FILES
    Env var· optional
    Set to 1/true/yes/on to let write tools overwrite read-only (0444) Python files and keep their mode
Show 4 more
  • CODENAV_MCP_EXCLUDE_DIRS
    Env var· optional
    Comma-separated directory names added to the built-in list of directories that are never scanned or written
  • CODENAV_MCP_INCLUDE_DIRS
    Env var· optional
    Comma-separated directory names removed from that list, for example build to treat a first-party build/ package as source
  • CODENAV_MCP_MAX_FILES
    Env var· optional
    Maximum number of Python files (.py/.pyi) a workspace may hold (default 250000); a larger tree is refused before the language server starts
  • CODENAV_MCP_STATE_DIR
    Env var· optional
    Directory where previews and the applied-edit history are kept across restarts, one subdirectory per workspace (default $XDG_STATE_HOME/codenav-mcp or ~/.local/state/codenav-mcp)

Listed in the official MCP Registry since Dec 1, 2026. Mirrored daily; last checked Dec 1, 2026.