• LIVE DATA
  • INSIGHTS
  • SPEED
  • HUMAN

How to run and analyze SQL queries with your AI

Connect Redash to your agent to turn natural language into live data. Your AI handles the execution and the interpretation.

Ask AI about this page

Short answer

How can I run SQL queries with my AI?

Your agent uses Redash to execute SQL commands and pull the results into your chat. You get immediate data analysis and insights from the returned rows. This breakdown shows how the agent handles the data.

Data outcomes

What you get from your queries

The agent turns raw database rows into useful information.

LIVE DATA

Fresh query results

The agent runs your SQL against the database. You get current numbers instead of old reports.

INSIGHTS

Automated analysis

Your agent reads the returned data sets. It identifies trends or specific values you asked for.

SPEED

Cached data access

The agent can pull from existing results. This avoids re-running heavy queries when you need quick answers.

HUMAN

Manual oversight

You review the SQL and the final interpretation. The agent doesn't make decisions without your input.

The workflow

What your AI does when a query is requested.

The agent follows a specific sequence to fetch and process your data.

  1. Run the query

    The agent sends your SQL command to Redash to start the execution.

    execute_query
  2. Check status

    The agent monitors the background task to see when the database finishes the work.

    get_job
  3. Fetch results

    Once the job completes, the agent pulls the specific data rows into the chat.

    get_query_result
  4. Retrieve cache

    If the data is already available, the agent pulls the stored result to save time.

    get_cached_query_result

Try it

Copy these to start.

Paste these into your chat to begin working with Redash.

Starting points

Replace the bracketed text with your specific Redash query names or SQL logic.

Redash Connector

You're all set. Choose your MCP client and follow the setup instructions.

Connector linkhttps://edge.vinkius.com/vk_preview_rRCXZFALibUsor8N9CjThd5ZlbvdaN0QeviiaDQu/mcp

Claude Desktop

Follow the steps below to connect in seconds.

  1. 1In Claude Desktop, open Settings → Connectors.
  2. 2Click “Add custom connector” and paste the connector link above as the remote MCP server URL.
  3. 3Click Add and start a new chat — Redash capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "redash-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_rRCXZFALibUsor8N9CjThd5ZlbvdaN0QeviiaDQu/mcp"
    }
  }
}
Copy into chat04
  • Run the 'Daily Sales' query in Redash and tell me the total revenue.

  • Execute a SQL query to find all users in the 'active_users' table from yesterday.

  • Get the results from the 'Inventory Levels' query and highlight any low stock.

  • Check the cached results for the 'Monthly Growth' query and summarize the trend.

  • Claude
  • ChatGPT
  • Cursor
  • VS Code
  • Windsurf
  • Claude Code
  • JetBrains
  • Cline

Start here

Connect Redash once, then ask.

Log in through the secure link to authorize the connection. Once it's live, your agent can access your Redash data immediately.

Connect Redash to your AI

FAQ

How the Redash task behaves

  • 01

    Can the AI change my Redash queries?

    No. The agent can only execute queries and retrieve results. It cannot edit or delete your existing Redash queries.

  • 02

    Can the AI delete data from my database?

    No. The tools provided are strictly for reading and executing queries. The agent has no capability to perform delete or drop operations.

  • 03

    Does the AI write SQL for me?

    Yes. You can describe the data you need in plain English, and the agent will write and run the SQL to get it.

  • 04

    Can the AI create new Redash dashboards?

    No. The agent is limited to query execution and data retrieval. Dashboard creation must be done manually in Redash.

  • 05

    How does the AI handle large query results?

    The agent pulls the data into the chat context. For extremely large datasets, it is better to use a query that filters for specific rows.

  • More questions about Redash? See everything the Redash Connector can do

Connect Redash to Claude, Cursor, ChatGPT & more