Sign inSign up

setswei/semaphoreui-mcp

By setswei

•Updated 5 months ago

a mcp server for semaphoreui

Image
API management
Machine learning & AI
Developer tools
0

543

setswei/semaphoreui-mcp repository overview

⁠Semaphore UI MCP Server

A Model Context Protocol (MCP) server that gives AI assistants full access to Semaphore UI⁠ — both its documentation and its API. Search docs, manage projects, run tasks, and troubleshoot failures through natural language.

⁠What it does

  • 44 tools — 4 documentation tools + 40 API tools
  • Documentation search — indexes the full Semaphore UI docs⁠ from GitHub at build time with weighted keyword search and snippet extraction
  • Full CRUD — create, read, update, and delete projects, templates, inventories, environments, repositories, access keys, and schedules
  • Task management — run tasks, stop tasks, get output/logs, filter by status, analyze failures
  • Dual transport — stdio (default, for Kiro CLI / Claude Desktop) or HTTP (--http flag for remote/standalone use)

⁠Quick Start

⁠1. Pull the image
docker pull setswei/semaphoreui-mcp:latest

Or build locally:

docker build -t mcp/semaphoreui-docs .
⁠2. Add to your MCP config
⁠Kiro CLI (~/.kiro/settings/mcp.json)

Docs only (no Semaphore instance needed):

{
  "mcpServers": {
    "semaphore-docs": {
      "args": ["run", "-i", "--rm", "setswei/semaphoreui-mcp:latest"],
      "command": "docker"
    }
  }
}

Docs + API (full access to your Semaphore instance):

{
  "mcpServers": {
    "semaphore-docs": {
      "args": [
        "run", "-i", "--rm",
        "-e", "SEMAPHORE_URL",
        "-e", "SEMAPHORE_API_TOKEN",
        "setswei/semaphoreui-mcp:latest"
      ],
      "command": "docker",
      "env": {
        "SEMAPHORE_URL": "http://host.docker.internal:3000",
        "SEMAPHORE_API_TOKEN": "your-api-token-here"
      }
    }
  }
}
⁠Claude Desktop

Same format as above in ~/Library/Application Support/Claude/claude_desktop_config.json (macOS).

⁠3. Restart your AI client

The container starts automatically when the MCP client connects.

Use host.docker.internal instead of localhost for SEMAPHORE_URL since the MCP runs inside Docker.

⁠Tools

⁠Documentation Tools (always available)
ToolDescription
semaphoreui_docs_searchKeyword search across all docs, returns top 10 with relevant snippets
semaphoreui_docs_search_and_readSearch and return full content of top N pages (1-5) in one call
semaphoreui_docs_readRead a specific doc page by path
semaphoreui_docs_listList all 93 documentation pages
⁠API Tools — Projects
ToolDescription
semaphoreui_api_list_projectsList all projects
semaphoreui_api_get_projectGet project details
semaphoreui_api_create_projectCreate a new project
semaphoreui_api_update_projectUpdate a project
semaphoreui_api_delete_projectDelete a project
⁠API Tools — Templates
ToolDescription
semaphoreui_api_list_templatesList task templates in a project
semaphoreui_api_get_templateGet a specific template
semaphoreui_api_create_templateCreate a task template
semaphoreui_api_update_templateUpdate a template
semaphoreui_api_delete_templateDelete a template
⁠API Tools — Tasks
ToolDescription
semaphoreui_api_run_taskStart a task (supports debug, dry_run, diff, limit, branch override)
semaphoreui_api_list_tasksGet the last 200 tasks
semaphoreui_api_get_taskGet task status and details
semaphoreui_api_get_task_outputGet structured task output
semaphoreui_api_get_task_raw_outputGet raw text output/logs
semaphoreui_api_stop_taskStop a task (returns updated status)
semaphoreui_api_filter_tasksFilter tasks by status and/or template
semaphoreui_api_get_latest_failed_taskGet the most recent failed task
semaphoreui_api_analyze_task_failureGet failed task details + output in one call
semaphoreui_api_bulk_stop_tasksStop all active tasks for a template
⁠API Tools — Inventory
ToolDescription
semaphoreui_api_list_inventoryList inventories
semaphoreui_api_create_inventoryCreate an inventory (static, static-yaml, or file)
semaphoreui_api_update_inventoryUpdate an inventory
semaphoreui_api_delete_inventoryDelete an inventory
⁠API Tools — Access Keys
ToolDescription
semaphoreui_api_list_keysList access keys
semaphoreui_api_create_keyCreate a key (none, ssh, or login_password)
semaphoreui_api_update_keyUpdate a key
semaphoreui_api_delete_keyDelete a key
⁠API Tools — Repositories
ToolDescription
semaphoreui_api_list_repositoriesList repositories
semaphoreui_api_create_repositoryCreate a repository
semaphoreui_api_update_repositoryUpdate a repository
semaphoreui_api_delete_repositoryDelete a repository
⁠API Tools — Environments (Variable Groups)
ToolDescription
semaphoreui_api_list_environmentsList variable groups
semaphoreui_api_create_environmentCreate a variable group
semaphoreui_api_update_environmentUpdate a variable group
semaphoreui_api_delete_environmentDelete a variable group
⁠API Tools — Schedules
ToolDescription
semaphoreui_api_list_schedulesList schedules
semaphoreui_api_create_scheduleCreate a schedule (cron)
semaphoreui_api_update_scheduleUpdate a schedule
semaphoreui_api_delete_scheduleDelete a schedule

