pypi datacharterstdioApache-2.0updated 13d ago
Query all your data locally β then hand your AI agents exactly the data you choose, and not one column more.
What can you do with DataCharter?
DataCharter
Query all your data locally β then hand your AI agents exactly the data you choose, and not one column more.
The governed data plane for AI agents: a local SQL workspace over every file and database you have, federated by DuckDB and governed by a charter.yaml contract β so agents get read-only, PII-masked access to exactly what the contract grants.
datacharter.dev Β· Desktop app (beta) Β· Docs Β· Blog Β· CI Action
The big-words version: a local, federated data explorer with governed agent data access, powered by DuckDB. Here's what that actually means π
π Query all your data, locally β no pipelines, no warehouse, no waiting
- Local CSV, Parquet, JSON, and Excel files β or drag one onto the window
- Postgres, MySQL, SQLite, SQL Server, Snowflake, BigQuery, DuckDB, Iceberg, Delta β and more
- JOIN a local CSV β a Snowflake table β a Parquet file in S3, in one SQL statement, all on your laptop
- Yes, it's as unreasonable as it sounds. You kind of have to try it to believe it.
π€ Connect an agent β and decide exactly what it's allowed to see
- Claude Code β runs on your existing subscription, no API key
- A model running fully local with Ollama
- Any OpenAI-compatible agent
- Grant or deny access in the UI or right in your data contracts, at every level: whole sources β individual tables β individual columns
- PII is auto-detected and defaulted to no agent access β override per field if you really mean to
- Teach it your data's quirks. Markdown guides in
guides/*.md("revenue is net of refunds", "exclude QA accounts") reach every agent β chat, Claude Code, and MCP clients alike. Start from the end-to-end example. - Or let the guide write itself.
datacharter suggestmines your query history for the habits you repeat and turns them into guide lines β with evidence, offline, no model required. - Measure the lift.
datacharter eval --compare-guidesscores the agent on questions you write and shows how much your guides moved accuracy β locally, and as a CI gate. See Agent evals. - Prove it happened. A tamper-evident flight recorder logs every agent access β dual attribution, masked columns, hash-chained β with
datacharter audit verifyand one-command evidence packs. - Know the moment it fails. Opt-in canary tripwires plant masked honeytokens; if one ever escapes to agent output, you get a tamper-evident alarm β and block mode withholds the response.
- Clean-room math, one YAML line. Policies like
aggregates onlyandgroups of at least 10are enforced by query analysis β k-anonymity suppression and join limits, written in plain English. - Answers from definitions, not guesswork. Declare
metrics:once and agents callquery_metricβ so "revenue" means the same governed SELECT every time, masking and policies still applied. - Attack your own governance.
datacharter redteamβ the Gauntlet β fires a battery of PII-exfiltration, read-only-bypass, and policy-evasion attacks through the real tool path and hands you a report card. Exits non-zero on any breach β a CI gate that proves your governance still holds. - Code-review agent access itself.
datacharter access diffis terraform plan for AI data access: it diffs the effective agent-visible surface between two charter versions β a table granted, a PII column unmasked, a policy loosened β and--fail-on widenedblocks the PR. Your governance is a file in git, so it can be reviewed like any other change. - Don't take our word for it: flip on Agent view and see, column by column, exactly what your agent gets back when it runs a query. (Spoiler: the PII comes back
β’β’β’.)
Wait, there's more!
Beyond local federation and governed agent access, you also get:
- See answers as you type. Live results preview while you write SQL, one-click auto-charts, and a profiling panel β missing values, distributions, outliers, and per-column top-value bars β no separate BI tool.
- Never lose a query. Every run is saved to a local history you can reopen, and a βK command palette jumps to any table or action.
- Know the cost before you run. One click estimates how many rows a query will scan and warns before a big one.
- Safe by design. The engine is read-only by construction β no query can write, delete, or touch the filesystem β so pointing an AI (or a teammate) at your real databases can't do damage.
- Point other AI tools at your data, too. A governed MCP server exposes the same read-only, PII-masked query tools to Cursor, Cline, or your own agent.
- Every agent answer is reproducible. The chat shows the exact SQL the agent ran, with one click to open it in the editor β and each result shows which source columns it read, so you always know where a number came from.
- Save, reuse, export. Snapshot a result as a reusable local table; export to CSV, Parquet, JSON, or XLSX.
- Governance you can automate. From the command line: assert data quality (
datacharter test), catch schema/PII drift in CI, diff data across sources, trace cross-source lineage, and define certified metrics. Or drop the GitHub Action into your workflow and let a broken contract block the PR.

Status: pre-release. V1 in development.
Quick start
No terminal? Download the desktop app (beta) for macOS or Windows β the same governed explorer in a native window. Desktop docs.
# Try it instantly on generated demo data β no install, no config:
uvx datacharter serve # needs `uv` β https://astral.sh/uv
# β serves at http://127.0.0.1:8321 (open it in your browser)
# Or install it:
brew install datacharter/tap/datacharter # macOS (Homebrew)
pip install datacharter # Python 3.11+ (any OS)
# Start your own workspace:
datacharter init # scaffolds charter.yaml, queries/, .env.example
# β add a source: edit charter.yaml, or use the "Sources" panel in the UI
datacharter serve # β http://127.0.0.1:8321
Then, once it's running, drag a CSV, Parquet, or JSON file onto the window to query it instantly β no config needed.
Optional natural-language agent β point it at any OpenAI-compatible endpoint:
export OPENAI_BASE_URL=... # any OpenAI-compatible API
export OPENAI_API_KEY=...
datacharter serve
β¦or run fully local β no API key, no data leaves your machine (requires Ollama):
ollama pull qwen3:8b # once
datacharter serve --local # qwen3:8b by default (--model to change)
Why DataCharter
- Your contracts are the catalog.
charter.yamldescribes sources, tables, and PII fields β the same contract spec your data team already writes, so there's no separate metadata store to maintain. - Real federation, not just a shared connection. Filters and projections are
pushed down to each source β even across a cross-source join, every leg is
filtered where its data lives. (Snowflake runs via connector extract,
datacharter[snowflake], with the same pushdown into the extract.) - Local-first. One process, your machine, no cloud dependency. The optional
--localagent runs a small open model via Ollama β no API key, no data leaves your machine. - The workspace is a directory.
charter.yaml+queries/*.sql+.env.exampleβ commit it, clone it,datacharter serve. Your team's whole exploration environment travels as a repo; secrets and local state never do.
DataCharter governs and audits your data, not just displays it. The full command
set (drift, scan, diff, metric, mcp, access diff, redteam, and more)
is in the CLI reference; the security model is in
security.
Built on
DataCharter stands on excellent open-source foundations:
- DuckDB β the analytical engine at our core:
federation (
ATTACH), file formats, Iceberg/Delta, encryption, autocomplete. - Open Data Contract Standard /
datacontract.com β the contract format
charter.yamlspeaks. - Model Context Protocol β the open protocol
the
datacharter mcpserver speaks to agents and MCP clients. - Vega-Lite β declarative charting.
- Monaco Editor β the SQL editor.
- TanStack Table & Virtual β the virtualized results grid.
- And the Python & React ecosystems β FastAPI, pydantic, httpx, keyring, and ruamel.yaml on the backend; React and Vite on the front.
Testing uses VidaiMock, an Apache-2.0 mock LLM server, as the offline agent endpoint in CI.
DuckDB is a trademark of the DuckDB Foundation. DataCharter is an independent project and is not affiliated with or endorsed by the DuckDB Foundation.
Privacy
DataCharter runs entirely on your machine. It collects no data, sends no telemetry, and operates no servers β your data, queries, and credentials never leave your control except to the sources you configure or a model provider you explicitly enable. Full policy: Privacy Policy.
License
Install
Add DataCharter to your client. Pick the one you use.
claude mcp add datacharter -- uvx datachartercodex mcp add datacharter -- uvx datacharteramp mcp add datacharter -- uvx datacharter{
"mcpServers": {
"datacharter": {
"command": "uvx",
"args": [
"datacharter"
]
}
}
}Add to `claude_desktop_config.json`, then restart Claude Desktop.
{
"mcpServers": {
"datacharter": {
"command": "uvx",
"args": [
"datacharter"
]
}
}
}Add to `~/.cursor/mcp.json`, or `.cursor/mcp.json` for a single project.
code --add-mcp '{"name":"datacharter","command":"uvx","args":["datacharter"]}'Or add the block manually to `.vscode/mcp.json` under `servers`.
{
"mcpServers": {
"datacharter": {
"command": "uvx",
"args": [
"datacharter"
]
}
}
}Add to `~/.codeium/windsurf/mcp_config.json`.
{
"mcpServers": {
"datacharter": {
"command": "uvx",
"args": [
"datacharter"
]
}
}
}Add to `cline_mcp_settings.json` via the MCP Servers panel.
{
"mcpServers": {
"datacharter": {
"command": "uvx",
"args": [
"datacharter"
]
}
}
}Add to `~/.gemini/settings.json`.
{
"mcpServers": {
"datacharter": {
"type": "local",
"command": "uvx",
"args": [
"datacharter"
],
"tools": [
"*"
]
}
}
}Add to `~/.copilot/mcp-config.json`, or run `/mcp add` inside the CLI.
{
"context_servers": {
"datacharter": {
"command": {
"path": "uvx",
"args": [
"datacharter"
]
}
}
}
}Add to your Zed `settings.json`.
uvx datacharterRun `goose configure`, choose **Add Extension β Command-line Extension**, and paste this command.
Score
39 / 100
Incomplete
- Documentation25/25
- Maintenance25/25
- Trust16/20
- Capability0/15
- Install experience12/15
- Documents what it does and how to connect
- Has a resolvable package or endpoint
- Exposes at least one tool, prompt or resource
- README has substantive content
- Includes a code example
- Documents its configuration
- Mentions credentials or security posture
- Last commit 5 days ago
- Has a release history
- Repository is not archived
- Licensed Apache-2.0
- Namespace verified in the official MCP registry
- Claimed by its owner
- Published under an organisation
- 0 tool(s) documented
- Provides prompt templates
- Provides resources
- 12 documented install method(s)
- Published to a package registry
- Offers a hosted endpoint β no local install
Version history
| Versions | Published |
|---|---|
| 0.41.0 | Aug 13, 2026 |
| 0.40.0 | Aug 13, 2026 |
| 0.39.0 | Aug 13, 2026 |
| 0.38.0 | Aug 13, 2026 |
| 0.37.0 | Aug 13, 2026 |
| 0.36.0 | Aug 13, 2026 |
| 0.35.0 | Aug 13, 2026 |
| 0.34.0 | Aug 13, 2026 |
| 0.33.0 | Aug 13, 2026 |
| 0.32.0 | Aug 13, 2026 |
| 0.31.1 | Aug 13, 2026 |
| 0.29.0 | Aug 12, 2026 |
| 0.28.0 | Aug 12, 2026 |
| 0.26.0 | Aug 12, 2026 |
| 0.24.15 | Aug 12, 2026 |
| 0.24.14 | Aug 12, 2026 |
| 0.24.13 | Aug 12, 2026 |
| 0.24.12 | Aug 12, 2026 |
| 0.24.11 | Aug 12, 2026 |
| 0.24.10 | Aug 12, 2026 |
| 0.24.9 | Aug 12, 2026 |
| 0.24.8 | Aug 12, 2026 |
| 0.24.7 | Aug 12, 2026 |
| 0.24.6 | Aug 12, 2026 |
| 0.24.5 | Aug 8, 2026 |
| 0.24.4 | Aug 8, 2026 |
| 0.24.3 | Aug 8, 2026 |
| 0.24.2 | Aug 8, 2026 |
| 0.24.1 | Aug 8, 2026 |
| 0.24.0 | Aug 8, 2026 |
| 0.23.7 | Aug 6, 2026 |
| 0.23.6 | Aug 6, 2026 |
| 0.23.5 | Aug 6, 2026 |
| 0.23.4 | Aug 4, 2026 |
| 0.23.3 | Aug 4, 2026 |
| 0.23.2 | Aug 4, 2026 |
| 0.23.1 | Aug 4, 2026 |
| 0.23.0 | Aug 4, 2026 |
| 0.22.3 | Aug 4, 2026 |
| 0.22.2 | Aug 4, 2026 |
| 0.22.1 | Aug 4, 2026 |
| 0.22.0 | Aug 4, 2026 |
| 0.21.0 | Aug 4, 2026 |
| 0.20.0 | Aug 4, 2026 |
| 0.19.2 | Aug 4, 2026 |
| 0.19.1 | Aug 4, 2026 |
| 0.19.0 | Aug 4, 2026 |
| 0.18.3 | Aug 3, 2026 |
| 0.18.2 | Aug 2, 2026 |
| 0.18.1 | Aug 2, 2026 |
| 0.18.0 | Aug 2, 2026 |
| 0.17.0 | Aug 1, 2026 |
| 0.16.0 | Aug 1, 2026 |
| 0.15.0 | Aug 1, 2026 |
| 0.14.0 | Aug 1, 2026 |
| 0.13.0 | Jul 30, 2026 |
| 0.12.0 | Jul 29, 2026 |
| 0.11.0 | Jul 29, 2026 |
| 0.10.4 | Jul 28, 2026 |
| 0.10.3 | Jul 28, 2026 |