mc

mcp-tinybird

An MCP server to interact with a Tinybird Workspace from any MCP client.

Publishermcp-tinybird
Submitted date4/13/2025

Unleash the Power of LLMs with Tinybird: An Expert's Guide to the Model Context Protocol (MCP) Server

The Model Context Protocol (MCP) is revolutionizing how Large Language Models (LLMs) interact with the real world. By providing a standardized interface for connecting LLMs to external data sources and tools, MCP unlocks a new era of AI-powered applications. This guide delves into the Tinybird MCP server, a powerful tool that bridges the gap between LLMs and your Tinybird workspace, enabling you to build intelligent applications with ease.

smithery badge

Tinybird server MCP server

Why Tinybird MCP Server?

The Tinybird MCP server acts as a translator, allowing LLMs to seamlessly access and manipulate data within your Tinybird workspace. This opens up a world of possibilities, including:

  • Real-time Data Insights: Empower your LLMs with the ability to query Tinybird Data Sources using the high-performance Tinybird Query API.
  • API Endpoint Integration: Effortlessly retrieve results from existing Tinybird API Endpoints via simple HTTP requests.
  • Data Ingestion: Streamline your data pipelines by pushing datafiles directly into your Tinybird workspace.

The Tinybird MCP server supports both Server-Sent Events (SSE) and Standard Input/Output (STDIO) modes, providing flexibility for various integration scenarios.

Real-World Applications

The Tinybird MCP server is already powering innovative applications:

Getting Started: Installation and Configuration

Installation Options

The Tinybird MCP server can be easily installed using popular MCP package managers:

  • Smithery: Automate the installation process for Claude Desktop:

    npx @smithery/cli install @tinybirdco/mcp-tinybird --client claude
  • mcp-get: A versatile MCP package manager:

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

Prerequisites

Before you begin, ensure you have the following:

  • Tinybird Account & Workspace: A Tinybird account and a configured workspace are essential.
  • Claude Desktop: For seamless integration with Claude, install Claude Desktop.
  • uv: A fast and reliable Python package installer.

Configuration Steps

  1. Configure Claude Desktop:

    • Create the configuration file based on your operating system:

      • MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
      • Windows: %APPDATA%/Claude/claude_desktop_config.json
    • Paste the following template into the file, replacing <TINYBIRD_API_URL> and <TINYBIRD_ADMIN_TOKEN> with your Tinybird API URL and Admin Token:

      { "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: Ensure the changes are applied by restarting Claude Desktop.

SSE Mode (Alternative)

For integration with MCP clients that support SSE, run the server in SSE mode:

uvx mcp-tinybird sse

Unleashing the Power: Prompts and Tools

Prompts

The Tinybird MCP server provides a default prompt to get you started:

  • tinybird-default: Designed for exploring data already loaded into Tinybird. Requires a "topic" argument to define the data's subject (e.g., "Bluesky data," "retail sales").

Customize your prompts by creating a prompts Data Source in your Tinybird workspace with the following schema:

SCHEMA > `name` String `json:$.name`, `description` String `json:$.description`, `timestamp` DateTime `json:$.timestamp`, `arguments` Array(String) `json:$.arguments[:]`, `prompt` String `json:$.prompt`

The MCP server loads prompts from this Data Source on initialization, allowing you to tailor the LLM's behavior to your specific needs.

Tools

The server offers a comprehensive suite of tools for interacting with your Tinybird workspace:

  • list-data-sources: Lists all Data Sources.
  • list-pipes: Lists all Pipe Endpoints.
  • get-data-source: Retrieves information about a specific Data Source, including its schema.
  • get-pipe: Retrieves information about a Pipe Endpoint, including its nodes and SQL transformation.
  • request-pipe-data: Requests data from a Pipe Endpoint via HTTP, enabling parameterized filtering.
  • run-select-query: Executes a SELECT query on a Data Source to extract insights.
  • append-insight: Adds a new business insight to the memo resource.
  • llms-tinybird-docs: Provides access to the complete Tinybird product documentation for context and API reference.
  • save-event: Sends an event to a Tinybird Data Source, allowing you to save user-generated prompts or other relevant data.
  • analyze-pipe: Uses the Tinybird analyze API to optimize Pipe Endpoint queries by checking index usage and suggesting improvements.
  • push-datafile: Creates a remote Data Source or Pipe from a local datafile, streamlining data integration. Combine with the Filesystem MCP for managing files generated by the MCP server.

Development and Debugging

Local Configuration

For local development, create a .env file in the repository root with your Tinybird API URL and Admin Token:

TB_API_URL= TB_ADMIN_TOKEN=

Update your Claude Desktop configuration to point to your local development environment:

{ "mcpServers": { "mcp-tinybird_local": { "command": "uv", "args": [ "--directory", "/path/to/your/mcp-tinybird", "run", "mcp-tinybird", "stdio" ] } } }

Building and Publishing

Prepare the package for distribution:

  1. Sync dependencies and update lockfile:

    uv sync
  2. Build package distributions:

    uv build
  3. Publish to PyPI:

    uv publish

Debugging with MCP Inspector

Debugging MCP servers can be challenging due to their reliance on stdio. The MCP Inspector provides a powerful debugging environment.

Launch the MCP Inspector:

npx @modelcontextprotocol/inspector uv --directory /Users/alrocar/gr/mcp-tinybird run mcp-tinybird

The Inspector will provide a URL to access the debugging interface in your browser.

Monitoring

Monitor your MCP server's performance using a Prometheus client like Grafana. Refer to the monitoring guide for detailed instructions.

Conclusion

The Tinybird MCP server is a game-changer for building intelligent applications powered by LLMs. By seamlessly connecting LLMs to your Tinybird workspace, it unlocks real-time data insights, simplifies data integration, and empowers you to create innovative AI-driven solutions. Embrace the power of MCP and Tinybird to transform your data into actionable intelligence.

Visit More

View All