Labsco
MCP SERVER

UCN Universal Code Navigator

by mleoca

One tool, eighteen commands: find the definition, prove the callers, pick the tests — and see which edges it could not prove.

Code Intelligence & Repository IndexingVerified
Summary
It counts what it could not prove instead of quietly leaving it out.

A call whose receiver cannot be resolved comes back as an unverified leaf with a reason — method-ambiguous, possible-dispatch, uncertain-receiver — and the ACCOUNT line reconciles every occurrence of the name it searched, so a zero never turns into a deletion claim. For an agent that is the whole difference from grep: the answer arrives with its uncertainty attached, and the uncertainty survives truncation. Know the edge of it before relying on it — nothing is executed, dependencies like node_modules are not indexed, and reflection, generated code and runtime registration are blind spots the tool reports rather than hides, with repo --sections=health --deep as the place it lists them.

What it is

AST-based code intelligence for JavaScript, TypeScript, JSX/TSX, Python, Go, Rust, Java, C, C++, C# and inline HTML scripts. It parses with tree-sitter rather than regex, so who-calls-this, what-breaks-if-I-change-it and which-tests-should-I-run are answered from structure — and every answer separates the edges it proved from the ones it could not. Over MCP it is a single tool, ucn, whose command enum carries all eighteen tasks.

What you get
  • Show gathers everything about one symbol — signature, source, callers, callees, tests, types, dependencies, examples — and --sections projects it down to only what you asked for
  • Find returns stable file:line:name handles, so a name reused across files or classes can be pinned to one definition for every later call
  • Trace walks callees downward, callers upward, or callers all the way to runtime entry points
  • Impact lists every call site with the evidence behind it, from a symbol or from the current Git diff; tests selects the directly and transitively linked tests worth running
  • Repository-level questions have their own commands: repo for orientation and health, deps for imports, importers and cycles, api for the public surface, entrypoints for framework and runtime roots, endpoints for the HTTP surface, deadcode for conservative dead-code candidates, audit-async for likely missing awaits, and stacktrace for resolving frames
  • Usages is the escape hatch — every literal occurrence of a name, classified as call, definition, import, reference, comment or string. Regex runs on an RE2-compatible linear-time engine, so a hostile pattern is rejected up front instead of hanging the terminal
  • Every relationship answer closes with an ACCOUNT line reconciling each occurrence of the name — confirmed, unverified with a reason, non-call, other-target, unaccounted — and a CONTRACT line stating what is not being claimed
  • Text answers default to a 10K character budget for targeted questions and 3K for broad ones, with a 100K ceiling; truncation preserves the ACCOUNT, CONTRACT and WARNING lines, and JSON is never text-truncated
  • The incremental index lives in your user cache directory rather than the repo, keyed by canonical path hash so same-named checkouts stay separate — there is nothing to gitignore
Requirements

Node.js 20 or newer. Run it as npx -y ucn --mcp over stdio, or npm install -g ucn for the terminal — the same engine, index and cache serve both. It opens no port and needs no language server, no compilation and no configuration: point it at a directory and ask. UCN_CACHE_DIR overrides the cache location, which otherwise follows the platform default, and --no-cache or --clear-cache manage it. For C and C++, a compile_commands.json improves header-language, include-path and ownership context. MIT.

Setup effort

One command — npm install -g ucn