An MCP server to interact with a Tinybird Workspace from any MCP client.
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.
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:
The Tinybird MCP server supports both Server-Sent Events (SSE) and Standard Input/Output (STDIO) modes, providing flexibility for various integration scenarios.
The Tinybird MCP server is already powering innovative applications:
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
Before you begin, ensure you have the following:
Configure Claude Desktop:
Create the configuration file based on your operating system:
~/Library/Application Support/Claude/claude_desktop_config.json
%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>" } } } }
Restart Claude Desktop: Ensure the changes are applied by restarting Claude Desktop.
For integration with MCP clients that support SSE, run the server in SSE mode:
uvx mcp-tinybird sse
The Tinybird MCP server provides a default prompt to get you started:
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.
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.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" ] } } }
Prepare the package for distribution:
Sync dependencies and update lockfile:
uv sync
Build package distributions:
uv build
Publish to PyPI:
uv publish
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.
Monitor your MCP server's performance using a Prometheus client like Grafana. Refer to the monitoring guide for detailed instructions.
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.
๐ ๐ Generate visualizations from fetched data using the VegaLite format and renderer.
๐ โ๏ธ A mcp server that bridges Dune Analytics data to AI agents.
๐ โ๏ธ An MCP server for real-time Fantasy Premier League data and analysis tools.
๐๏ธ ๐ ๐ โ๏ธ Search dashboards, investigate incidents and query datasources in your Grafana instance