# mcp-tinybird

> MCP Server

This repository provides a Tinybird MCP server, enabling interaction with Tinybird Workspaces from any MCP client. It supports querying data sources, accessing API endpoints, and pushing datafiles, using SSE and STDIO modes.

## Overview

- **Category:** Developer Tools
- **Language:** Python
- **Stars:** 79
- **Forks:** 8
- **Owner:** tinybirdco
- **GitHub:** https://github.com/tinybirdco/mcp-tinybird
- **Homepage:** https://bluesky-demo.vercel.app
- **Created:** 2024-11-27T10:07:15+00:00
- **Updated:** 2025-03-28T12:33:49+00:00
- **Source:** https://model-context-protocol.com/servers/tinybird-mcp-server-data-interaction

## Setup

## Setup

### Installation

#### Using MCP package managers

**Smithery**

To install Tinybird MCP for Claude Desktop automatically via [Smithery](https://smithery.ai/protocol/mcp-tinybird):

```bash
npx @smithery/cli install @tinybirdco/mcp-tinybird --client claude
```

**mcp-get**

You can install the Tinybird MCP server using [mcp-get](https://github.com/michaellatman/mcp-get):

```bash
npx @michaellatman/mcp-get@latest install mcp-tinybird
```

### Prerequisites

MCP is still very new and evolving, we recommend following the [MCP documentation](https://modelcontextprotocol.io/quickstart#prerequisites) to get the MCP basics up and running.

You'll need:
- [Tinybird Account & Workspace](https://www.tinybird.co/)
- [Claude Desktop](https://claude.ai/)
- [uv](https://docs.astral.sh/uv/getting-started/installation/)

### Configuration

#### 1. Configure Claude Desktop

Create the following file depending on your OS:

On MacOS: `~/Library/Application Support/Claude/claude_desktop_config.json`

On Windows: `%APPDATA%/Claude/claude_desktop_config.json`

Paste this template in the file and replace `<TINYBIRD_API_URL>` and `<TINYBIRD_ADMIN_TOKEN>` with your Tinybird API URL and Admin Token:

```json
{
    "mcpServers": {
        "mcp-tinybird": {
            "command": "uvx",
            "args": [
                "mcp-tinybird",
                "stdio"
            ],
            "env": {
                "TB_API_URL": "<TINYBIRD_API_URL>",
                "TB_ADMIN_TOKEN": "<TINYBIRD_ADMIN_TOKEN>"
            }
        }
    }
}
```

#### 2. Restart Claude Desktop


#### SSE mode

Alternatively, you can run the MCP server in SSE mode by running the following command:

```bash
uvx mcp-tinybird sse
```

This mode is useful to integrate with an MCP client that supports SSE (like a web app).

## Tools

## Available Tools

1. Query Tinybird Data Sources (using the Tinybird Query API)
2. Get the result of existing Tinybird API Endpoints (with HTTP requests)
3. Push Datafiles
4. `list-data-sources` (Lists all Data Sources in the Tinybird Workspace)
5. `list-pipes` (Lists all Pipe Endpoints in the Tinybird Workspace)
6. `get-data-source` (Gets the information of a Data Source given its name, including the schema.)
7. `get-pipe` (Gets the information of a Pipe Endpoint given its name, including its nodes and SQL transformation to understand what insights it provides.)
8. `request-pipe-data` (Requests data from a Pipe Endpoints via an HTTP request.)
9. `run-select-query` (Allows to run a select query over a Data Source to extract insights.)
10. `append-insight` (Adds a new business insight to the memo resource)
11. `llms-tinybird-docs` (Contains the whole Tinybird product documentation)
12. `save-event` (Allows to send an event to a Tinybird Data Source)
13. `analyze-pipe` (Uses the Tinybird analyze API to run a ClickHouse explain on the Pipe Endpoint query and check if indexes, sorting key, and partition key are being used and propose optimizations suggestions)
14. `push-datafile` (Creates a remote Data Source or Pipe in the Tinybird Workspace from a local datafile)
