Metadata-Version: 2.4
Name: airflow-mcp-plugin
Version: 0.2.0
Summary: Apache Airflow 3 plugin that mounts airflow-mcp-server as a Streamable HTTP endpoint at /mcp
Author-email: Abhishek Bhakat <abhishek.bhakat@hotmail.com>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 3 - Alpha
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Requires-Python: >=3.10
Requires-Dist: aiohttp>=3.9.5
Requires-Dist: apache-airflow>=3.0.2
Requires-Dist: mcp>=1.16.0
Requires-Dist: pydantic>=2.7
Requires-Dist: pyyaml>=6.0.1
Description-Content-Type: text/markdown

# airflow-mcp-plugin

Airflow 3 plugin that mounts `airflow-mcp-server` as a Streamable HTTP endpoint at `/mcp` on the Airflow API server.

Requirements:
- Apache Airflow >= 3.0 (FastAPI backend)
- Python >= 3.10

Install (recommended via main package extra):
```bash
pip install "airflow-mcp-server[airflow-plugin]"
```

Or install the plugin directly:
```bash
pip install airflow-mcp-plugin
```

Deploy:
- Install into the Airflow webserver container environment (Docker/Compose/Helm)
- Restart the webserver; Airflow auto-loads the plugin via entry point

Use (stateless):
- Endpoint: `http(s)://<airflow-host>/mcp`
- Every request must include header: `Authorization: Bearer <access-token>`
- The token is forwarded per-request to Airflow APIs (no shared auth state)
- Mode per-request:
  - Safe (default): `http(s)://<airflow-host>/mcp`
  - Unsafe: `http(s)://<airflow-host>/mcp/?mode=unsafe` (enables POST/PUT/DELETE/PATCH)
  - Streamable HTTP (stateless)

### Usage with Claude Desktop

Claude Desktop requires a helper wrapper to forward headers. Add the plugin endpoint via [`mcp-remote`](https://github.com/geelen/mcp-remote) inside `claude_desktop_config.json`:

```json
{
  "mcpServers": {
    "airflow-mcp-plugin": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "http://localhost:8080/mcp",
        "--header",
        "Authorization:${MCP_AIRFLOW_TOKEN}"
      ],
      "env": {
        "MCP_AIRFLOW_TOKEN": "Bearer <access-token>"
      }
    }
  }
}
```

See [`CONFIG.md`](CONFIG.md) for additional MCP client configuration examples. All clients must supply the `Authorization: Bearer <token>` header and connect over HTTP.

### Usage with VS Code

Add the server definition to your `settings.json` under the `mcp.servers` block:

```json
"mcp": {
  "servers": {
    "airflow-mcp-plugin": {
      "type": "http",
      "url": "http://localhost:8080/mcp/",
      "headers": {
        "Authorization": "Bearer <access-token>"
      }
    }
  }
}
```

This configuration uses VS Code's native HTTP transport with per-request `Authorization` headers; update the URL if your Airflow instance is hosted elsewhere.
