AAP MCP Server
Enterprise-grade MCP server exposing Ansible Automation Platform 2.x as a complete AI interface for LLMs, enabling natural language management of automation resources.
README
AAP MCP Server
Enterprise-grade MCP (Model Context Protocol) server that exposes Ansible Automation Platform (AAP) 2.x as a complete AI interface for LLMs — Claude, ChatGPT, Cursor, Continue, OpenCode, and any MCP-compatible client.
Features
| Category | Tools |
|---|---|
| Organizations | list, get, create, update, delete |
| Users & Teams | list, create, assign/revoke roles, team membership |
| Projects | list, get, create, update, delete, sync, sync-status |
| Inventories | list, create, update, delete + hosts + groups |
| Credentials | list, get, create, update, delete + credential types |
| Execution Environments | list, create, update, delete |
| Job Templates | list, get, create, update, delete, copy, launch, relaunch, cancel |
| Workflows | list, get, create, update, delete, launch, status |
| Schedules | list, create, update, delete |
| Automation Hub | list collections |
| Platform Admin | controller health, cluster status, license info, instances |
| Monitoring | job output, job events, failed jobs, running jobs, activity stream, audit logs |
| Config-as-Code | export project/inventory/job-template/workflow/all as YAML |
Total: 60+ tools
Quick Start
1. Clone & Configure
git clone https://github.com/your-org/aap-mcp-server
cd aap-mcp-server
cp .env.example .env
# Edit .env with your AAP Controller URL and OAuth token
2. Run locally (stdio mode for Claude Desktop/local client)
pip install -r requirements.txt
python -m src.server
3. Run as Remote HTTP Server (exposes a network port)
MCP_TRANSPORT=streamable-http MCP_PORT=8000 python -m src.server
4. Deploy to OpenShift
# Build with Podman
podman build -f Containerfile -t quay.io/your-org/aap-mcp-server:latest .
podman push quay.io/your-org/aap-mcp-server:latest
# Deploy via Helm
helm upgrade --install aap-mcp helm/aap-mcp/ \
--namespace aap-mcp \
--create-namespace \
--set aap.controllerUrl=https://controller.example.com \
--set aap.oauthToken=your_token \
--set route.enabled=true
Claude Desktop / MCP Client Configuration
Option A: Local Python (stdio)
Add to ~/.config/claude/claude_desktop_config.json or your MCP client settings:
{
"mcpServers": {
"aap": {
"command": "python",
"args": ["-m", "src.server"],
"cwd": "/path/to/aap-mcp-server",
"env": {
"AAP_CONTROLLER_URL": "https://your-controller.example.com",
"AAP_OAUTH_TOKEN": "your_token_here",
"AAP_VERIFY_SSL": "false",
"AAP_API_BASE_PATH": "/api/controller/v2",
"MCP_TRANSPORT": "stdio"
}
}
}
}
Option B: Docker Container (stdio)
Run the server inside a Docker container using stdio transport:
{
"mcpServers": {
"aap-docker-stdio": {
"command": "docker",
"args": [
"run", "--rm", "-i",
"--env", "AAP_CONTROLLER_URL",
"--env", "AAP_VERIFY_SSL",
"--env", "AAP_API_BASE_PATH",
"--env", "AAP_OAUTH_TOKEN",
"--env", "MCP_TRANSPORT=stdio",
"aap-mcp-server:latest"
],
"env": {
"AAP_CONTROLLER_URL": "https://your-controller.example.com",
"AAP_VERIFY_SSL": "false",
"AAP_API_BASE_PATH": "/api/controller/v2",
"AAP_OAUTH_TOKEN": "your_token_here"
}
}
}
}
Option C: Remote HTTP / SSE Server (Docker)
Run the server as a background service exposing port 8000:
docker run -d --name aap-mcp-server-container -p 8000:8000 \
-e AAP_CONTROLLER_URL="https://your-controller.example.com" \
-e AAP_OAUTH_TOKEN="your_token_here" \
-e AAP_VERIFY_SSL="false" \
-e AAP_API_BASE_PATH="/api/controller/v2" \
-e MCP_TRANSPORT="streamable-http" \
-e MCP_PORT="8000" \
-e MCP_HOST="0.0.0.0" \
aap-mcp-server:latest
Then configure your MCP client (like Cursor or remote Claude clients) to connect to the HTTP endpoint:
- Endpoint URL:
http://<your-host-ip>:8000/mcp
Natural Language Examples
Once connected, try:
- "Create a new project called redis-automation from GitHub at https://github.com/myorg/redis-playbooks"
- "Launch the Redis production workflow"
- "Show failed jobs from the last 24 hours"
- "Create an inventory called AWS-Production in the Default organization"
- "Add host web01.example.com to the Production inventory"
- "Create a job template for Apache installation using the web-playbooks project"
- "Export all job templates as code"
- "Show cluster health"
- "List users with admin privileges"
Security & Settings
- OAuth tokens preferred over username/password.
- Read-only mode: set
AAP_MCP_READ_ONLY_MODE=trueto block all mutations. - Confirmation workflow: destructive operations (delete/cancel) require a two-step confirmation token.
- Audit logging: all tool calls logged to structured JSONL with secrets masked.
- Rate limiting: configurable token-bucket limiter to avoid AAP API overload.
- RBAC: all operations respect the authenticated AAP user's permissions.
- API Base Path: set
AAP_API_BASE_PATH(e.g./api/controller/v2) if your controller API is mounted on a non-standard base path (default:/api/v2).
Architecture
MCP Client (Claude/Cursor/etc)
│
│ MCP Protocol (stdio or streamable HTTP)
▼
aap-mcp-server (FastMCP)
├── tools/ # 60+ tool implementations
├── resources/ # URI-addressable AAP data + API mapping
├── prompts/ # Pre-built operational workflow prompts
└── utils/
├── api_client.py # Shared HTTP client, pagination, rate limiting
├── auth.py # OAuth token management
├── audit.py # Structured audit logging
└── config.py # Pydantic settings from env vars
│
│ HTTPS REST API (/api/v2/)
▼
Ansible Automation Platform Controller
Development
# Install dev dependencies
pip install -r requirements.txt -r requirements-dev.txt
# Run tests
pytest tests/unit/ -v
# Run integration tests (requires live AAP)
AAP_CONTROLLER_URL=https://... AAP_OAUTH_TOKEN=... pytest tests/integration/
# Lint
ruff check src/
black src/
API → Tool Mapping
See the aap://api-map MCP resource for the complete mapping, or query it:
"Show me the API mapping for all tools"
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。