⁠Running as HTTP Server

For standalone or remote use:

docker run -d -p 3001:3001 \
  -e SEMAPHORE_URL=http://semaphore:3000 \
  -e SEMAPHORE_API_TOKEN=your-token \
  setswei/semaphoreui-mcp:latest \
  node dist/index.js --http

Then use "url": "http://localhost:3001/mcp" in your MCP config.

⁠Environment Variables

VariableRequiredDefaultDescription
SEMAPHORE_URLNohttp://localhost:3000URL of your Semaphore instance
SEMAPHORE_API_TOKENNo—API token (enables 40 API tools)
MCP_LOG_LEVELNoinfoLog level: debug, info, warn, error

⁠Example Prompts

Search the semaphore docs for how to configure LDAP authentication.
List all my Semaphore projects and show the templates in the first one.
Run the "Deploy Production" template in project 1 with dry_run enabled.
Show me all failed tasks in the last week and analyze the most recent failure.
Create a new project called "staging", add a repository pointing to my git repo,
create a static inventory with my hosts, and set up a template to run my playbook.

⁠Development

npm install
npm run build
npm test                    # 57 unit tests
node dist/index.js          # stdio mode
node dist/index.js --http   # HTTP mode on port 3001
./scripts/run-e2e.sh        # 17 E2E tests (requires Docker)

⁠CI/CD

The GitLab CI pipeline runs on every push to main:

  1. test — build + 57 unit tests
  2. auto-release — bumps version from conventional commits (feat: → minor, fix: → patch)
  3. build — pushes Docker image with semver tags (1.2.3, 1.2, 1, latest)

See CONTRIBUTING.md⁠ for commit conventions and release process.

⁠Project Structure

├── .gitlab-ci.yml          # CI: test → auto-release → build
├── Dockerfile              # Multi-stage: compile TS → clone docs → run
├── docker-compose.yml      # Run as HTTP server locally
├── docker-compose.test.yml # E2E test environment
├── scripts/run-e2e.sh      # E2E test runner
├── CONTRIBUTING.md         # Commit conventions and release process
├── LICENSE                 # MIT
└── src/
    ├── index.ts            # MCP server (44 tools, stdio/HTTP transport)
    ├── api-client.ts       # Semaphore API HTTP client
    ├── docs.ts             # Documentation indexing and search
    └── logger.ts           # Configurable logging

⁠License

MIT — see LICENSE⁠.

Tag summary

Content type

Image

Digest

sha256:9ff0acdfe…

Size

91.6 MB

Last updated

5 months ago

docker pull setswei/semaphoreui-mcp