
cloin/semaphore-mcp 是从 https://github.com/cloin/semaphore-mcp. 导入的 MCP 服务器候选
概览
cloin/semaphore-mcp 是从 https://github.com/cloin/semaphore-mcp. 导入的 MCP 服务器候选
概述(AI 翻译)
一个模型上下文协议(MCP)服务器,连接 AI 助手与 SemaphoreUI——实现对 Ansible 自动化的自然语言控制。
快速启动
先决条件
- Docker(或 Podman)
- 带有 API 令牌的运行 SemaphoreUI 实例
- Claude桌面版或Claude代码(或其他MCP客户端)
- Node.js(仅适用于 Claude 桌面版——
mcp-remote必须)
1.获取一个信号式UI API 令牌
- 登录你的SemaphoreUI实例
- 进入用户设置
- 生成新的 API 令牌
2.运行MCP服务器
注意:
SEMAPHORE_URL是 MCP 服务器连接到 SemaphoreUI 的地方。[MCP_PORT是 MCP 服务器监听客户端连接的地方(Claude 桌面/代码)。请在下面的客户端配置中使用该端口。
3a. 配置Claude桌面
Claude Desktop 需要 mcp-remote 代理才能连接到基于 HTTP 的 MCP 服务器。这需要安装Node.js(npx 自带 npm)。
编辑你的配置文件:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/claude-desktop/claude_desktop_config.json
3b. 配置Claude代码
本页由 AI 翻译,技术细节请以原文为准。
README
以下为原文 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 |
安装
npx mcp-remote http://127.0.0.1:8500/mcp配置
{
"mcpServers": {
"semaphore": {
"command": "npx",
"args": ["mcp-remote", "http://127.0.0.1:8500/mcp"]
}
}
}