---
title: "Connect Redash to Claude: Administer Data Sources & User Access"
slug: connect-redash-to-claude-administer-data-sources-user-access
date: 2026-10-19
author: Yuvraj Muley
categories: ["AI & Agents"]
excerpt: "Learn how to connect Redash to Claude using Truto's MCP server. Automate query execution, manage data sources, and control user access with AI."
tldr: "Connect Redash to Claude via Truto's MCP server to automate query execution, administer data sources, and manage user access with natural language, completely avoiding custom API maintenance."
canonical: https://truto.one/blog/connect-redash-to-claude-administer-data-sources-user-access/
---

# Connect Redash to Claude: Administer Data Sources & User Access


If you need to connect Redash to Claude to automate query execution, administer data source connections, govern access control lists (ACLs), or manage user provisioning, you need a [Model Context Protocol (MCP) server](https://truto.one/what-is-mcp-and-mcp-servers-and-how-do-they-work/). This server acts as the translation layer between Claude's function calling capabilities and the Redash REST API. You can either build and maintain this translation layer yourself, or use a [managed integration platform like Truto](https://truto.one/managed-mcp-for-claude-full-saas-api-access-without-security-headaches/) to dynamically generate a secure, authenticated MCP server URL. 

If your team uses ChatGPT, check out our guide on [/connect-redash-to-chatgpt-manage-dashboards-run-sql-queries/](https://truto.one/connect-redash-to-chatgpt-manage-dashboards-run-sql-queries/). Or, if you are building autonomous systems from scratch, explore our broader architectural overview on [/connect-redash-to-ai-agents-monitor-alerts-analyze-query-data/](https://truto.one/connect-redash-to-ai-agents-monitor-alerts-analyze-query-data/).

Giving a Large Language Model (LLM) read and write access to a business intelligence platform like Redash is an engineering challenge. Redash's API is highly stateful, heavily reliant on asynchronous jobs, and strictly governed by object-level ACLs. Every time you want an AI agent to execute a heavy query, you must handle job polling, cache invalidation, and complex response schemas. 

This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Redash, connect it natively to Claude Desktop, and execute complex data workflows using natural language.

> Want to give your AI agents secure, authenticated access to Redash and 100+ other SaaS APIs? Let's talk about [managed MCP architecture](https://truto.one/managed-mcp-for-claude-full-saas-api-access-without-security-headaches/).
>
> [Talk to us](https://truto.one/book-a-demo/)

## The Engineering Reality of the Redash API

A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools via JSON-RPC 2.0, the reality of implementing it against specialized B2B APIs is painful. Redash is built to manage heavy SQL queries, handle massive result sets, and govern access across dozens of underlying database types. Its API reflects that complexity.

If you decide to [build a custom Redash MCP server](https://truto.one/how-to-build-mcp-servers-for-ai-agents-2026-hands-on-architecture-guide/), here are the specific integration challenges you will face:

### Asynchronous Query Execution and Polling
Redash does not always return query results synchronously. When you execute a query, especially against a large dataset or a slow warehouse like Databricks or BigQuery, the API returns a job object. You must build an abstraction in your MCP server that handles stateful polling against the `jobs.get` endpoint until the job reaches status 3 (success), and then fetch the actual results. An LLM cannot natively handle this polling loop gracefully without explicit, strict tooling design. 

### Archiving Over Deletion
Redash maintains strict historical integrity. When you attempt to "delete" a dashboard or a query, the API does not execute a hard delete. Instead, endpoints like `delete_a_redash_query_by_id` archive the entity (`is_archived=true`). If you ask Claude to "delete this query and create a new one with the same name," it may run into unique constraint violations or confusing state discrepancies if your MCP server does not properly map the concept of archiving vs. hard deletion for the LLM.

### Polymorphic Data Source Configurations
Creating or testing data sources in Redash involves highly polymorphic schemas. A PostgreSQL data source requires a completely different `options` payload than a Google BigQuery or Databricks data source. Databricks even has entirely separate endpoints for database/table discovery (`list_all_redash_databricks_tables`) which fall back to async job polling when cached schemas aren't available. Mapping these varying requirements into clean, flat JSON Schemas that an LLM can understand is a massive mapping effort.

### Object-Level Access Control Lists (ACLs)
Redash governs permissions at the object level. Granting a user access isn't just about assigning a global role; it requires interacting with ACL endpoints requiring specific `object_type` (e.g., dashboard, query) and `object_id` combinations. Your tools must strictly define these types, otherwise Claude will inevitably attempt to apply dashboard permissions to query objects, resulting in HTTP 400 errors.

## Generating a Redash MCP Server

Instead of building a stateful translation layer from scratch, you can use Truto to dynamically generate an MCP server for your Redash instance. Truto derives tool definitions directly from its unified API documentation, ensuring that every tool has a strictly typed JSON Schema for the LLM to follow.

You can create an MCP server in Truto using either the UI or the API.

### Method 1: Via the Truto UI

For internal IT admins and one-off automations, generating a server via the dashboard is the fastest path.

1. Log into your Truto account and navigate to the **Integrated Accounts** page.
2. Select your connected Redash integration.
3. Click the **MCP Servers** tab.
4. Click **Create MCP Server**.
5. Select your desired configuration (e.g., allow `read` and `write` methods, set an optional expiration date).
6. Copy the generated MCP Server URL (e.g., `https://api.truto.one/mcp/a1b2c3d4e5f6...`).

### Method 2: Via the Truto API

If you are building an AI product and need to provision Redash MCP servers programmatically for your users, use the Truto REST API. The endpoint generates a secure, hashed token stored in a distributed KV datastore for rapid edge resolution.

**Request:**
```bash
curl -X POST https://api.truto.one/integrated-account/{integrated_account_id}/mcp \
  -H "Authorization: Bearer YOUR_TRUTO_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Redash Admin Agent",
    "config": {
      "methods": ["read", "write", "custom"]
    }
  }'
```

**Response:**
```json
{
  "id": "mcp_srv_987654321",
  "name": "Redash Admin Agent",
  "config": {
    "methods": ["read", "write", "custom"]
  },
  "expires_at": null,
  "url": "https://api.truto.one/mcp/a1b2c3d4e5f67890"
}
```
This URL is fully self-contained. It encodes the tenant mapping and handles all underlying Redash authentication automatically.

## Connecting the MCP Server to Claude

Once you have your Truto MCP URL, you can connect it to Claude using two primary methods.

### Method A: Via the Claude UI (Claude for Work)

If your organization uses Claude Enterprise or Team plans, administrators can add MCP servers directly in the interface.

1. In Claude, navigate to **Settings -> Integrations**.
2. Click **Add MCP Server** (or "Add custom connector").
3. Paste the Truto MCP URL.
4. Click **Add**. Claude will instantly execute a JSON-RPC `tools/list` request and populate the model's context with all available Redash operations.

### Method B: Via Manual Config File (Claude Desktop)

For developers using the Claude Desktop application locally, you can configure the server using a JSON file. Truto provides an SSE (Server-Sent Events) wrapper to adapt the HTTP endpoint into the stdio/SSE format Claude Desktop expects.

Open your `claude_desktop_config.json` file (located in `~/Library/Application Support/Claude/` on macOS or `%APPDATA%\Claude\` on Windows) and add:

```json
{
  "mcpServers": {
    "redash_admin": {
      "command": "npx",
      "args": [
        "-y",
        "@modelcontextprotocol/server-sse",
        "https://api.truto.one/mcp/a1b2c3d4e5f67890"
      ]
    }
  }
}
```
Restart Claude Desktop. The hammer icon will appear in your chat bar, indicating the Redash tools are ready to use.

## Hero Tools for Redash

When Claude connects to the Truto MCP server, it gains access to the entire Redash REST API. Below are the most critical tools for administering Redash data sources and user access.

### execute_a_redash_query
*(Tool name: `create_a_redash_query_results_resource`)*

This is the workhorse tool. It allows Claude to execute a saved query in Redash and retrieve the actual data. It handles the cache-busting logic—you can instruct it to fetch cached results if they are recent, or force a fresh execution.

> "Run query ID 492 with a max_age of 0 to force a fresh execution, and summarize the revenue figures for the last quarter."

### provision_redash_user
*(Tool name: `create_a_redash_user`)*

Automate onboarding by allowing Claude to create new Redash user accounts. This tool requires specific upstream attributes, ensuring the user is provisioned with the correct initial permissions.

> "Create a new Redash user for sarah.connor@example.com with the display name 'Sarah Connor'."

### manage_object_acls
*(Tool name: `create_a_redash_acl`)*

Redash permissions are granular. This tool grants a specific user access to a specific object (like a dashboard or query), preventing unauthorized data access.

> "Grant user ID 12 access to dashboard ID 88 by creating a new ACL for that object_type and object_id."

### list_all_redash_alerts
*(Tool name: `list_all_redash_alerts`)*

Allows the AI agent to audit active monitoring. It retrieves all alert configurations across the Redash instance, showing exactly which queries are triggering notifications and when they were last evaluated.

> "List all active alerts in Redash and tell me which ones are tied to the 'High Server Load' query."

### get_running_job_status
*(Tool name: `get_single_redash_job_by_id`)*

Crucial for long-running operations. If Claude triggers an action that drops into a background job, it can use this tool to poll the job ID and check whether the execution succeeded or failed.

> "Check the status of job ID 9483a-b829c. Let me know if it has finished executing."

### share_dashboard_publicly
*(Tool name: `create_a_redash_dashboard_share`)*

Generates a public URL and API key for a specific dashboard, allowing external sharing without requiring Redash credentials. Highly useful for automated reporting workflows.

> "Enable anonymous sharing for the 'Monthly Sales' dashboard (ID 42) and give me the public URL."

For the complete tool inventory, including detailed JSON Schemas for Databricks schema discovery, query snippets, and visualization management, visit the [Redash integration page](https://truto.one/integrations/detail/redash).

## Workflows in Action

Here is how these tools come together to automate real-world Redash administrative tasks.

### Scenario 1: Automated Analyst Onboarding

When a new data analyst joins the team, they need a Redash account, access to the core dashboards, and visibility into specific operational alerts.

> "We have a new analyst, John Doe (john.doe@company.com). Please create a Redash user for him. Once created, grant him access to the 'Core Metrics' dashboard (ID 15) and list all current alerts so I can tell him what to subscribe to."

**Step-by-step execution:**
1. **`create_a_redash_user`**: Claude provisions the new user account and extracts the new user ID from the response.
2. **`create_a_redash_acl`**: Claude takes the new user ID and applies it to `object_type: dashboard` and `object_id: 15`.
3. **`list_all_redash_alerts`**: Claude fetches the system's alerts and formats them into a readable summary for the admin to hand off to the new employee.

```mermaid
sequenceDiagram
    participant User as IT Admin
    participant Claude as Claude Desktop
    participant Truto as Truto MCP
    participant Redash as Redash API

    User->>Claude: "Create user John Doe..."
    Claude->>Truto: call create_a_redash_user(name, email)
    Truto->>Redash: POST /api/users
    Redash-->>Truto: { id: 45, name: "John Doe" }
    Truto-->>Claude: User created (ID 45)
    
    Claude->>Truto: call create_a_redash_acl(object_type: "dashboard", object_id: 15, user_id: 45)
    Truto->>Redash: POST /api/dashboards/15/acl
    Redash-->>Truto: 200 OK
    Truto-->>Claude: Access granted
    
    Claude->>Truto: call list_all_redash_alerts()
    Truto->>Redash: GET /api/alerts
    Redash-->>Truto: [{id: 1, name: "Revenue Drop"}]
    Truto-->>Claude: Alert list returned
    Claude-->>User: "John is set up and has access to Dashboard 15. Here are the active alerts..."
```

### Scenario 2: Investigating a Data Outage via Alert Execution

When a metric looks wrong, an engineer can use Claude to force-refresh a query, bypass the cache, and retrieve the latest data to diagnose the issue.

> "The 'Daily Active Users' query (ID 108) looks stale. Force a fresh execution of this query, check its job status if it takes a while, and give me the latest results."

**Step-by-step execution:**
1. **`create_a_redash_query_results_resource`**: Claude calls the endpoint for query 108, setting `max_age` to `0` to bypass the cache.
2. **`get_single_redash_job_by_id`**: If the query is heavy and returns a job ID instead of immediate data, Claude uses this tool to poll the job status.
3. **`get_single_redash_query_result_by_id`**: Once the job succeeds, Claude fetches the actual payload and analyzes the data rows for the engineer.

## Security and Access Control

Exposing BI tools to LLMs requires strict security constraints. Truto's MCP servers provide granular controls to ensure AI agents operate safely:

*   **Method Filtering**: Restrict an MCP server to read-only operations by passing `"methods": ["read"]` during creation. This ensures the model can fetch data and run queries, but cannot create users or delete dashboards.
*   **Tag Filtering**: Scope the available tools to specific integration resources by passing `"tags": ["users", "dashboards"]`. Tools outside these domains will not be exposed to the LLM.
*   **Time-To-Live (TTL)**: Assign an `expires_at` ISO datetime when creating the MCP server. Truto's distributed scheduling system will automatically revoke the token and wipe the server configuration at the exact timestamp, perfect for temporary audit sessions.
*   **Secondary Authentication**: Enable `require_api_token_auth`. Even if someone compromises the MCP URL, they cannot execute tools without also passing a valid Truto API token in the `Authorization` header.

### A Factual Note on Rate Limits
When automating Redash, you must manage API quotas. Truto does **not** automatically retry, throttle, or apply backoff on rate limit errors. If the Redash API returns an HTTP 429 Too Many Requests, Truto passes that error directly back to the caller (Claude). Truto normalizes the upstream rate limit information into standardized IETF headers (`ratelimit-limit`, `ratelimit-remaining`, `ratelimit-reset`). The caller (your agent framework or Claude) is strictly responsible for implementing its own retry and backoff logic.

## Architecting for Agentic BI

Connecting Redash to Claude turns static dashboards into conversational data engines. IT admins can provision users via natural language, and data engineers can debug queries without context switching. By using Truto's dynamic MCP generation, you avoid the technical debt of writing custom polling loops, managing polymorphic schemas, and maintaining OAuth states.

Focus on the data analysis, and let the infrastructure handle the translation layer.
