semaphore-mcp

v1.0.6
semaphore-mcp Checked 3 days ago Published 2 months ago

Model Context Protocol (MCP) server for SemaphoreUI automation

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_events

List global events visible to the current user. Args: limit: Return only the most recent N events; 0 returns all events Returns: Dictionary containing the list of events

ParameterTypeDescription
limitinteger

get_last_events

List the last global events visible to the current user. Semaphore returns the last 200 events. The optional limit trims that response further on the MCP side. Args: limit: Return only the most recent N events; 0 returns all returned events Returns: Dictionary containing the list of events

ParameterTypeDescription
limitinteger

list_project_events

List events related to a project. Args: project_id: ID of the project limit: Return only the most recent N events; 0 returns all events Returns: Dictionary containing the list of project events

ParameterTypeDescription
project_id *integer
limitinteger

summarize_project_activity

Summarize recent project activity from Semaphore events. Args: project_id: ID of the project limit: Number of most recent events to analyze recent_limit: Number of recent event objects to include Returns: Counts and recent event details for project activity

ParameterTypeDescription
project_id *integer
limitinteger
recent_limitinteger

list_projects

List all projects in SemaphoreUI. Returns: A dictionary containing the list of projects.

get_project

Get details of a specific project. Args: project_id: ID of the project to fetch Returns: Project details

ParameterTypeDescription
project_id *integer

create_project

Create a new project. Args: name: Project name alert: Enable alerts (default: False) alert_chat: Chat channel for alerts (optional) max_parallel_tasks: Maximum parallel tasks, 0 = unlimited (default: 0) project_type: Project type (optional) demo: Create demo resources (default: False) Returns: Created project details

ParameterTypeDescription
name *string
alertboolean
alert_chat
demoboolean
max_parallel_tasksinteger
project_type

update_project

Update an existing project. Args: project_id: ID of the project to update name: Project name (optional) alert: Enable alerts (optional) alert_chat: Chat channel for alerts (optional) max_parallel_tasks: Maximum parallel tasks (optional) project_type: Project type (optional) Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
alert
alert_chat
max_parallel_tasks
name
project_type

delete_project

Delete a project. Args: project_id: ID of the project to delete Returns: Empty dict on success

ParameterTypeDescription
project_id *integer

backup_project

Export a Semaphore project backup. Args: project_id: ID of the project to back up Returns: Backup payload and a resource summary.

ParameterTypeDescription
project_id *integer

restore_project_backup

Restore a Semaphore project from a backup payload. Args: backup: Backup payload returned by backup_project project_name: Optional name override for the restored project validate: Validate payload shape and references before restore Returns: Created project and summary of the restored backup payload.

ParameterTypeDescription
backup *object
project_name
validateboolean

validate_project_backup

Validate a project backup before attempting restore. Args: backup: Backup payload to inspect Returns: Validation result, errors, warnings, and a summary.

ParameterTypeDescription
backup *object

summarize_project_backup

Summarize the resources contained in a project backup. Args: backup: Backup payload to summarize Returns: Counts, names, and secret-reference indicators for the backup.

ParameterTypeDescription
backup *object

clone_project

Clone a project by backing it up and restoring it with a new name. Args: project_id: ID of the source project name: Name for the cloned project validate: Validate backup payload before restore Returns: Source project ID, created clone, and backup summary.

ParameterTypeDescription
name *string
project_id *integer
validateboolean

get_project_role

Get the current user's role and permissions for a project. Args: project_id: ID of the project Returns: Role and permissions for the current user

ParameterTypeDescription
project_id *integer

list_project_users

List users linked to a project. Args: project_id: ID of the project sort: Field to sort by: name, username, email, or role order: Sort order: asc or desc Returns: Dictionary containing the list of project users

ParameterTypeDescription
project_id *integer
orderstring
sortstring

add_project_user

Link a user to a project with a role. Args: project_id: ID of the project user_id: ID of the user to link role: Project role: owner, manager, task_runner, or guest Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
role *string
user_id *integer

update_project_user

Update a linked user's project role. Args: project_id: ID of the project user_id: ID of the linked user role: Project role: owner, manager, task_runner, or guest Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
role *string
user_id *integer

remove_project_user

Remove a user from a project. Args: project_id: ID of the project user_id: ID of the user to remove Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
user_id *integer

list_views

List all views for a project. Args: project_id: ID of the project Returns: Dictionary containing the list of views

ParameterTypeDescription
project_id *integer

get_view

Get details of a specific view. Args: project_id: ID of the project view_id: ID of the view to fetch Returns: View details

