trackmcp
Back to directory
dhavanikgithub

chartbrew-mcp

View on GitHub

Chartbrew + AI agents. MCP server exposing Chartbrew's documented API: teams, connections, datasets, dashboards, charts, live queries, and secure embedding. TypeScript · stdio · restricted/unrestricted tool modes.

1 stars TypeScriptOthers Updated Jul 30, 2026
ai-agentai-toolsanalyticsclaudeclaude-codecursordashboarddashboardsdata-visualizationgithub-copilotllmmcpmcp-servermodel-context-protocoltypescriptchartbrewchartchartjscharts

Documentation

The exposes 's documented API to AI coding agents and MCP-compatible clients — letting them list and inspect teams, connections, datasets, dashboards, and charts, run live queries, fetch data, manage share policies/tokens for secure embedding, and create or update resources, all through natural language.

Chartbrew MCP Server

TypeScript MCP server built on the official MCP SDK for documented Chartbrew API endpoints.

Showcase

Chartbrew MCP in action — managing analytics resources through natural language.

Prerequisites

  • Node.js and npm installed (used to install dependencies and build the server).
  • A Chartbrew API key — create one in your Chartbrew account (cloud or self-hosted). See How to create API keys in Chartbrew.
  • For a self-hosted Chartbrew instance, the API base URL of that instance (default `http://localhost:4019`).
  • An MCP-compatible client to host the server (e.g. Claude Code, Claude Desktop, Cursor, VS Code, Codex, GitHub Copilot, OpenCode, Kimi Code).

Scope

This server only implements operations documented in the official Chartbrew API reference and avoids undocumented behavior.

Implemented resources:

  • Teams: list, get
  • Connections: list, get, test, create, update, delete
  • Datasets: list, get, fetch data, create, update, delete
  • Data Requests: list, run
  • Dashboards (projects): list, get, create, update, delete
  • Charts: get, create, query, delete

Not implemented in this version:

  • Variable binding create/update endpoints

These can be added later if needed.

Authentication

Chartbrew API docs specify Bearer token authentication.

Required header used by this server:

  • Authorization: Bearer

Configuration Options

VariableDescriptionRequired
`CHARTBREW_API_KEY`Chartbrew API key used for Bearer token authenticationYes
`CHARTBREW_API_BASE_URL`API base URL. Use `https://api.chartbrew.com` for an official Chartbrew cloud account, or your self-hosted URL (default `http://localhost:4019`; change the port if yours differs)No (default: `https://api.chartbrew.com`)
`CHARTBREW_REQUEST_TIMEOUT_MS`Request timeout in milliseconds to prevent hanging requestsNo (default: `30000`)
`CHARTBREW_TOOL_MODE`Tool exposure mode. Allowed values: `restricted`, `unrestricted`. If unset or set to any value other than `unrestricted`, the server runs in `restricted` modeNo (default: `restricted`)

Tool mode behavior:

  • unrestricted: all implemented tools are available.
  • restricted: only data-retrieval/query tools are available (list/get/fetch/query/run/test). Create/update/delete tools are disabled.

You can provide these values in either of two ways (pick one):

  • `.env` file in this `mcp` folder — copy `.env-template` to `.env` and fill in the values. The server auto-loads it on startup.
  • The `env` block of your coding agent's MCP config — set the variables directly in the `env` object of the server entry (e.g. `.mcp.json` for Claude Code, or the equivalent MCP config for Codex, GitHub Copilot, OpenCode, Kimi Code, etc.). Use this when you don't want a local `.env` file.

Install

1. Change directory to `mcp`.

2. Install dependencies:

bash
npm install

3. Build:

bash
npm run build

4. Run

bash
npm start

The server uses stdio transport and is intended to be launched by an MCP client host.

Standalone binary (no Node.js required)

Prefer not to install Node.js? Download a prebuilt binary from the Releases page and run it directly. Binaries are provided for:

OSx64 (Intel/AMD)arm64 (Apple Silicon / ARM)
Windows`chartbrew-mcp-windows-x64.exe``chartbrew-mcp-windows-arm64.exe`
Linux`chartbrew-mcp-linux-x64``chartbrew-mcp-linux-arm64`
macOS`chartbrew-mcp-darwin-x64``chartbrew-mcp-darwin-arm64`

Setup:

Releases include both raw binaries and compressed archives (`.zip` for Windows, `.tar.gz` for Linux/macOS) — grab the archive for a smaller download, then extract it.

  • Windows: download `chartbrew-mcp-windows-x64.zip` (or `arm64`), extract, run the `.exe`.
  • macOS / Linux: download e.g. `chartbrew-mcp-darwin-arm64.tar.gz`, extract, then make it executable once: `chmod +x chartbrew-mcp-darwin-arm64`
  • macOS Gatekeeper: if macOS blocks the unsigned binary, remove the quarantine attribute: `xattr -d com.apple.quarantine chartbrew-mcp-darwin-arm64`

