About Mcp Airflow Postgres
An MCP server for querying and managing Airflow PostgreSQL databases directly. It enables diagnostic access to failed runs and custom SQL queries for Airflow users.
Key features
- 01Query failed DAG runs
- 02Execute SQL queries
- 03PostgreSQL database connection
- 04Time-range filtering
Use cases
- 01Diagnose Airflow workflow failures
- 02Analyze DAG run records in database
- 03Debug Airflow applications
MCP support
Serves as an MCP server exposing tools for querying and managing the Airflow database, allowing LLM clients to interact with DAG runs and execute custom SQL.
Details
From the project READMEMCP Airflow Database
A Model Context Protocol (MCP) server for interacting with Airflow databases.
Setup with Poetry
Prerequisites
- Python 3.8 or higher
- Poetry installed on your system
Installation
-
Clone this repository:
git clone <your-repository-url> cd mcp-airflow-db -
Install dependencies with Poetry:
poetry install -
Configure your environment: Create a
.envfile with your database connection string:DATABASE_URL=postgresql://airflow:airflow123@localhost:5432/airflow
Running the MCP Server
Run the server with Poetry:
poetry run python src/server.py
Or activate the Poetry environment first:
poetry shell
python src/server.py
Using with Smithery
This MCP can be used with Smithery directly as configured in the smithery.yaml file. Make sure to provide the DATABASE_URL configuration when starting the server.
Available Tools
failed_runs: Query failed Airflow DAG runs within a specified time period.query: Execute SQL queries directly against the Airflow database.
License
[Your License]
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.