• RAW DATA
  • PIPELINES
  • ANALYSIS
  • HUMAN

How to run ad-hoc SQL queries with your agent

Connect Tinybird to your AI client to turn natural language questions into live data insights. Your agent handles the heavy lifting of querying your real-time data streams.

Ask AI about this page

Our technology reaches across leading technology and enterprise teams.

  • Amazon
  • NVIDIA
  • Red Hat
  • Fidelity Investments
  • Intuit
  • OLX Brasil
  • Writesonic
  • Artium
  • Trolley
Bunny World Voxel Workspace

Short answer

How can I run SQL queries with my AI?

Your agent uses the Tinybird MCP to execute custom ClickHouse SQL or run specific Pipe queries. You get immediate data insights by asking questions in plain English.

Where each insight lands.

The outcomes of your queries

Depending on how you phrase your request, your agent delivers data in different formats.

RAW DATA

Direct SQL results

When you ask for specific table lookups, your agent runs a query and returns the raw rows you need.

PIPELINES

Processed Pipe data

If you need data that has already been transformed, your agent pulls from your existing Tinybird Pipes.

ANALYSIS

Summarized insights

Your agent takes the returned data and interprets it, giving you trends or counts instead of a list of numbers.

HUMAN

Manual verification

If a query is too complex or the schema is unclear, your agent will ask you to clarify the specific columns or logic needed.

The workflow

What your agent does when a query arrives.

Your agent acts as the bridge between your conversation and your Tinybird data streams.

  1. Interpret intent

    Your agent analyzes your question to decide if you need a standard SQL statement or a pre-built Pipe query.

    execute_sql_queryquery_pipe_data
  2. Execute SQL

    For custom requests, your agent writes and runs the necessary ClickHouse code against your data.

    execute_sql_query
  3. Fetch Pipe data

    If you have existing data transformations, your agent pulls the results from those specific Pipes.

    query_pipe_data
  4. Format response

    Your agent takes the resulting dataset and presents it as a readable answer in your chat window.

    query_pipe_data

Vinkius Agentic Execution Platform

State the outcome. Agents take it from there.

You don't have to drive this run by hand. Inside the Vinkius Agentic Execution Platform, agents pick up the task above and carry it to the end: you set the limits, you watch the steps, you keep all decisions.

Run it in Vinkius

Agents carry the task to the end

Agents execute Tinybird tasks from end to end inside the Vinkius Agentic Execution Platform: set the outcome, and the steps run.

Take it to any compatible AI

One connection, any client

Same connection follows you to ChatGPT, Claude, Gemini and any other client you love. Switch whenever you want: your connection, your permissions and your record move with you.

Spaces

One Space per activity

A Space gathers the context, tools and tasks of one activity, so you coordinate several agents at once and follow each execution as it happens.

Limits

Autonomy inside limits you set

Permissions and spending limits are yours to define. Agents halt for your approval on anything sensitive, and you choose how far autonomy goes, step by step or end to end.

Record

All steps, on the record

Each action your agents take lands in a signed audit trail. Results are verified, mistakes are learned from, and an emergency stop is one click away.

Models

Included in your plan

A curated selection of AI models is included in your plan, and you can add your own through BYOK whenever you prefer.

Try it

Copy these to start.

Use these prompts to test the connection.

Starting points

These are examples. Swap out the table names and column names for your actual Tinybird schema.

Tinybird Connector

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

Connector linkhttps://edge.vinkius.com/vk_preview_e9MOySIFrTyItsoZeoVkFv0IVVN3MSGs8AJqsvq5/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, Tinybird capabilities are ready to use.
Configuration · claude_desktop_config.jsonCopy
{
  "mcpServers": {
    "tinybird-data-platform-mcp": {
      "url": "https://edge.vinkius.com/vk_preview_e9MOySIFrTyItsoZeoVkFv0IVVN3MSGs8AJqsvq5/mcp"
    }
  }
}
Copy into chat04
  • 01

    Run a SQL query to show me the last 10 events from the user_logs table.

  • 02

    What is the current count of active sessions according to the session_pipeline pipe?

  • 03

    Execute a SQL query to find the top 5 most frequent error codes in the telemetry table.

  • 04

    Pull the data from the daily_active_users pipe and tell me if there was a spike yesterday.

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

Start here

Connect Tinybird once, then ask.

Provide your Tinybird credentials through the Vinkius interface. Your connection is secure, and you can start querying immediately in any compatible client.

Connect Tinybird to your agent

FAQ

How the queries behave

  • 01

    Can your agent change my data in Tinybird?

    No. The tools only allow for reading data through SQL or Pipes. Your agent cannot perform INSERT, UPDATE, or DELETE operations.

  • 02

    Can I use my own custom SQL?

    Yes. You can ask your agent to write and run specific ClickHouse SQL queries for any data available in your account.

  • 03

    Does your agent see my entire database?

    Your agent only sees the data it can access through the specific tools provided. It doesn't have unrestricted access to your entire infrastructure.

  • 04

    What happens if a query fails?

    If the SQL is invalid or the Pipe is broken, your agent will report the error message from Tinybird so you can fix the logic.

  • 05

    Can your agent create new Pipes for me?

    No. Your agent can only query existing Pipes or run raw SQL. It cannot create or modify the structure of your Tinybird Pipes.

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

Building with AI? Ship this whole workflow in your product.

Vinkius Connect is the connectivity layer for AI builders. All the capabilities used on this page, from Tinybird to thousands more, arrive through one SDK, already maintained for you. One Application, unlimited seats, each with their own connectors and credentials, isolated and never exposed to Vinkius. No OAuth flows to write, no tokens to store, no APIs to chase.

Explore Vinkius Connect

TypeScript · Python · Java · Go · C# · PHP · Rust

  • 01

    Your customers bring their own keys.

    Each user connects their own apps and keeps their own credentials. Vinkius only sees the identifier your backend sends.

  • 02

    Whole catalog, kept current.

    Tinybird plus thousands more, maintained and growing daily. No integrations to write, no token storage, no OAuth plumbing.

  • 03

    Any agent, any model.

    Capabilities land as framework-neutral objects, with adapters for OpenAI, Anthropic, Gemini, the Vercel AI SDK, LangChain and more.

Connect Tinybird to Claude, Cursor, ChatGPT & more

From idea to done

See what gets done when the agents take over the busywork

Each workflow on this page runs on the same platform. Connect your tools once, and your agents keep working in any AI you trust.