{
  "markdown": "# DataCharter\n\n> **Query all your data locally — then hand your AI agents exactly the data you choose, and not one column more.**\n\n_**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._\n\n<!-- mcp-name: io.github.datacharter/datacharter -->\n\n[![PyPI](https://img.shields.io/pypi/v/datacharter)](https://pypi.org/project/datacharter/)\n[![Python](https://img.shields.io/pypi/pyversions/datacharter)](https://pypi.org/project/datacharter/)\n[![License: Apache-2.0](https://img.shields.io/badge/License-Apache_2.0-blue)](LICENSE)\n[![DataCharter MCP server on Glama](https://glama.ai/mcp/servers/datacharter/datacharter/badges/score.svg)](https://glama.ai/mcp/servers/datacharter/datacharter)\n\n**[datacharter.dev](https://datacharter.dev)** · [Desktop app (beta)](https://datacharter.dev/desktop.html) · [Docs](https://datacharter.dev/quickstart.html) · [Blog](https://datacharter.dev/blog/) · [CI Action](https://github.com/marketplace/actions/datacharter-data-checks)\n\n*The big-words version: a local, federated data explorer with governed\nagent data access, powered by **[DuckDB](https://duckdb.org)**.* Here's what that\nactually means 👇\n\n**🔍 Query all your data, locally — no pipelines, no warehouse, no waiting**\n\n- Local CSV, Parquet, JSON, and Excel files — or drag one onto the window\n- Postgres, MySQL, SQLite, SQL Server, Snowflake, BigQuery, DuckDB, Iceberg, Delta — and more\n- JOIN a local CSV → a Snowflake table → a Parquet file in S3, in **one** SQL statement, all on your laptop\n- Yes, it's as unreasonable as it sounds. You kind of have to try it to believe it.\n\n**🤖 Connect an agent — and decide exactly what it's allowed to see**\n\n- **Claude Code** — runs on your existing subscription, no API key\n- A model running **fully local** with [Ollama](https://ollama.com)\n- Any **OpenAI-compatible** agent\n- Grant or deny access in the UI *or* right in your data contracts, at every level: whole **sources** → individual **tables** → individual **columns**\n- **PII is auto-detected and defaulted to *no agent access*** — override per field if you really mean to\n- **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](examples/ecommerce).\n- **Or let the guide write itself.** `datacharter suggest` mines your query history for the habits you repeat and turns them into guide lines — with evidence, offline, no model required.\n- **Measure the lift.** `datacharter eval --compare-guides` scores the agent on questions you write and shows how much your guides moved accuracy — locally, and as a CI gate. See [Agent evals](https://datacharter.dev/evals.html).\n- **Prove it happened.** A tamper-evident [flight recorder](https://datacharter.dev/audit.html) logs every agent access — dual attribution, masked columns, hash-chained — with `datacharter audit verify` and one-command evidence packs.\n- **Know the moment it fails.** Opt-in [canary tripwires](https://datacharter.dev/audit.html) plant masked honeytokens; if one ever escapes to agent output, you get a tamper-evident alarm — and block mode withholds the response.\n- **Clean-room math, one YAML line.** [Policies](https://datacharter.dev/policies.html) like `aggregates only` and `groups of at least 10` are enforced by query analysis — k-anonymity suppression and join limits, written in plain English.\n- **Answers from definitions, not guesswork.** Declare `metrics:` once and agents call `query_metric` — so \"revenue\" means the same governed SELECT every time, masking and policies still applied.\n- **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.\n- **Code-review agent access itself.** `datacharter access diff` is *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 widened` blocks the PR. Your governance is a file in git, so it can be reviewed like any other change.\n- 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 `•••`.)*\n\n## Wait, there's more!\n\nBeyond local federation and governed agent access, you also get:\n\n- **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.\n- **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.\n- **Know the cost before you run.** One click estimates how many rows a query will scan and warns before a big one.\n- **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.\n- **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.\n- **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.\n- **Save, reuse, export.** Snapshot a result as a reusable local table; export to CSV, Parquet, JSON, or XLSX.\n- **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](https://github.com/marketplace/actions/datacharter-data-checks) into your workflow and let a broken contract block the PR.\n\n![DataCharter — live SQL preview, auto-charts, per-query provenance, and PII masking](https://raw.githubusercontent.com/datacharter/datacharter/main/brand/demo.gif)\n\n**Status: pre-release.** V1 in development.\n\n## Quick start\n\n> **No terminal? [Download the desktop app](https://github.com/datacharter/datacharter/releases/latest)** (beta) for macOS or Windows — the same governed explorer in a native window. [Desktop docs](https://datacharter.dev/desktop.html).\n\n\n```sh\n# Try it instantly on generated demo data — no install, no config:\nuvx datacharter serve          # needs `uv` → https://astral.sh/uv\n# → serves at http://127.0.0.1:8321 (open it in your browser)\n\n# Or install it:\nbrew install datacharter/tap/datacharter   # macOS (Homebrew)\npip install datacharter                     # Python 3.11+ (any OS)\n\n# Start your own workspace:\ndatacharter init               # scaffolds charter.yaml, queries/, .env.example\n# → add a source: edit charter.yaml, or use the \"Sources\" panel in the UI\ndatacharter serve              # → http://127.0.0.1:8321\n```\n\nThen, once it's running, **drag a CSV, Parquet, or JSON file onto the window** to\nquery it instantly — no config needed.\n\n**Optional natural-language agent** — point it at any OpenAI-compatible endpoint:\n\n```sh\nexport OPENAI_BASE_URL=...     # any OpenAI-compatible API\nexport OPENAI_API_KEY=...\ndatacharter serve\n```\n\n…or run **fully local** — no API key, no data leaves your machine (requires\n[Ollama](https://ollama.com)):\n\n```sh\nollama pull qwen3:8b           # once\ndatacharter serve --local      # qwen3:8b by default (--model to change)\n```\n\n## Why DataCharter\n\n- **Your contracts are the catalog.** `charter.yaml` describes sources, tables,\n  and PII fields — the same contract spec your data team already writes, so\n  there's no separate metadata store to maintain.\n- **Real federation, not just a shared connection.** Filters and projections are\n  pushed down to each source — even across a cross-source join, every leg is\n  filtered where its data lives. (Snowflake runs via connector extract,\n  `datacharter[snowflake]`, with the same pushdown into the extract.)\n- **Local-first.** One process, your machine, no cloud dependency. The optional\n  `--local` agent runs a small open model via Ollama — no API key, no data leaves\n  your machine.\n- **The workspace is a directory.** `charter.yaml` + `queries/*.sql` +\n  `.env.example` — commit it, clone it, `datacharter serve`. Your team's whole\n  exploration environment travels as a repo; secrets and local state never do.\n\nDataCharter governs and audits your data, not just displays it. The full command\nset (`drift`, `scan`, `diff`, `metric`, `mcp`, `access diff`, `redteam`, and more)\nis in the [CLI reference](docs/cli.md); the security model is in\n[security](docs/security.md).\n\n## Built on\n\nDataCharter stands on excellent open-source foundations:\n\n- **[DuckDB](https://duckdb.org)** — the analytical engine at our core:\n  federation (`ATTACH`), file formats, Iceberg/Delta, encryption, autocomplete.\n- **[Open Data Contract Standard](https://bitol-io.github.io/open-data-contract-standard/)** /\n  [datacontract.com](https://datacontract-specification.com/) — the contract format `charter.yaml` speaks.\n- **[Model Context Protocol](https://modelcontextprotocol.io)** — the open protocol\n  the `datacharter mcp` server speaks to agents and MCP clients.\n- **[Vega-Lite](https://vega.github.io/vega-lite/)** — declarative charting.\n- **[Monaco Editor](https://microsoft.github.io/monaco-editor/)** — the SQL editor.\n- **[TanStack Table & Virtual](https://tanstack.com/)** — the virtualized results grid.\n- And the Python & React ecosystems — FastAPI, pydantic, httpx, keyring, and\n  ruamel.yaml on the backend; React and Vite on the front.\n\nTesting uses **[VidaiMock](https://github.com/vidaiUK/VidaiMock)**, an\nApache-2.0 mock LLM server, as the offline agent endpoint in CI.\n\nDuckDB is a trademark of the DuckDB Foundation. DataCharter is an independent\nproject and is not affiliated with or endorsed by the DuckDB Foundation.\n\n## Privacy\n\nDataCharter runs entirely on your machine. It collects **no** data, sends **no**\ntelemetry, and operates **no** servers — your data, queries, and credentials never\nleave your control except to the sources you configure or a model provider you\nexplicitly enable. Full policy: **[Privacy Policy](https://datacharter.dev/privacy)**.\n\n## License\n\n[Apache-2.0](LICENSE)\n",
  "bytes": 10693,
  "sha": "644e4c254f6adfcb0e66bbdacda4b04e95190f7cdf5477fad7d2ffbbc79acde3",
  "repo_slug": "datacharter/datacharter",
  "fonte": "repo",
  "truncated": false,
  "api": "https://agentalog.com/api/listings/mcp_io_github_datacharter_datacharter_21d7f79d/readme"
}