ParameterTypeDescription
project_id *integer
view_id *integer

create_view

Create a new view. Args: project_id: ID of the project title: View title position: View ordering position Returns: Created view details

ParameterTypeDescription
project_id *integer
title *string
position

update_view

Update an existing view. Args: project_id: ID of the project view_id: ID of the view to update title: View title position: View ordering position Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
view_id *integer
position
title

delete_view

Delete a view. Args: project_id: ID of the project view_id: ID of the view to delete Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
view_id *integer

list_templates

List all templates for a project. Args: project_id: ID of the project Returns: A list of templates for the project

ParameterTypeDescription
project_id *integer

get_template

Get details of a specific template. Args: project_id: ID of the project template_id: ID of the template to fetch Returns: Template details

ParameterTypeDescription
project_id *integer
template_id *integer

create_template

Create a new template. Args: project_id: ID of the project name: Template name playbook: Playbook file path (e.g., "playbook.yml") inventory_id: Inventory ID repository_id: Repository ID environment_id: Environment ID description: Template description (optional) arguments: Extra arguments as JSON string (optional) allow_override_args_in_task: Allow overriding arguments in task (default: False) suppress_success_alerts: Suppress success alerts (default: False)…

ParameterTypeDescription
environment_id *integer
inventory_id *integer
name *string
playbook *string
project_id *integer
repository_id *integer
allow_override_args_in_taskboolean
allow_override_branch_in_taskboolean
allow_parallel_tasksboolean
appstring
arguments
autorunboolean
build_template_id
description
git_branch
runner_tag
start_version
suppress_success_alertsboolean
survey_vars
task_params
template_type
vaults
view_id

update_template

Update an existing template. Args: project_id: ID of the project template_id: ID of the template to update name: Template name (optional) playbook: Playbook file path (optional) inventory_id: Inventory ID (optional) repository_id: Repository ID (optional) environment_id: Environment ID (optional) description: Template description (optional) arguments: Extra arguments (optional) allow_override_args_in_task: Allow overriding arguments (optional) suppress_su…

ParameterTypeDescription
project_id *integer
template_id *integer
allow_override_args_in_task
allow_override_branch_in_task
allow_parallel_tasks
app
arguments
autorun
build_template_id
description
environment_id
git_branch
inventory_id
name
playbook
repository_id
runner_tag
start_version
suppress_success_alerts
survey_vars
task_params
template_type
vaults
view_id

delete_template

Delete a template. Args: project_id: ID of the project template_id: ID of the template to delete Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
template_id *integer

stop_all_template_tasks

Stop all running tasks for a template. Args: project_id: ID of the project template_id: ID of the template Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
template_id *integer

list_schedules

List all schedules for a project. Args: project_id: ID of the project Returns: Dictionary containing list of schedules

ParameterTypeDescription
project_id *integer

list_template_schedules

List schedules attached to a template. Args: project_id: ID of the project template_id: ID of the template Returns: Dictionary containing list of template schedules

ParameterTypeDescription
project_id *integer
template_id *integer

get_schedule

Get details of a specific schedule. Args: project_id: ID of the project schedule_id: ID of the schedule to fetch Returns: Schedule details

ParameterTypeDescription
project_id *integer
schedule_id *integer

create_schedule

Create a new schedule. Args: project_id: ID of the project template_id: ID of the template to run name: Schedule name cron_format: Cron expression for recurring schedules active: Whether the schedule is enabled schedule_type: Schedule type: "" for cron, or "run_at" for one-time runs run_at: RFC3339 timestamp for one-time schedules task_params: Optional task parameters to pass when the schedule runs delete_after_run: Delete the one-time schedule after it runs reposito…

ParameterTypeDescription
name *string
project_id *integer
template_id *integer
activeboolean
cron_format
delete_after_run
repository_id
run_at
schedule_typestring
task_params

update_schedule

Update an existing schedule. Args: project_id: ID of the project schedule_id: ID of the schedule to update template_id: ID of the template to run name: Schedule name cron_format: Cron expression for recurring schedules active: Whether the schedule is enabled schedule_type: Schedule type: "" for cron, or "run_at" for one-time runs run_at: RFC3339 timestamp for one-time schedules task_params: Optional task parameters to pass when the schedule runs delete_after_run: Del…

ParameterTypeDescription
project_id *integer
schedule_id *integer
active
cron_format
delete_after_run
name
repository_id
run_at
schedule_type
task_params
template_id

set_schedule_active

Enable or disable a schedule. Args: project_id: ID of the project schedule_id: ID of the schedule to update active: Whether the schedule should be active Returns: Empty dict on success