You do not need a `.env` file — set configuration through your MCP client's `env` block (or the OS environment). Example for Claude Desktop / Claude Code (`.mcp.json` or `claude_desktop_config.json`):

json
{
  "mcpServers": {
    "chartbrew": {
      "command": "/absolute/path/to/chartbrew-mcp-darwin-arm64",
      "env": {
        "CHARTBREW_API_KEY": "your-api-key",
        "CHARTBREW_API_BASE_URL": "https://api.chartbrew.com",
        "CHARTBREW_TOOL_MODE": "restricted"
      }
    }
  }
}

Build the binaries yourself

From a checkout, install Bun (the compiler), then:

bash
npm install
npm run build:bin   # writes binaries to dist-bin/

Full setup, Bun install commands, and the Windows cross-compile caveat are in CONTRIBUTING.md.

Add to an MCP client

After `npm install` and `npm run build`, register the server with your MCP host. The server runs over stdio via `node dist/index.js`. Replace `` with the absolute path to this `mcp` directory and set your API key.

Claude Code CLI (`claude mcp add`)

If you use Claude Code, you can register the server directly from the terminal instead of editing a config file:

bash
claude mcp add chartbrew \
  -e CHARTBREW_API_KEY=your-api-key \
  -e CHARTBREW_API_BASE_URL=https://api.chartbrew.com \
  -e CHARTBREW_TOOL_MODE=restricted \
  -- node /dist/index.js
  • Use `http://localhost:4019` for `CHARTBREW_API_BASE_URL` on a self-hosted instance (change the port if yours differs).
  • Add `-s user` (or `-s project`) to control the scope the server is registered in.
  • Verify with `claude mcp list`; remove with `claude mcp remove chartbrew`.

Claude Desktop / Claude Code (`claude_desktop_config.json` or `.mcp.json`)

json
{
  "mcpServers": {
    "chartbrew": {
      "command": "node",
      "args": ["/dist/index.js"],
      "env": {
        "CHARTBREW_API_KEY": "your-api-key",
        "CHARTBREW_API_BASE_URL": "https://api.chartbrew.com",
        "CHARTBREW_TOOL_MODE": "unrestricted"
      }
    }
  }
}

Cursor / VS Code (settings UI → MCP servers)

json
{
  "mcpServers": {
    "chartbrew": {
      "command": "node",
      "args": ["/dist/index.js"],
      "env": {
        "CHARTBREW_API_KEY": "your-api-key"
      }
    }
  }
}

> API base URL: use `https://api.chartbrew.com` for an official Chartbrew cloud account. For a self-hosted instance use your local URL — default `http://localhost:4019` (change the port if yours differs).

Notes:

  • `CHARTBREW_API_KEY` is required. See How to create API keys in Chartbrew.
  • The MCP host launches the server; it does not need to be run manually.
  • The default tool mode is `restricted` (read/query only). Set `CHARTBREW_TOOL_MODE: "unrestricted"` to also enable create/update/delete tools.
  • Alternatively, set the env vars in a `.env` file in the `mcp` directory and omit the `env` block.

Available Tools

