Serveur Tinybird Mcp
Aperçu
Qu'est-ce que MCP-Tinybird ?
MCP-Tinybird est un projet open-source hébergé sur GitHub sous l'organisation Tinybirdco. Il sert d'outil puissant pour les développeurs cherchant à construire et gérer des pipelines de données de manière efficace. Le dépôt est conçu pour faciliter l'intégration des capacités de Tinybird dans diverses applications, permettant aux utilisateurs de tirer parti du traitement et de l'analyse des données en temps réel.
Fonctionnalités de MCP-Tinybird
- Traitement des Données en Temps Réel : MCP-Tinybird permet aux utilisateurs de traiter et d'analyser des données en temps réel, ce qui le rend idéal pour les applications nécessitant des informations immédiates.
- Interface Conviviale : Le projet offre une interface simple qui simplifie la gestion des pipelines de données, la rendant accessible aux développeurs de tous niveaux de compétence.
- Open Source : Étant un projet open-source, MCP-Tinybird encourage les contributions et la collaboration de la communauté, permettant aux développeurs d'améliorer ses fonctionnalités.
- Capacités d'Intégration : Le dépôt prend en charge l'intégration avec diverses sources de données et services, offrant une flexibilité dans la manière dont les données sont ingérées et traitées.
- Documentation et Support : Une documentation complète est disponible pour aider les utilisateurs à démarrer et à résoudre tout problème qu'ils pourraient rencontrer.
Comment Utiliser MCP-Tinybird
-
Cloner le Dépôt : Commencez par cloner le dépôt MCP-Tinybird depuis GitHub sur votre machine locale en utilisant la commande :
git clone https://github.com/tinybirdco/mcp-tinybird.git
-
Installer les Dépendances : Naviguez vers le répertoire du projet et installez les dépendances nécessaires. Cela peut généralement être fait en utilisant un gestionnaire de paquets comme npm ou yarn :
cd mcp-tinybird npm install
-
Configurer Votre Environnement : Configurez vos variables d'environnement et fichiers de configuration selon la documentation fournie dans le dépôt.
-
Exécuter l'Application : Démarrez l'application pour commencer à traiter des données. Cela peut généralement être fait avec une commande comme :
npm start
-
Explorer et Personnaliser : Utilisez les fonctionnalités de MCP-Tinybird pour construire vos pipelines de données. Vous pouvez personnaliser l'application en fonction de vos besoins spécifiques et l'intégrer à d'autres services.
Questions Fréquemment Posées
Q1 : MCP-Tinybird est-il gratuit à utiliser ?
R1 : Oui, MCP-Tinybird est un projet open-source, ce qui signifie qu'il est gratuit à utiliser et à modifier selon les termes de la licence Apache-2.0.
Q2 : Puis-je contribuer au projet MCP-Tinybird ?
R2 : Absolument ! Les contributions sont les bienvenues. Vous pouvez forker le dépôt, apporter vos modifications et soumettre une demande de tirage pour révision.
Q3 : Où puis-je trouver la documentation pour MCP-Tinybird ?
R3 : La documentation est disponible dans le dépôt lui-même, généralement dans un fichier README.md
ou un dossier docs
dédié.
Q4 : Quelles technologies MCP-Tinybird prend-il en charge ?
R4 : MCP-Tinybird est conçu pour fonctionner avec diverses sources de données et peut s'intégrer à plusieurs technologies, améliorant sa polyvalence pour différents cas d'utilisation.
Q5 : Comment puis-je signaler des problèmes ou des bogues ?
R5 : Vous pouvez signaler des problèmes en naviguant vers l'onglet "Issues" dans le dépôt GitHub de MCP-Tinybird et en soumettant un nouveau problème avec des informations détaillées sur le problème.
Détail
Tinybird MCP server
An MCP server to interact with a Tinybird Workspace from any MCP client.
<a href="https://glama.ai/mcp/servers/53l5ojnx30"><img width="380" height="200" src="https://glama.ai/mcp/servers/53l5ojnx30/badge" alt="Tinybird server MCP server" /></a>
Features
- Query Tinybird Data Sources using the Tinybird Query API
- Get the result of existing Tinybird API Endpoints with HTTP requests
- Push Datafiles
It supports both SSE and STDIO modes.
Usage examples
Setup
Installation
Using MCP package managers
Smithery
To install Tinybird MCP for Claude Desktop automatically via Smithery:
npx @smithery/cli install @tinybirdco/mcp-tinybird --client claude
mcp-get
You can install the Tinybird MCP server using mcp-get:
npx @michaellatman/mcp-get@latest install mcp-tinybird
Prerequisites
MCP is still very new and evolving, we recommend following the MCP documentation to get the MCP basics up and running.
You'll need:
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:
{
"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:
uvx mcp-tinybird sse
This mode is useful to integrate with an MCP client that supports SSE (like a web app).
Prompts
The server provides a single prompt:
- tinybird-default: Assumes you have loaded some data in Tinybird and want help exploring it.
- Requires a "topic" argument which defines the topic of the data you want to explore, for example, "Bluesky data" or "retail sales".
You can configure additional prompt workflows:
- Create a prompts Data Source in your workspace with this schema and append your prompts. The MCP loads
prompts
on initialization so you can configure it to your needs:
SCHEMA >
`name` String `json:$.name`,
`description` String `json:$.description`,
`timestamp` DateTime `json:$.timestamp`,
`arguments` Array(String) `json:$.arguments[:]`,
`prompt` String `json:$.prompt`
Tools
The server implements several tools to interact with the Tinybird Workspace:
list-data-sources
: Lists all Data Sources in the Tinybird Workspacelist-pipes
: Lists all Pipe Endpoints in the Tinybird Workspaceget-data-source
: Gets the information of a Data Source given its name, including the schema.get-pipe
: Gets the information of a Pipe Endpoint given its name, including its nodes and SQL transformation to understand what insights it provides.request-pipe-data
: Requests data from a Pipe Endpoints via an HTTP request. Pipe endpoints can have parameters to filter the analytical data.run-select-query
: Allows to run a select query over a Data Source to extract insights.append-insight
: Adds a new business insight to the memo resourcellms-tinybird-docs
: Contains the whole Tinybird product documentation, so you can use it to get context about what Tinybird is, what it does, API reference and more.save-event
: This allows to send an event to a Tinybird Data Source. Use it to save a user generated prompt to the prompts Data Source. The MCP server feeds from the prompts Data Source on initialization so the user can instruct the LLM the workflow to follow.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 suggestionspush-datafile
: Creates a remote Data Source or Pipe in the Tinybird Workspace from a local datafile. Use the Filesystem MCP to save files generated by this MCP server.
Development
Config
If you are working locally add two environment variables to a .env
file in the root of the repository:
TB_API_URL=
TB_ADMIN_TOKEN=
For local development, update your Claude Desktop configuration:
{
"mcpServers": {
"mcp-tinybird_local": {
"command": "uv",
"args": [
"--directory",
"/path/to/your/mcp-tinybird",
"run",
"mcp-tinybird",
"stdio"
]
}
}
}
<details>
<summary>Published Servers Configuration</summary>
"mcpServers": {
"mcp-tinybird": {
"command": "uvx",
"args": [
"mcp-tinybird"
]
}
}
</details>
Building and Publishing
To prepare the package for distribution:
- Sync dependencies and update lockfile:
uv sync
- Build package distributions:
uv build
This will create source and wheel distributions in the dist/
directory.
- Publish to PyPI:
uv publish
Note: You'll need to set PyPI credentials via environment variables or command flags:
- Token:
--token
orUV_PUBLISH_TOKEN
- Or username/password:
--username
/UV_PUBLISH_USERNAME
and--password
/UV_PUBLISH_PASSWORD
Debugging
Since MCP servers run over stdio, debugging can be challenging. For the best debugging experience, we strongly recommend using the MCP Inspector.
You can launch the MCP Inspector via npm
with this command:
npx @modelcontextprotocol/inspector uv --directory /Users/alrocar/gr/mcp-tinybird run mcp-tinybird
Upon launching, the Inspector will display a URL that you can access in your browser to begin debugging.
Monitoring
To monitor the MCP server, you can use any compatible Prometheus client such as Grafana. Learn how to monitor your MCP server here.
Configuration du serveur
{
"mcpServers": {
"mcp-tinybird": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"ghcr.io/metorial/mcp-container--tinybirdco--mcp-tinybird--mcp-tinybird",
"mcp-tinybird stdio"
],
"env": {
"TB_API_URL": "tb-api-url",
"TB_ADMIN_TOKEN": "tb-admin-token"
}
}
}
}