
Brownfield Cartographer
io.github.Sanoy24Published by GitHub account Sanoy24v0.10.0Updated Nov 4, 2026
Local impact and table, column and Airflow lineage for SQL, dbt, Python and TypeScript repos.
Overview
Read-only MCP server that answers impact and data-lineage questions over a locally analyzed SQL, dbt, Python and TypeScript repository.
- What you can do
- Inspect repository architecture and find symbols by lexical match
- Trace dependencies and analyze what a change could affect
- Trace table and column lineage upstream or downstream, with file and line evidence
- Retrieve code context for a symbol or file
- Read a previously built local index; it never calls a model or executes repository code
- When to use it
- Useful when an assistant needs to reason about cross-language data dependencies in an existing codebase — for example what breaks if a dbt model, SQL statement, Python job or Airflow task changes, or where a table or column comes from.
- Requirements
- Runs as a local stdio process (PyPI package brownfield-cartographer, launched with uvx or the cartographer-mcp command) and needs Python 3.12+ and Git. The repository must first be analyzed with the cartographer analyze command, and the server is pointed at it with a repository path argument. No API key or network access is needed for local analysis.
Installation
In SourceWeft
- Open Brownfield Cartographer in the dashboard and add it to a workspace.
- Enable the server for the chats that should use its tools.
Desktop only via STDIO. STDIO servers start a local process, so they need the SourceWeft desktop host.
Other MCP clients
Follow the launch instructions in the repository.
README
Brownfield Cartographer
[CI] [License: Apache-2.0] [Python 3.12+]
[Brownfield Cartographer MCP server]
What breaks if I change this? Cartographer finds the dependencies your language server can't see: a table written by a Python job, transformed in SQL, consumed by a dbt model. It maps them statically and locally, with file and line evidence, for you and your coding agent.
Language servers and grep answer questions about code symbols. Cartographer answers questions that cross language boundaries through names in strings and configuration, starting with data lineage across Python, SQL and dbt. Every result carries source evidence and coverage, and unsupported cases are reported rather than guessed. It runs offline, needs no API key, and never executes repository code.
One query engine serves the CLI, a Python API, and a read-only MCP server for Claude Code, Codex and Cursor. The support table below lists current capabilities and known gaps.
Try it in 60 seconds
With uv installed, run it on dbt's public example project. Nothing is installed permanently, and analysis took 3 seconds here:
Column lineage follows renames through each model:
In Claude Code, the plugin lets you ask the same questions in plain language.
Install and analyze
Requires Python 3.12+ and Git. Install the command-line tools from PyPI with uv or pipx:
To run from a source checkout instead,
clone the repository, run uv sync --frozen, and prefix commands with uv run,
as in the examples below.
An explicit GitHub URL input still downloads a checkout:
Local analysis never uploads source and never calls a model.
Outputs and queries
For a local checkout, artifacts default to
<repository>/.cartography/<repository-name>/. With an explicit --output,
local repositories use <output-root>/.cartography/<repository-name>--<path-hash>/
so same-named checkouts do not overwrite one another. The hash identifies the
resolved checkout path; moving a checkout creates a separate index. The JSON
analysis result includes artifact_directory, which can be passed to query
commands as --index-dir. Existing custom-output indexes are left untouched;
reanalyzing writes to the new directory. GitHub URL inputs use the current
directory by default and an owner--repository folder name.
Explore interactively with cartographer query /path/to/repository. It accepts
find, impact, deps, dependents, lineage, lineage-down, context,
overview, help and quit, using the same engine as the commands below.
Or use individual commands with human-readable or JSON output:
Use --index-dir for a custom output location. Python callers use
brownfield_cartographer.query_api.QueryEngine.open(Path(repo)) and the same
query methods. Responses carry snapshot identity, coverage, capped-output
markers, and available source evidence. Ambiguous targets are rejected.
Review pull requests
cartographer diff reports what a branch changes and what that can affect,
for a PR comment or a quick check before pushing:
Changed lines since the merge base with --base (committed, uncommitted and
untracked) are mapped to functions, modules, SQL statements, dbt models, schema
YAML and Airflow tasks, and their downstream dependents are listed with
evidence. The merge base is analyzed too, so removed code counts: deleting a
module, function or model reports the importers, callers and models that still
use it.
To comment on every pull request, add a workflow:
The action keeps one comment up to date and also writes the report to the job summary, which still works for pull requests from forks.
Connect your AI assistant
Claude Code plugin (needs uv; nothing else to install or configure):
The plugin starts the MCP server for the current project and adds a
data-impact skill. Ask questions such as "what breaks if I change
stg_orders?". If the project has not been analyzed yet, the tools say so and
the assistant runs cartographer analyze (offline; repository code is never
executed) before answering.
Any MCP host:
The stdio server exposes get_architecture, find_symbol, trace_dependencies,
analyze_impact, trace_data_lineage, and get_code_context. It reads a
previously analyzed index inside a fixed repository scope and never calls a
model. See MCP setup for Claude Code, Codex, and Cursor.
find is lexical matching. impact reports potential dependents, not a
guarantee that every consumer will break. Read the persisted coverage and
diagnostics before relying on results from an incomplete scan.
Analysis returns exit code 0 for complete/unchanged snapshots, 2 for partial coverage, and 1 for an input or fatal run error. A partial run does not advance the successful checkpoint. Changed working trees currently use full rebuilds; unchanged successful snapshots can reuse the complete index.
Support and safety
The shared scanner respects nested .gitignore and .cartographerignore, prunes
build/environment directories, rejects symlinks/junctions, and caps file size,
total bytes, file count, entry count and traversal depth. Conventional secret
filenames are excluded; secrets embedded in normal source are not detected.
Large, binary, unreadable or unsupported files are reported rather than treated
as fully analyzed. No repository source code is executed by local analysis.
See dbt artifact ingestion for supported manifest versions, dataset identifiers, artifact freshness, and scanner limits.
The accuracy benchmark scores extraction against hand-written expected results for pinned dbt, Python and SQL corpora, including known gaps. It runs in CI.
Development and branching
Use short-lived feat/, fix/, docs/, and chore/ branches and pull requests
into stable main. Do not push feature work directly to main. See
CONTRIBUTING.md for the workflow and release conventions,
and CHANGELOG.md for release history.
Community and license
Participation is governed by the Code of Conduct. Report vulnerabilities privately as described in SECURITY.md.
Licensed under the Apache License 2.0.
Source: README.md at commit 397bd4a
Tools
0Version history
3- v0.10.0LatestNov 4, 2026
- v0.9.0Oct 25, 2026
- v0.8.0Oct 14, 2026
Score
50% of the applicable checks met
How complete this listing is, computed from the registry entry, the endpoint and public sources. Not a rating of the server and not a statement that it is safe or working today: reachability is a dated check, and no installs or reviews go into the score.
- Reached in the last 30 days25 pts
Keep the endpoint answering the MCP handshake; SourceWeft probes it every 30 days.
- Auth declared10 pts
Declare the credential headers in the registry entry, or keep the endpoint answering the probe so its auth can be classified.
- Tools listed15 pts
Answer tools/list without a credential, or ship a package that starts in a sandbox without one.
- DescriptionRequired15 pts
- Logo10 pts
- Documentation15 pts
- License10 pts