# cortex_suite

> Two local MCP servers giving coding agents live code structure and learned project memory

- Repository: https://github.com/Artistsyn/cortex_suite
- Category: Memory, RAG & data
- Stars: 84 · Forks: 19 · Language: Rust · License: not stated
- Experience: Some experience
- Page: https://ir.adyog.com/repos/artistsyn/cortex_suite/

Coding agents often work from stale or guessed knowledge of your codebase, and they forget what went wrong last session. Cortex Suite splits that problem in two. quartz-ctx answers what the code is: types, signatures, enum variants and file:line locations. cortex remembers what you learned: patterns, anti-patterns, decisions and corrections, kept in SQLite.

Both servers check freshness when they answer, using file metadata, then a content hash, then a re-parse. An edit shows up on the very next call, with no reindex or restart. cortex does not parse code itself. It ingests quartz-ctx's output, so the two cannot disagree about what a type is. Rust is parsed with syn. Python, TypeScript, JavaScript, Go, Java, C#, C/C++, Ruby and PHP use tree-sitter.

Two things set it apart. It traces calls across languages, such as a JavaScript fetch to a Python route, and reports the unmatched halves. In Claude Code and VS Code Copilot it also installs hooks that push a recorded trap to the agent when an edit or a failing build matches it. Everything runs locally, with no network calls, API keys or telemetry.

## What it does

- **Live structure in ten languages**: quartz-ctx returns types, signatures and file:line for Rust, Python, TypeScript, JavaScript, Go, Java, C#, C/C++, Ruby and PHP. Each item carries its language and source root, so same-named types stay distinct.
- **Cross-language call tracing**: trace_across_languages joins HTTP routes to fetch/axios/requests calls, and wasm/FFI exports to their importers. It also lists calls with no route and routes nothing calls.
- **Traps pushed to the agent**: Hooks in Claude Code and VS Code Copilot warn the agent when an edit touches a recorded trap, or when a build or test fails in a known way.
- **Outcome and token measurement**: cortex scoreboard reports observed build/test outcomes, repeat failures and the token cost actually paid. cortex fired shows which mechanisms really ran.
- **Walls ledger for claimed limits**: Limits are recorded with whose limit it is, dated evidence and the cheapest test to settle it. A wall cannot be recorded without evidence.

## What you could build

- Give a coding agent an accurate, budgeted packet of types and signatures with get_api_context before it writes code.
- Find broken or orphaned calls between a JavaScript frontend and a Python backend with quartz-ctx boundaries.
- Record a recurring build failure and its fix so the agent is warned the next time it happens.
- Save a checkpoint on a long task and resume it after a context reset.
- Generate full API sheets for a codebase, with a report naming undocumented items.

## Who it's for

Developers who use coding agents such as Claude Code or VS Code Copilot and are comfortable building Rust projects and editing JSON config; learn what MCP servers are first.

## Get started

Install Rust and a C toolchain, then run the setup script against your project. Edit .cortex/index-sources.json to point at your application directories, run reindex once, and restart your editor. The README also tells you to read SETUP_HANDOFF.md first, and to pass a hint on every pattern or anti-pattern call.

```
./scripts/setup.sh ~/code/my-project
```
```
./.cortex/cortex.sh reindex
```

Tags: mcp, coding-agents, code-index, agent-memory, rust
