MCP Server
The AIR Blackbox MCP server brings EU AI Act compliance scanning directly into Claude Desktop (and any MCP-compatible client). It exposes 10 tools for scanning, analyzing, and remediating Python AI agent code.
Installation
```bash pip install air-blackbox-mcp ```
Claude Desktop Setup
Add to your Claude Desktop config file:
macOS/Linux: `~/Library/Application Support/Claude/claude_desktop_config.json` Windows: `%APPDATA%\Claude\claude_desktop_config.json`
```json { "mcpServers": { "air-blackbox": { "command": "python3", "args": ["-m", "air_blackbox_mcp"] } } } ```
Restart Claude Desktop after saving.
Available Tools
Scanning Tools
| Tool | Description |
|---|---|
| `scan_code` | Scan a Python code string for all 6 EU AI Act articles |
| `scan_file` | Scan a single Python file by path |
| `scan_project` | Recursively scan all .py files in a directory |
Analysis Tools
| Tool | Description |
|---|---|
| `analyze_with_model` | Deep analysis using local Ollama model (falls back to rule-based) |
| `check_prompt_injection` | Scan text for 15+ prompt injection patterns |
| `classify_risk` | Classify a tool/function by EU AI Act risk level |
Remediation Tools
| Tool | Description |
|---|---|
| `add_trust_layer` | Generate trust layer code for your framework |
| `suggest_fix` | Get specific code fix for a failing article |
Documentation Tools
| Tool | Description |
|---|---|
| `explain_article` | Technical explanation of an EU AI Act article |
| `generate_compliance_report` | Full markdown compliance report |
Usage Examples
In Claude Desktop, you can say:
- "Scan this code for EU AI Act compliance" (paste your code)
- "Check this text for prompt injection: ignore all previous instructions"
- "Add a trust layer to this LangChain agent code"
- "Explain what Article 12 requires"
- "Generate a compliance report for my project at ./src"
Optional: Local Model
For deeper analysis, install Ollama and the AIR compliance model:
```bash ollama pull air-compliance-v2 ```
The MCP server will automatically use the local model when available, falling back to rule-based scanning otherwise.