> ## Documentation Index
> Fetch the complete documentation index at: https://basedash.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# MCP server

> Connect any MCP client to Basedash for AI-powered data analysis

Basedash provides a [Model Context Protocol (MCP)](https://modelcontextprotocol.io/) server that lets you connect any compatible AI client to your Basedash workspace. This gives AI assistants like Claude Code, ChatGPT, Cursor, Windsurf, and others the ability to analyze data and look up information across all your connected data sources.

> [!NOTE]
>
> If you want to connect external MCP servers to Basedash, see [MCP
> connectors](https://basedash.com/docs/features/mcp-connectors.md). This page is only for connecting MCP
> clients to the Basedash MCP server.

## How it works

MCP is an open standard that allows AI applications to connect to external tools and data sources. By adding the Basedash MCP server to your AI client, you give it the ability to:

* Query your connected databases and data sources
* Generate charts and visualizations
* Create and edit dashboards and charts from natural-language instructions
* Find and inspect dashboards and charts you can access
* Look up business metrics and KPIs
* Analyze trends across your data

All queries and dashboard or chart actions respect the same permissions and [access controls](https://basedash.com/docs/administration/data-source-access-control.md) configured in your Basedash workspace.

## Installation

Add the following URL as a remote MCP server in your client:

```
https://charts.basedash.com/api/public/mcp
```

When you connect for the first time, an OAuth flow will open in your browser to authenticate with your Basedash account.

### Claude Code

```bash theme={"dark"}
claude mcp add basedash --transport http https://charts.basedash.com/api/public/mcp
```

### Cursor

1. Open Cursor settings
2. Navigate to **MCP**
3. Click **Add new MCP server**
4. Set the type to **streamable-http** and enter the URL `https://charts.basedash.com/api/public/mcp`

### ChatGPT

1. Open ChatGPT settings
2. Navigate to **Connections** and click **Add connection**
3. Enter the URL `https://charts.basedash.com/api/public/mcp`

### Other clients

Any MCP client that supports remote servers can connect using the URL above. Refer to your client's documentation for how to add a remote MCP server.

## Available tools

Once connected, your AI client will have access to the following tools:

> [accordion] Ask question
>
> `ask_question` asks a question about your data in plain English and gets an answer back from Basedash's AI data analyst. It has access to all of your connected data sources and can handle everything from quick lookups (like "how many signups did we get yesterday?") to deeper analysis (like trends, comparisons, and strategic insights).
>
> Each question can start a new chat or continue an existing one, so your AI client can have a back-and-forth conversation about your data.

> [accordion] Get data sources
>
> `get_data_sources` lists all the data sources connected to your Basedash
> workspace, including databases, warehouses, and SaaS applications connected
> through Fivetran or MCP connectors. This helps your AI client understand what
> data is available before asking questions.

> [accordion] Create dashboard
>
> `create_dashboard` creates a dashboard from natural-language `instructions`. The `instructions` field is required.
>
> When successful, the tool returns a durable URL to the dashboard in the Basedash app.

> [accordion] Edit dashboard
>
> `edit_dashboard` updates an existing dashboard from natural-language `instructions`. Both `dashboard_id` and `instructions` are required.
>
> This tool is annotated as destructive because it modifies an existing dashboard. When successful, it returns a durable URL to the dashboard in the Basedash app.

> [accordion] Create chart
>
> `create_chart` creates a chart from natural-language `instructions`. The `instructions` field is required. You can optionally provide `dashboard_id` to place the new chart on a dashboard.
>
> When successful, the tool returns a durable URL to the chart in the Basedash app. It also returns a screenshot image URL or resource link when one is available.

> [accordion] Edit chart
>
> `edit_chart` updates an existing chart from natural-language `instructions`. Both `chart_id` and `instructions` are required.
>
> When successful, the tool returns a durable URL to the chart in the Basedash app. It also returns a screenshot image URL or resource link when one is available.

> [accordion] List dashboards
>
> `list_dashboards` lists dashboards that the connected user can access.

> [accordion] Get dashboard
>
> `get_dashboard` gets a dashboard that the connected user can access.

> [accordion] List charts
>
> `list_charts` lists charts that the connected user can access.

> [accordion] Get chart
>
> `get_chart` gets a chart that the connected user can access.

All tools respect the same permissions and [access controls](https://basedash.com/docs/administration/data-source-access-control.md) as the Basedash app. Dashboard and chart read tools only return artifacts the connected user can access.

Creating or editing a dashboard or chart requires both the `mcp:chat:ask` and `mcp:dashboards:write` OAuth scopes. Dashboard and chart read tools use the `mcp:dashboards:read` scope. Existing MCP connections were automatically granted the new dashboard scopes, so you don't need to repeat the OAuth flow.

If an agent fails while creating a dashboard or chart, Basedash cleans up the incomplete artifact.

## Troubleshooting

> [accordion] The connection fails or times out
>
> Double-check that you entered the URL exactly as shown:
>
> ```
> https://charts.basedash.com/api/public/mcp
> ```
>
> Make sure your client is set to use the **streamable HTTP** transport (not stdio or SSE). If your client supports selecting a transport type, pick HTTP or streamable-http.

&#x20;

> [accordion] The OAuth login window never opens
>
> Some clients only open the OAuth window the first time you connect. Try
> removing the Basedash MCP server from your client and adding it again. Also
> make sure pop-ups aren't blocked in your browser.

&#x20;

> [accordion] I get a “Forbidden” or “not a member” error
>
> This usually means you authenticated with an account that isn't part of the
> Basedash workspace you're trying to query. Sign out of Basedash in your
> browser, reconnect the MCP server in your client, and log in with the correct
> account during the OAuth flow.

&#x20;

> [accordion] The AI can't see one of my data sources
>
> Basedash respects your workspace [access
> controls](https://basedash.com/docs/administration/data-source-access-control.md). If your account doesn't
> have access to a particular data source, the MCP server won't expose it
> either. Ask a workspace admin to grant you access, then try again.

&#x20;

> [accordion] A dashboard or chart can't be found
>
> Dashboard and chart tools only return artifacts your account can access. The
> dashboard or chart might also be archived. Check your access in Basedash and
> confirm that the artifact is still active.

> [accordion] Answers look wrong or incomplete
>
> The AI data analyst uses the same engine as Basedash chat. If something looks off, try:
>
> * Asking a more specific question (include time ranges, metrics, or which data source to use)
> * Opening the chat in Basedash to inspect the SQL query and results
> * Making sure your data source's schema descriptions are up to date
>
> If issues persist, reach out to support from the Basedash app.

> [accordion] I hit a usage or billing limit
>
> MCP questions count toward your workspace's AI usage. If you see a message about usage being blocked, a workspace admin can review your plan and usage in Basedash's billing settings.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.