ParameterTypeDescription
active *boolean
project_id *integer
schedule_id *integer

delete_schedule

Delete a schedule. Args: project_id: ID of the project schedule_id: ID of the schedule to delete Returns: Empty dict on success

ParameterTypeDescription
project_id *integer
schedule_id *integer

validate_schedule_cron_format

Validate a cron expression for Semaphore schedules. Args: project_id: ID of the project cron_format: Cron expression to validate Returns: Empty dict on success

ParameterTypeDescription
cron_format *string
project_id *integer

list_tasks

List tasks for a project with a default limit of 5 to avoid overloading context windows. Args: project_id: ID of the project limit: Maximum number of tasks to return (default: 5) status: Optional status filter (e.g., 'success', 'error', 'running') tags: Optional list of tags to filter by Returns: A list of tasks for the project, limited by the specified count

ParameterTypeDescription
project_id *integer
limitinteger
status
tags

get_task

Get details of a specific task. Args: project_id: ID of the project task_id: ID of the task to fetch Returns: Task details

ParameterTypeDescription
project_id *integer
task_id *integer

run_task

Run a task from a template with optional 30-second monitoring. Args: template_id: ID of the template to run project_id: Optional project ID (if not provided, will attempt to determine from template) environment: Optional environment variables for the task as dictionary limit: Restrict execution to specific hosts/groups (Ansible --limit) dry_run: Run without making changes (Ansible --check) diff: Show differences when changing files (Ansible --diff) debug: Enable verbose debug output playboo…

ParameterTypeDescription
template_id *integer
arguments
debug
diff
dry_run
environment
followboolean
git_branch
inventory_id
limit
message
playbook
project_id

get_latest_failed_task

Get the most recent failed task for a project. Args: project_id: ID of the project Returns: The most recent failed task or a message if no failed tasks are found

ParameterTypeDescription
project_id *integer

filter_tasks

Filter tasks by multiple criteria with bulk operation support. Args: project_id: ID of the project status: List of statuses to filter by (e.g., ['success', 'error']) limit: Maximum number of tasks to return use_last_tasks: Use efficient last 200 tasks endpoint Returns: Filtered tasks with statistics

ParameterTypeDescription
project_id *integer
limitinteger
status
use_last_tasksboolean

stop_task

Stop a running task. Args: project_id: ID of the project task_id: ID of the task to stop Returns: Task stop result

ParameterTypeDescription
project_id *integer
task_id *integer

bulk_stop_tasks

Stop multiple tasks with confirmation. Args: project_id: ID of the project task_ids: List of task IDs to stop confirm: Set to True to execute the bulk stop operation Returns: Confirmation details or bulk stop results

ParameterTypeDescription
project_id *integer
task_ids *array
confirmboolean

get_waiting_tasks

Get all tasks in waiting state for bulk operations. Args: project_id: ID of the project Returns: List of waiting tasks with bulk operation guidance

ParameterTypeDescription
project_id *integer

get_task_raw_output

Get raw output from a completed task for LLM analysis. Args: project_id: ID of the project task_id: ID of the task Returns: Raw task output as plain text

ParameterTypeDescription
project_id *integer
task_id *integer

analyze_task_failure

Analyze a failed task for LLM processing, gathering comprehensive failure context. Args: project_id: ID of the project task_id: ID of the task to analyze Returns: Comprehensive failure analysis data including task details, template context, and outputs

ParameterTypeDescription
project_id *integer
task_id *integer

bulk_analyze_failures

Analyze multiple failed tasks to identify patterns and common issues. Args: project_id: ID of the project limit: Maximum number of failed tasks to analyze (default: 10) Returns: Analysis of multiple failed tasks with pattern detection

ParameterTypeDescription
project_id *integer
limitinteger

list_environments

List all environments for a project. Args: project_id: ID of the project Returns: A list of environments for the project

ParameterTypeDescription
project_id *integer

get_environment

Get details of a specific environment. Args: project_id: ID of the project environment_id: ID of the environment to fetch Returns: Environment details

ParameterTypeDescription
environment_id *integer
project_id *integer

create_environment

Create a new environment. Args: project_id: ID of the project name: Environment name env_data: Environment variables as key-value pairs Returns: Created environment details

ParameterTypeDescription
env_data *object
name *string
project_id *integer

update_environment

Update an existing environment. Args: project_id: ID of the project environment_id: ID of the environment to update name: Environment name (optional) env_data: Environment variables as key-value pairs (optional) Returns: Updated environment details

