MCP directory
C

CodeNav

by github.com/illescasDaniel · v2.0.1 · updated Dec 1, 2026

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

PyPI

Run it locally

Install the package and point your AI client at it.

PyPI

uvx codenav-mcp==2.0.1

Environment variables

  • CODENAV_MCP_WORKSPACE

    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

    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

    Set to 1/true/yes/on to make write tools refuse to write (previews and checks still work)

  • CODENAV_MCP_EXTRA_SOURCE_ROOTS

    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

    Maximum characters of one tool result (default 30000); longer results end with an omission note

  • CODENAV_MCP_ALLOW_READONLY_FILES

    Set to 1/true/yes/on to let write tools overwrite read-only (0444) Python files and keep their mode

  • CODENAV_MCP_EXCLUDE_DIRS

    Comma-separated directory names added to the built-in list of directories that are never scanned or written

  • CODENAV_MCP_INCLUDE_DIRS

    Comma-separated directory names removed from that list, for example build to treat a first-party build/ package as source

  • CODENAV_MCP_MAX_FILES

    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

    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)

More MCP servers