skip to content
coograph 17
v1.6.0 · open source · MIT
17 stars MIT MCP-native

Stop your AI from grepping the world.

Coograph makes your AI coding tools smarter and cheaper by pointing them to the right files in your codebase instead of letting them waste time and tokens reading everything.

Coograph parses your codebase into a SQLite dependency graph. Your coding agent queries it before any file read. Measured on a fixed task. SQLite. MCP-native. Multi-tool.

For solo devs, indie hackers, and engineering leaders evaluating AI tooling.

For: solo devs · indie hackers · staff eng evaluating AI tooling

Tools: Claude Code · Cursor · VS Code Copilot · Devin Desktop · Codex CLI · OpenCode · Aider · Cline

Problem

The grep-everything tax.

Ask a coding agent to "add caching to OrderService.place_order()" and watch it work. It greps for the class name. It gets back 20 files. It reads them all to be safe. Most of those are tests, docs, downstream callers, SDK types — nothing to do with where the cache should live.

That tax is paid in tokens, in tool calls, and in latency, on every single task — which directly increases your AI infrastructure bill.

 $ grep -rl "OrderService" src/
docs/architecture.md
docs/deployment.md
migrations/001_initial.sql
README.md
src/api/routes.py
src/api/schemas.py
src/audit/audit_log.py
src/billing/billing_service.py
src/billing/invoice.py
src/client/order_client.ts
src/notifications/email.py
src/orders/order_dto.py
src/orders/order_events.py
src/orders/order_service.py
src/orders/order_validator.py
src/types/index.ts
tests/conftest.py
tests/test_api.py
tests/test_billing_service.py
tests/test_order_service.py

20 matches. The agent reads them all to be safe. 
Solution

Graph-first context.

Your agent calls get_minimal_context(task) before any file read. The graph returns the 4 files that actually matter for this change. Nothing else.

try the query click a task. these are the files the benchmark asserts are enough for it.
benchmark tasks
without graph $ grep -rl "OrderService" src/
docs/architecture.md
docs/deployment.md
migrations/001_initial.sql
README.md
src/api/routes.py
src/api/schemas.py
src/audit/audit_log.py
src/billing/billing_service.py
src/billing/invoice.py
src/client/order_client.ts
src/notifications/email.py
src/orders/order_dto.py
src/orders/order_events.py
src/orders/order_repository.py
src/orders/order_service.py
src/orders/order_validator.py
src/types/index.ts
tests/conftest.py
tests/test_api.py
tests/test_billing_service.py
20 files · 19,056 bytes
with graph minimal context the benchmark asserts
  1. src/orders/order_service.py 1,578b
    Defines place_order — change goes here
  2. src/orders/order_repository.py 1,493b
    Read path of place_order — caching wraps here
  3. src/cache/cache.py 562b
    Cache abstraction — new dependency
  4. src/cache/policy.py 406b
    Cache policy — defines TTL per namespace
4 files · 4,039 bytes
79% tokens saved
16 fewer files
15,017 bytes saved
How

Three steps. No magic.

  1. Build the graph.

    Clone the repo. Run /coograph-init from any supported tool (Claude Code, Cursor, Copilot, Devin Desktop, Codex CLI, OpenCode, Aider, Cline). Tree-sitter walks every source file.

    $ /coograph-init
    → parsing 47 files…
    → wrote .code-graph/graph.db (1.2 MB)
  2. Query before reading.

    Your agent calls get_minimal_context(task) before any file read. It gets back the 4 files that matter, instead of the 20 that mention the keyword.

    > get_minimal_context("Add caching to OrderService.place_order()")
    → src/orders/order_service.py
    → src/orders/order_repository.py
    → src/orders/order_events.py
    → src/orders/order_validator.py
  3. Auto-update on commit.

    Git hooks re-parse only the files whose SHA-1 changed. Updates take milliseconds.

    $ git commit -m "fix: cache TTL"
    [main 4f3a8c1] fix: cache TTL
    → graph updated in 12ms (2 files re-parsed)
in the box

Retrieval is one of four things.