ParameterTypeDescription
environment_id *integer
project_id *integer
env_data
name

delete_environment

Delete an environment. Args: project_id: ID of the project environment_id: ID of the environment to delete Returns: Deletion result

ParameterTypeDescription
environment_id *integer
project_id *integer

list_inventory

List all inventory items for a project. Args: project_id: ID of the project Returns: A list of inventory items for the project

ParameterTypeDescription
project_id *integer

get_inventory

Get details of a specific inventory item. Args: project_id: ID of the project inventory_id: ID of the inventory item to fetch Returns: Inventory item details

ParameterTypeDescription
inventory_id *integer
project_id *integer

create_inventory

Create a new inventory item. Args: project_id: ID of the project name: Inventory name inventory_data: Inventory content (for "static") or file path on the Semaphore server (for "file") inventory_type: Semaphore inventory type, such as "static", "static-yaml", or "file". Defaults to "static". Returns: Created inventory item details

ParameterTypeDescription
inventory_data *string
name *string
project_id *integer
inventory_typestring

update_inventory

Update an existing inventory item. Args: project_id: ID of the project inventory_id: ID of the inventory item to update name: Inventory name (optional) inventory_data: Inventory content for "static", or file path for "file" (optional) inventory_type: Semaphore inventory type, such as "static", "static-yaml", or "file". Defaults to "static"; pass the existing type if you don't intend to change it. Returns: Updated inventory item details

ParameterTypeDescription
inventory_id *integer
project_id *integer
inventory_data
inventory_typestring
name

delete_inventory

Delete an inventory item. Args: project_id: ID of the project inventory_id: ID of the inventory item to delete Returns: Deletion result

ParameterTypeDescription
inventory_id *integer
project_id *integer

list_repositories

List all repositories for a project. Args: project_id: ID of the project Returns: A list of repositories for the project

ParameterTypeDescription
project_id *integer

get_repository

Get details of a specific repository. Args: project_id: ID of the project repository_id: ID of the repository to fetch Returns: Repository details

ParameterTypeDescription
project_id *integer
repository_id *integer

create_repository

Create a new repository. Args: project_id: ID of the project name: Repository name git_url: Git repository URL git_branch: Git branch to use ssh_key_id: SSH key ID for authentication Returns: Created repository details

ParameterTypeDescription
git_branch *string
git_url *string
name *string
project_id *integer
ssh_key_id *integer

update_repository

Update an existing repository. Args: project_id: ID of the project repository_id: ID of the repository to update name: Repository name (optional) git_url: Git repository URL (optional) git_branch: Git branch to use (optional) ssh_key_id: SSH key ID for authentication (optional) Returns: Updated repository details

ParameterTypeDescription
project_id *integer
repository_id *integer
git_branch
git_url
name
ssh_key_id

delete_repository

Delete a repository. Args: project_id: ID of the project repository_id: ID of the repository to delete Returns: Deletion result

ParameterTypeDescription
project_id *integer
repository_id *integer

list_access_keys

List all access keys for a project. Args: project_id: ID of the project key_type: Optional key type filter ("none", "ssh", or "login_password") sort: Sort field ("name" or "type") order: Sort order ("asc" or "desc") Returns: Dictionary containing list of access keys

ParameterTypeDescription
project_id *integer
key_type
orderstring
sortstring

get_access_key

Get an access key by ID. Args: project_id: ID of the project key_id: ID of the access key Returns: Access key details

ParameterTypeDescription
key_id *integer
project_id *integer

create_access_key

Create a new access key. Args: project_id: ID of the project name: Name for the access key key_type: Type of key - one of: - "none": For public repositories (no credentials needed) - "ssh": For SSH key authentication - "login_password": For username/password authentication login: Username (for ssh or login_password types) password: Password (for login_password type) private_key: Private key content (for ssh type) Returns: Created access key detai…

ParameterTypeDescription
key_type *string
name *string
project_id *integer
login
password
private_key

update_access_key

Update an existing access key. Args: project_id: ID of the project key_id: ID of the access key name: New access key name (optional) key_type: New key type (optional) login: Username for ssh or login_password keys (optional) password: Password for login_password keys (optional) private_key: Private key for ssh keys (optional) override_secret: Force updating stored secret material (optional) Returns: Empty dict on success

ParameterTypeDescription
key_id *integer
project_id *integer
key_type
login
name
override_secret
password
private_key

delete_access_key

Delete an access key by ID. Args: project_id: ID of the project key_id: ID of the access key to delete Returns: Empty dict on success

ParameterTypeDescription
key_id *integer
project_id *integer