Tinybird MCP
Tinybird MCP is a deprecated tool for integrating external tools and server analytics with Tinybird. It enables streamlined data ingestion and real-time analytics for improved decision-making.
How to Install and Use Tinybird MCP
Tinybird MCP is a tool created by Tinybird to help collect and analyze data quickly. Although this version is deprecated, you can still install and try it for learning or testing purposes. Below are simple steps on how to install Tinybird MCP and use it with examples.
Step 1: Install Tinybird MCP
First, you need to get Tinybird MCP on your computer. You can easily install it using Python's package manager called pip. To install it, open your terminal or command prompt and run the following command:
pip install mcp-tinybird
This command downloads and installs the Tinybird MCP package so you can use it in your projects.
Step 2: Set Up Your Project
After installing Tinybird MCP, you should create a new Python file where you will write your code to use the tool. For example, create a file called main.py. Inside this file, you need to import Tinybird MCP to start working with it:
from mcp_tinybird import MCP
You will also need to initialize the MCP object with your Tinybird API token. Replace 'YOUR_API_TOKEN' with your actual token from your Tinybird account:
mcp = MCP(api_token='YOUR_API_TOKEN')
Step 3: Collect Data
Tinybird MCP works by collecting data and sending it to Tinybird for analysis. Here is an example of how to send some simple data to Tinybird using the MCP client:
data = {
"user_id": 123,
"event": "page_view",
"timestamp": "2024-01-01T12:00:00Z"
}
mcp.send(data)
This code sends an event showing that a user viewed a page at a certain time.
Step 4: Run Your Script
Once you have written your code, you can run your Python script to test if data is sent successfully:
python main.py
If everything is set up correctly, your data will be sent to Tinybird, where you can create queries and dashboards to analyze it.
Step 5: Explore the Demo
Tinybird MCP repository provides a demo app called Bluesky that shows how the tool works in a real-world case. You can find it in the bluesky-demo folder. Running the demo will give you a better idea of how to use MCP with more complex examples.
By following these easy steps, you can install Tinybird MCP, send data, and start analyzing it. Although this repository is deprecated, Tinybird offers an official new MCP server for production use. But for now, this guide helps you explore what Tinybird MCP can do in simple terms.