The graph is what makes an agent read the right files. The other three are about what it does once it has them. All of them are in the same MIT repo, and none of them is a paid tier.

Proof

The benchmark.

Featured task: "Add caching to OrderService.place_order()", fixture bench/fixtures/sample-app/ — one of 3 committed benchmark tasks.

run 2026-08-06 · harness 0.2.0 · fixture f34ca2e

67.9% fewer tokens. 2.8× fewer tool calls. Median across 3 benchmark tasks.

Median across 3 committed benchmark tasks, token counts from a real tokenizer — harness and per-task results committed, not yet published.

Without graph — 20 files / 19,056 bytes

docs/architecture.md 1,409
docs/deployment.md 1,210
migrations/001_initial.sql 1,081
README.md 1,093
src/api/routes.py 1,417
src/api/schemas.py 484
src/audit/audit_log.py 679
src/billing/billing_service.py 1,051
src/billing/invoice.py 546
src/client/order_client.ts 1,245
src/notifications/email.py 720
src/orders/order_dto.py 707
src/orders/order_events.py 631
src/orders/order_service.py 1,276
src/orders/order_validator.py 734
src/types/index.ts 549
tests/conftest.py 355
tests/test_api.py 1,095
tests/test_billing_service.py 1,121
tests/test_order_service.py 1,653
total: 19,056 b · ~4,313 tokens

With graph — 4 files / 3,876 bytes

src/cache/cache.py 593
src/cache/policy.py 429
src/orders/order_repository.py 1,578
src/orders/order_service.py 1,276
total: 3,876 b · ~935 tokens
Methodology

bench/run.py walks every fixture under bench/fixtures/, and for each of the 3 tasks compares the file set returned by grep -l on the task keyword (here "OrderService") against the 4-file minimal context asserted in .bench-manifest.json, reporting byte and token counts (tiktoken/cl100k_base). Headline numbers are medians across tasks. The graph side is the file set each fixture’s manifest asserts is sufficient for the task; the harness does not run the MCP server, so this measures the retrieval target rather than end-to-end tool output. Harness 0.2.0, featured fixture sha f34ca2e7ef40…. The dot (●) marks files appearing in both columns. The harness, its fixtures and this run are committed, but not yet in the public repo — publishing them is tracked as issue 29.

Use cases

Where it wins.

Refactor a hot service

Add caching, rate limiting, or instrumentation to a single class. The graph returns the read path + dependency files; tests, docs, and downstream callers stay out.

> get_minimal_context("Add caching to OrderService.place_order()")
→ src/orders/order_service.py
→ src/orders/order_repository.py
→ src/orders/order_events.py
→ src/orders/order_validator.py

Wire a cross-cutting concern

Add retry, a timeout, or instrumentation to a call that delegates. The graph follows the delegation into the transport wrapper and its policy — the two files a keyword search misses, because neither names the function you started from.

> get_minimal_context("Add retry with backoff to fetchMetrics()")
→ src/api/metricsClient.ts
→ src/types/metrics.ts
→ src/api/http.ts
→ src/hooks/useMetrics.ts

Extend a component or a type

Add a column to a panel, a field to a DTO. The graph returns the component, the type it renders, and the parent that passes it props. Tests and documentation stay out.

> get_minimal_context("Add a column to MetricsPanel")
→ src/components/MetricsPanel.tsx
→ src/types/metrics.ts
→ src/components/Dashboard.tsx
Compare

How it differs.

Coograph is the only MIT-licensed, MCP-native, multi-tool code graph that stores everything in a portable SQLite database.

Different tools, different goals. Here's how Coograph compares on the axes we optimize for.

Open source (MIT)

  • Coograph
  • Sourcegraph ~
    OSS Lite
  • Cursor index
  • Aider repo-map

MCP-native

  • Coograph
  • Sourcegraph
  • Cursor index
  • Aider repo-map

Portable SQLite graph

  • Coograph
  • Sourcegraph
    proprietary index
  • Cursor index
    closed index
  • Aider repo-map ~
    in-memory only

