SemaphoreUI MCP Server
Enables AI assistants to interact with SemaphoreUI for managing and running Ansible automation tasks through natural language commands.
README
SemaphoreUI MCP Server
A Model Context Protocol (MCP) server that connects AI assistants to SemaphoreUI - enabling natural language control of Ansible automation.

Quick Start
Prerequisites
- Docker (or Podman)
- A running SemaphoreUI instance with an API token
- Claude Desktop or Claude Code (or another MCP client)
- Node.js (for Claude Desktop only - required for
mcp-remote)
1. Get a SemaphoreUI API Token
- Login to your SemaphoreUI instance
- Go to User Settings
- Generate a new API token
2. Run the MCP Server
docker run -d --name semaphore-mcp \
--network host \
-e SEMAPHORE_URL=http://localhost:3000 \
-e SEMAPHORE_API_TOKEN=your-token-here \
-e MCP_PORT=8500 \
ghcr.io/cloin/semaphore-mcp:latest
Note:
SEMAPHORE_URLis where the MCP server connects to SemaphoreUI.MCP_PORTis where the MCP server listens for client connections (Claude Desktop/Code). Use this port in your client configuration below.
3a. Configure Claude Desktop
Claude Desktop requires the mcp-remote proxy to connect to HTTP-based MCP servers. This requires Node.js to be installed (npx comes with npm).
Edit your config file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude-desktop/claude_desktop_config.json
{
"mcpServers": {
"semaphore": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:8500/mcp"]
}
}
}
3b. Configure Claude Code
Claude Code supports remote MCP servers directly:
claude mcp add --transport http semaphore http://127.0.0.1:8500/mcp
Verify it's configured:
claude mcp list
4. Test It
Restart Claude Desktop and try:
"List all projects in SemaphoreUI"
Docker Networking
The MCP server container needs to reach your SemaphoreUI instance.
SemaphoreUI on the same host:
Use --network host so the container can access localhost:
docker run -d --name semaphore-mcp \
--network host \
-e SEMAPHORE_URL=http://localhost:3000 \
-e SEMAPHORE_API_TOKEN=your-token \
-e MCP_PORT=8500 \
ghcr.io/cloin/semaphore-mcp:latest
SemaphoreUI on a different host:
Use the IP or hostname directly (no --network host needed):
docker run -d --name semaphore-mcp \
-e SEMAPHORE_URL=http://192.168.1.100:3000 \
-e SEMAPHORE_API_TOKEN=your-token \
-p 8500:8000 \
ghcr.io/cloin/semaphore-mcp:latest
For more details, see Docker's networking documentation.
Configuration
| Variable | Required | Default | Description |
|---|---|---|---|
SEMAPHORE_URL |
Yes | - | URL to your SemaphoreUI instance |
SEMAPHORE_API_TOKEN |
Yes | - | API token from SemaphoreUI |
MCP_TRANSPORT |
No | http |
Transport mode: http or stdio |
MCP_HOST |
No | 0.0.0.0 |
Host to bind to |
MCP_PORT |
No | 8000 |
Port to listen on |
What You Can Do
Once connected, you can interact with SemaphoreUI through natural conversation:
Run automation:
"Run the database backup playbook on production"
Monitor tasks:
"Show me all failed tasks from the last hour and analyze the errors"
Manage infrastructure:
"Create a new staging environment with APP_ENV=staging"
Troubleshoot:
"Get the output from task 42 and tell me why it failed"
Available Tools
Projects: list_projects, get_project, create_project, update_project, delete_project
Project backups: backup_project, restore_project_backup, validate_project_backup, summarize_project_backup, clone_project
Project users: get_project_role, list_project_users, add_project_user, update_project_user, remove_project_user
Views: list_views, get_view, create_view, update_view, delete_view
Templates: list_templates, get_template, create_template, update_template, delete_template
Schedules: list_schedules, list_template_schedules, get_schedule, create_schedule, update_schedule, set_schedule_active, delete_schedule, validate_schedule_cron_format
Tasks: list_tasks, get_task, run_task, stop_task, get_task_raw_output, filter_tasks, bulk_stop_tasks
Analysis: analyze_task_failure, bulk_analyze_failures, get_latest_failed_task
Events: list_events, get_last_events, list_project_events, summarize_project_activity
Environments: list_environments, get_environment, create_environment, update_environment, delete_environment
Inventory: list_inventory, get_inventory, create_inventory, update_inventory, delete_inventory
Repositories: list_repositories, get_repository, create_repository, update_repository, delete_repository
Access keys: list_access_keys, get_access_key, create_access_key, update_access_key, delete_access_key
Troubleshooting
Container won't start or exits immediately:
docker logs semaphore-mcp
Can't connect to SemaphoreUI from container:
- If SemaphoreUI is on localhost, use
--network host - Check that the URL is reachable from inside the container
- Verify the API token is correct
Claude Desktop not seeing the MCP server:
- Ensure the container is running:
docker ps - Check the port is accessible:
curl http://127.0.0.1:8500/mcp - Restart Claude Desktop after config changes
Enable debug logging:
docker run -d --name semaphore-mcp \
--network host \
-e SEMAPHORE_URL=http://localhost:3000 \
-e SEMAPHORE_API_TOKEN=your-token \
-e MCP_PORT=8500 \
-e MCP_LOG_LEVEL=DEBUG \
ghcr.io/cloin/semaphore-mcp:latest
Development
For local development and contributing, see DEVELOPMENT.md.
For testing documentation (unit tests, E2E tests, CI/CD), see TESTING.md.
Resources
License
This project is licensed under the GNU Affero General Public License v3.0 - see the LICENSE file for details.
Note: Versions prior to 1.0.0 were released under the MIT License.
推荐服务器
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 模型以安全和受控的方式获取实时的网络信息。