codesight MCP
codesight maps a project in one run: routes, DB models, dependencies, env vars. It gives the map to an agent as files or through an MCP server
- 1,420 ★ on the repository
- Last commit
- MIT
Extended access
Why this level
- It scans the whole project, lists env vars with the files that mention them, and saves the map into .codesight/ inside the repository
- The --init, --profile and --hook commands create agent instruction files and install a git hook that runs codesight on every commit
- The Terraform plugin, once configured, reads neighboring folders outside the project
Install
- Works in
In your terminal, with SkillFoxx CLI
npx skillfoxx add mcp/codesightDetects the agents on your machine, shows the access level and pins the version.
Other ways to install
Access and checks
How we reviewExtended accessThe tool runs code or makes network calls and only reads external data.
- It scans the whole project, lists env vars with the files that mention them, and saves the map into .codesight/ inside the repository
- The --init, --profile and --hook commands create agent instruction files and install a git hook that runs codesight on every commit
- The Terraform plugin, once configured, reads neighboring folders outside the project
This is third-party code. Review the repository files before installing.
What it does
codesight runs with `npx codesight` in a project root and builds a code map in a fraction of a second. Eight detectors work in parallel: API routes (30-plus frameworks), database models and relations (14 ORMs), UI components, the import graph, middleware, configuration with env vars, library exports and contracts. TypeScript is parsed through the compiler AST, and other languages (Python, Go, Ruby, Java, Rust, PHP and more) through regular expressions. The result goes into the `.codesight/` folder: a combined `CODESIGHT.md` and separate `routes.md`, `schema.md`, `components.md`, `libs.md`, `config.md`, `middleware.md` and `graph.md`. Built-in plugins also read GitHub Actions and CircleCI pipelines, git hooks and skills from `.claude/`. The map can then reach an agent in several ways. `npx codesight --init` creates `CLAUDE.md`, `.cursorrules`, `.github/copilot-instructions.md`, `codex.md` and `AGENTS.md` describing the stack and the most depended-on files. `--profile` writes a file for one tool, and `--wiki` splits the map into short articles in `.codesight/wiki/`, so an agent reads a 200-token index and the one article it needs instead of the whole file. `--blast src/lib/db.ts` walks the import graph breadth-first and shows which files, routes and models a change would touch. `npx codesight --mcp` starts an MCP server with 14 tools: a summary, routes filtered by prefix and method, the schema by model name, blast radius, the most imported files, background queue events, a test coverage map and wiki articles. The first call scans the project, and later calls come from the session cache. The `--mode knowledge` mode builds the same kind of map for a folder of Markdown notes: decisions, open questions, meeting notes. `--watch` rebuilds the map as code changes, and `--hook` installs a git hook that refreshes it on every commit.
Who it is for. For developers who work with Claude Code, Cursor, Codex or Copilot on TypeScript, Python, Go and other projects and are tired of spending the context window on an agent re-learning the routes and database schema.
Good fit when
- At the start of every session an agent spends a long time reading files to learn the project's API routes and database tables
- Before editing a shared module you need to know which files, routes and models depend on it
- You want instruction files for Claude Code, Cursor, Codex and Copilot with a stack description in one go
- An Obsidian notes folder or an ADR directory should become a short map of decisions and open questions for an agent
- You want to audit a project's env vars: which are required and in which file they are used
Not a fit when
- You need the whole repository packed into one file with the code text: codesight gives structure, not source, and the catalog has Repomix for building such a file
- You need a function and symbol call graph from tree-sitter: codesight maps routes, models and file-level imports, not calls inside functions
- You have a Node.js older than 18 installed: the package requires Node.js 18 or newer
- The project uses a language or framework that has no detector: the map will be incomplete without a custom plugin
Example request
Connect codesight to this project and tell me which routes and files a change in src/lib/db.ts would affectMCP
- Transport
- stdio
- Authentication
- not required
Limitations
- MIT license. Full AST parsing works only for TypeScript while other languages are read with regular expressions, so the map of routes and models there can miss unusual cases.
- The token-saving figures in the project description are the author's own: output tokens are measured from file size, and the manual-exploration cost is estimated from the number of routes, models and components found, so your project will give different results.
- For full precision on Rust, Python and Go, enable the `--native-ast` flag: WASM plugins are not in the npm package, and are downloaded separately from GitHub releases into `~/.codesight/plugins/`.
- The Terraform plugin is off by default because it deliberately reads folders outside the project, such as a sibling `../infrastructure` repository.
- `--init` creates instruction files for five tools at once and `--hook` adds a git hook, so check the changes in `git status` before committing the result.
How to disable. Remove the codesight MCP server entry from the agent settings and delete the `.codesight/` folder in the project. If you ran `--init`, delete `CLAUDE.md`, `.cursorrules`, `codex.md` and `AGENTS.md` by hand. Remove the git hook by deleting the codesight line from `.git/hooks/pre-commit`. `disableDetectors` in `codesight.config.js` turns off individual detectors.
FAQ
Do I need API keys or an account?
No. By the author's account no setup or keys are required, and the wiki is built from the AST with no calls to language models. The network is needed only for downloads: the first `npx` run fetches the package from npm, and plugins for `--native-ast` are downloaded by hand from GitHub releases.
What is blast radius and how do I get it?
It is the list of files, routes, models and handlers that depend indirectly on the file you pick. `npx codesight --blast src/db/index.ts` walks the import graph breadth-first up to three hops deep. An agent gets the same result through the `codesight_get_blast_radius` MCP tool before it starts an edit.
How is the wiki different from the plain map?
The `CODESIGHT.md` map takes three to five thousand tokens and is loaded whole. The wiki from `--wiki` splits it by topic: an `index.md` of about 200 tokens, then articles on auth, payments, the database, users and the interface. The agent takes the index and one needed article. `log.md` keeps a record of every operation.
How do I connect the server to Codex if it cannot start in time?
On first run `npx` downloads the package, which can take longer than the 30 seconds Codex allows by default. In `~/.codex/config.toml` add `startup_timeout_sec = 60` under `[mcp_servers.codesight]`, or install the package globally with `npm install -g codesight` and set `command = "codesight"`.
Can it map notes instead of code?
Yes, through the `--mode knowledge` mode. It reads Markdown files from the current folder, an Obsidian vault or a docs folder and recognizes ADR-style decision records, meeting notes, retrospectives, specs and research. The result goes into `.codesight/KNOWLEDGE.md` and reaches the agent through the `codesight_get_knowledge` tool.
Discussion
No questions or reviews yet.
Related
MCP serversCodeGraph (Rust)
codegraph-rust
A Rust code graph for agents: four MCP tools show what an edit will touch, how the architecture fits together and where the fragile spots are
Local code structure graph: builds a repository map with tree-sitter and serves the assistant only the context a change actually touches over MCP
An MCP server that turns a large codebase into a semantic feature graph for precise navigation and meaning-based search
Eleven skills for Claude Code and Codex: test audit, git worktree cleanup, plan pages, screen recording transcripts and 1Password sign-in
Local code graph for agents: an MCP server returns entry points, symbol links and change impact in one call
An MCP server and CLI in Go: the agent keeps an index of code and database schema in the repository, versions it in Git and reads it whole before each task
Comparison with similar tools
Entries that share the main search query, and how they differ.
| Entry | Official | Authentication | Repository stars | Main difference |
|---|---|---|---|---|
| codesight (this entry) | no | not required | 1,420 | |
| Repomix | no | not required | 28,983 | packs the whole repository into one file of code rather than a map of routes and models |
| code-review-graph | no | not required | 32,333 | a local code structure graph on tree-sitter that serves an agent only the context relevant to an edit through MCP |
| CodeGraph | no | not required | 74,886 | a graph of symbols and relations, entry points and change blast radius in one call |
README in short
The repository has a description of the commands and all flags, example output for routes, schema, blast radius and the env var audit, a before-and-after token comparison on real projects, and a list of supported stacks with a separate Roku and BrightScript section. Alongside are a document on WASM plugins, a set of reference projects with expected results in the `eval` folder for checking accuracy, 149 tests and a ready GitHub Actions workflow. The package itself is installed from npm.