Multi-tool support

  • Coograph
    Claude/Cursor/Copilot/Devin Desktop
  • Sourcegraph ~
  • Cursor index
    Cursor only
  • Aider repo-map ~

Compared against publicly documented features. Sourcegraph: sourcegraph.com. Cursor: cursor.sh. Aider: aider.chat. Honest corrections welcome — open an issue.

Pricing

OSS forever. Pro is services.

Coograph is MIT-licensed and free forever. Everything in the repo is open source.

Coograph Pro is for teams that want bespoke help: custom workflows, custom parsers for in-house languages, and hands-on integration with their AI coding tools. Services, not gated features.

Risk-free intro call. If we can't cut your AI bill 30%+, we'll say so on the call.

Audit · $1,500 · 1 week

/pro/audit/

Not ready for a $20k engagement?

Productized one-week snapshot of your AI coding bill. Benchmark report on your codebase, three concrete wins, honest pro-fit memo. Fixed price, fixed scope, no upsell pressure.

See Coograph Audit

Coograph Pro services

Implementation Sprint

from ~$20k

2–4 weeks

Plug Coograph into your AI coding stack and ship one or two high-value workflows end-to-end.

  • Stack design: Claude Code, Cursor, Copilot, Devin Desktop, internal agents
  • Parsing + graph build for your main codebases
  • get_minimal_context() wired into real tasks
  • Knowledge transfer so engineers iterate without us

Custom Parsers & Integrations

scoped

In-house languages

For teams with in-house languages, heavy framework customization, or legacy systems.

  • Tree-sitter parsers and adapters tuned for your code
  • Graph coverage for non-standard or legacy components
  • Integration into your own agents and internal dev tools

Ongoing Support & Benchmarking

monthly

Retainer

Keep Coograph healthy and prove the impact over time.

  • Priority support for upgrades and graph performance
  • Regular benchmarks on your own repos (tokens, calls, latency)
  • Suggestions on where to apply Coograph next

Engagements typically start at ~$20k for a 2–4 week first phase.

vs ~200 hours of internal engineering — at $150/hr that's $30k of dev time you'd spend before shipping a workflow.

or email hello@coograph.com

FAQ

Common questions.

What does Coograph actually do, in plain English?

Coograph builds a SQLite map of how every file in your codebase depends on every other file — what calls what, what imports what, what tests what. Your AI coding tool asks Coograph "which files do I need for this task?" and gets a 3–6 file list instead of greping 20+ files for a keyword. Fewer files read = fewer tokens spent = lower AI bill and faster, safer changes.

Why is grep not enough?

Grep finds every file that mentions a string. For "OrderService" that's the class itself, every caller, every test, every doc, every SDK type — most of them irrelevant to the change you're making. AI tools that grep then read everything to be safe end up paying for the whole codebase, every task. A graph returns only the files in the relevant dependency neighborhood.

How much does this actually save on AI coding bills?

Median across the 3 committed benchmark tasks, Coograph cuts tokens by ~68% and tool calls by ~2.8× versus a naive grep + read flow. Real savings depend on repo size and task type, but the pattern holds: the bigger the repo and the more focused the change, the bigger the saving.

Who is Coograph for?

Solo developers and indie hackers paying for Claude Max, Cursor Pro, or per-token API access who watch their AI bill climb. Engineering leaders evaluating AI tooling for teams and worried about the cost-per-developer math. Anyone whose AI tool feels slow because it reads too much before doing anything.

Is Coograph open source? What does Pro actually cost?

Yes — MIT-licensed, free forever. Everything in the repo is open source; there are no gated features. Coograph Pro is services: bespoke integration, custom parsers for in-house languages, and ongoing benchmarking. Engagements typically start around $20k for a 2–4 week first phase. If we can't cut your AI bill meaningfully on a call, we say so.

How long does install actually take?

Five minutes if you already have one of the supported AI tools (Claude Code, Cursor, Copilot, Devin Desktop, Codex CLI, OpenCode, Aider, Cline). Clone Coograph as a sibling directory, run /coograph-init from your tool, let it build the graph, done. The graph re-parses changed files automatically on every commit via a git hook.