mcpField
M
Mcp Airflow Postgres

Mcp Airflow Postgres

github.com/gavinHuangOther0Updated 71w ago

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

  1. 01Query failed DAG runs
  2. 02Execute SQL queries
  3. 03PostgreSQL database connection
  4. 04Time-range filtering

Use cases

  1. 01Diagnose Airflow workflow failures
  2. 02Analyze DAG run records in database
  3. 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 README

MCP 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
  1. Clone this repository:

    git clone <your-repository-url>
    cd mcp-airflow-db
    
  2. Install dependencies with Poetry:

    poetry install
    
  3. Configure your environment: Create a .env file 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

Markdown supported

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.