DataCharter — Claude Code MCP server: what it does, how to install
Federates local files and databases via DuckDB, granting AI assistants read-only analytical access while redacting private identifiers under strict contract rules.
claude mcp add datacharter -- uvx datacharterWhat DataCharter does
DataCharter turns files and external databases into an accessible analytical environment powered by DuckDB. The setup operates under a declarative contract stored in charter.yaml. The agent receives strictly read-only permissions and sees sanitized tokens like ••• in place of sensitive information.
The entire workspace lives in a local folder alongside queries/ and guides/. You can track it in git without checking in credentials. Beyond standalone usage, the binary can run as an HTTP endpoint or serve as a protective wrapper around other MCP tools via the --guard flag.
DataCharter is currently a pre-release project and requires Python 3.11 or newer. Exposing its HTTP interface beyond 127.0.0.1 requires active OAuth environment variables, otherwise external requests are rejected.
What it helps with
- mask sensitive customer details and private columns before agent inspection
- run unified DuckDB queries across distinct local databases and tabular files
- enforce strict read-only query permissions during automated analysis
- guard third-party MCP endpoints using granular schema rules
Example prompts for the agent
- Run a DuckDB query to calculate average order values grouped by state.
- Inspect the available schema from
charter.yamlwithout revealing masked columns. - Summarize monthly sales trends from local files using aggregates only.
How to install DataCharter
Platform CLI
claude mcp add datacharter -- uvx datacharteruvx runs the command named after the package; if the README names another one, use uvx --from datacharter <command>
Platform CLI
codex mcp add datacharter -- uvx datacharteruvx runs the command named after the package; if the README names another one, use uvx --from datacharter <command>
Config file
{
"mcpServers": {
"datacharter": {
"command": "uvx",
"args": [
"datacharter"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from datacharter <command>
Config file
{
"servers": {
"datacharter": {
"type": "stdio",
"command": "uvx",
"args": [
"datacharter"
]
}
}
}uvx runs the command named after the package; if the README names another one, use uvx --from datacharter <command>
Platform CLI
gemini mcp add datacharter uvx datacharteruvx runs the command named after the package; if the README names another one, use uvx --from datacharter <command>
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about DataCharter
How do I install DataCharter in Claude Code?
Run claude mcp add datacharter -- uvx datacharter in your terminal. You will need Python 3.11 or the uv package runner installed on your system.
How does DataCharter handle sensitive columns?
Permissions are defined in charter.yaml using a default-deny policy. When an agent queries a protected column, the server masks the private values with •••.
Can DataCharter shield other MCP servers?
Yes, you can run it as a security wrapper around any command. Pass the secondary server executable to --guard, such as datacharter mcp --guard "npx -y some-mcp-server".