ToolCategoryDescription
`chartbrew_teams_list`TeamsList teams available to the authenticated API key
`chartbrew_teams_get`TeamsGet details for one team by `team_id`
`chartbrew_teams_create`TeamsCreate a new team; owner is derived from the authenticated API key
`chartbrew_teams_update`TeamsUpdate an existing team by `team_id`
`chartbrew_connection_providers_list`ConnectionsList all supported connection providers
`chartbrew_connections_schema_get`ConnectionsGet the schema structure for a specific connection
`chartbrew_connections_list`ConnectionsList all connections in a team
`chartbrew_connections_get`ConnectionsGet one connection by `connection_id`
`chartbrew_connections_test`ConnectionsRun the Chartbrew connection test for a team connection
`chartbrew_connections_create`ConnectionsCreate a new connection in a team
`chartbrew_connections_update`ConnectionsUpdate an existing connection
`chartbrew_connections_update_files`ConnectionsUpload SSL CA/cert/key files (base64) for a connection via multipart — for PostgreSQL/MySQL SSL/TLS auth
`chartbrew_connections_delete`ConnectionsDelete a connection; optionally remove linked datasets
`chartbrew_datasets_list`DatasetsList datasets for a team
`chartbrew_datasets_get`DatasetsGet one dataset by `dataset_id`
`chartbrew_datasets_fetch_data`DatasetsRun a dataset request and return the dataset data
`chartbrew_datasets_create`DatasetsCreate a new dataset in a team
`chartbrew_datasets_quick_create`DatasetsCreate a dataset and all its data requests in a single call
`chartbrew_datasets_update`DatasetsUpdate an existing dataset by `dataset_id`
`chartbrew_datasets_delete`DatasetsDelete a dataset
`chartbrew_data_requests_list`Data RequestsList data requests for a dataset
`chartbrew_data_requests_run`Data RequestsExecute one dataset data request
`chartbrew_dashboards_list`DashboardsList dashboards for a team
`chartbrew_dashboards_get`DashboardsGet dashboard details by `project_id`
`chartbrew_dashboards_create`DashboardsCreate a new dashboard (Project); private by default
`chartbrew_dashboards_update`DashboardsUpdate an existing dashboard by `project_id`
`chartbrew_dashboards_delete`DashboardsDelete a dashboard by `project_id`
`chartbrew_dashboards_create_share_policy`DashboardsCreate a share policy for secure sharing via signed URLs
`chartbrew_dashboards_update_share_policy`DashboardsUpdate a dashboard share policy (params, `allow_params`, expiration)
`chartbrew_dashboards_delete_share_policy`DashboardsDelete a share policy for a dashboard
`chartbrew_dashboards_generate_share_token`DashboardsGenerate a signed JWT for secure dashboard embedding
`chartbrew_charts_get`ChartsGet a chart by `project_id` and `chart_id`
`chartbrew_charts_create`ChartsCreate a chart inside a dashboard project
`chartbrew_charts_quick_create`ChartsCreate a chart and its chart dataset configurations in a single call
`chartbrew_chart_dataset_configs_create`ChartsAttach a dataset to a chart via `ChartDatasetConfig`
`chartbrew_chart_dataset_configs_update`ChartsUpdate an existing `ChartDatasetConfig` by `cdc_id`
`chartbrew_chart_dataset_configs_delete`ChartsDelete a `ChartDatasetConfig` by `cdc_id`
`chartbrew_charts_query`ChartsRun the chart query endpoint and return result data
`chartbrew_charts_delete`ChartsDelete a chart by `project_id` and `chart_id`
`chartbrew_charts_create_share_policy`ChartsCreate a share policy for a chart for secure embedding
`chartbrew_charts_update_share_policy`ChartsUpdate a chart share policy (params, `allow_params`, expiration)
`chartbrew_charts_delete_share_policy`ChartsDelete a share policy for a chart
`chartbrew_charts_generate_share_token`ChartsGenerate a signed JWT for secure chart embedding
`chartbrew_charts_get_for_sharing`ChartsRetrieve a chart for embedding via public access or SharePolicy token

Known documentation limitations reflected in implementation

  • ID types are inconsistent in docs (number vs string), so tool inputs accept strings.
  • Some create/update payload required fields are not consistently documented, so payload is typed as flexible object.
  • Dataset fetch filters query-object encoding is undocumented; this server sends object values as JSON strings.
  • Error response schemas vary by endpoint; parser handles both error and message fields when available.

Frequently asked questions

What is chartbrew-mcp?

chartbrew-mcp is Chartbrew + AI agents. MCP server exposing Chartbrew's documented API: teams, connections, datasets, dashboards, charts, live queries, and secure embedding. TypeScript · stdio · restricted/unrestricted tool modes.

How do I install chartbrew-mcp?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is chartbrew-mcp open source?

Yes — it is hosted on GitHub at https://github.com/dhavanikgithub/chartbrew-mcp and has 1 stars.

Related MCP tools

riponcmprojectmem

Open-source coding agent memory. Records issues, attempts, fixes and decisions, then warns your agent before it repeats an approach that already failed. Native MCP server for Claude Code, Cursor, Antigravity and Codex. 100% local, no cloud, no telemetry. MIT.

796 Python
ai-agentsai-memoryai-tools+17
KnockOutEZwigolo

The go-to web for your AI coding agent — local-first search, fetch, crawl & research over MCP. No API keys, no cloud, $0/query. Public beta.

4,906 TypeScript
mcpagentai+17
AVIDS2memorix

Open-source cross-agent memory layer for coding agents via MCP. Compatible with Claude Code, Codex, Cursor, Windsurf, Gemini CLI, Antigravity, OpenClaw, Hermes Agent, Oh-my-Pi, Pi, Copilot, Kiro, OpenCode, and Trae.

721 TypeScript
ai-codingclaude-codecopilot+17
IvanMurzakUnity-MCP

AI Skills, MCP Tools, and CLI for Unity Engine. Full AI develop and test loop. Use cli for quick setup. Efficient token usage, advanced tools. Any C# method may be turned into a tool by a single line. Works with Claude Code, Gemini, Copilot, Cursor and any other absolutely for free.

4,137 C#
aiai-integrationgame-development+16
jgravellejcodemunch-mcp

Cut AI token costs 95%+ on code exploration. The leading MCP server for precise, symbol-level GitHub code retrieval via tree-sitter AST. Works with Claude Code, Cursor & any MCP client. 313B+ tokens saved.

2,651 Python
claudeclaude-codeai-coding+17
bgauryyoctocode

Code research platform for AI agents; find, understand, and prove context across your code and all of GitHub, in a fraction of the tokens. One toolset, MCP or CLI

923 TypeScript
aiclaude-aicursor-ai+17

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP