Skip to content

Commit b6d3451

Browse files
committed
feat: add GitHub Actions tools for workflow management
- Introduced new tools for managing GitHub Actions workflows, including listing workflows, running workflows, canceling workflow runs, and retrieving workflow run logs. - Updated README.md to include new `actions` toolset and detailed descriptions of the new tools. - Added comprehensive tests for the new functionality to ensure reliability and correctness.
1 parent 392df2d commit b6d3451

File tree

3 files changed

+1784
-3
lines changed

3 files changed

+1784
-3
lines changed

README.md

Lines changed: 105 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ The following sets of tools are available (all are on by default):
151151
| `issues` | Issue-related tools (create, read, update, comment) |
152152
| `users` | Anything relating to GitHub Users |
153153
| `pull_requests` | Pull request operations (create, merge, review) |
154+
| `actions` | GitHub Actions workflows and CI/CD operations |
154155
| `code_security` | Code scanning alerts and security features |
155156
| `experiments` | Experimental features (not considered stable) |
156157

@@ -161,12 +162,12 @@ To specify toolsets you want available to the LLM, you can pass an allow-list in
161162
1. **Using Command Line Argument**:
162163

163164
```bash
164-
github-mcp-server --toolsets repos,issues,pull_requests,code_security
165+
github-mcp-server --toolsets repos,issues,pull_requests,actions,code_security
165166
```
166167

167168
2. **Using Environment Variable**:
168169
```bash
169-
GITHUB_TOOLSETS="repos,issues,pull_requests,code_security" ./github-mcp-server
170+
GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security" ./github-mcp-server
170171
```
171172

172173
The environment variable `GITHUB_TOOLSETS` takes precedence over the command line argument if both are provided.
@@ -178,7 +179,7 @@ When using Docker, you can pass the toolsets as environment variables:
178179
```bash
179180
docker run -i --rm \
180181
-e GITHUB_PERSONAL_ACCESS_TOKEN=<your-token> \
181-
-e GITHUB_TOOLSETS="repos,issues,pull_requests,code_security,experiments" \
182+
-e GITHUB_TOOLSETS="repos,issues,pull_requests,actions,code_security,experiments" \
182183
ghcr.io/github/github-mcp-server
183184
```
184185

@@ -568,6 +569,107 @@ export GITHUB_MCP_TOOL_ADD_ISSUE_COMMENT_DESCRIPTION="an alternative description
568569
- `page`: Page number (number, optional)
569570
- `perPage`: Results per page (number, optional)
570571

572+
### Actions
573+
574+
- **list_workflows** - List workflows in a repository
575+
576+
- `owner`: Repository owner (string, required)
577+
- `repo`: Repository name (string, required)
578+
- `page`: Page number (number, optional)
579+
- `perPage`: Results per page (number, optional)
580+
581+
- **list_workflow_runs** - List workflow runs for a specific workflow
582+
583+
- `owner`: Repository owner (string, required)
584+
- `repo`: Repository name (string, required)
585+
- `workflow_id`: Workflow ID or filename (string, required)
586+
- `branch`: Filter by branch name (string, optional)
587+
- `event`: Filter by event type (string, optional)
588+
- `status`: Filter by run status (string, optional)
589+
- `page`: Page number (number, optional)
590+
- `perPage`: Results per page (number, optional)
591+
592+
- **run_workflow** - Trigger a workflow via workflow_dispatch event
593+
594+
- `owner`: Repository owner (string, required)
595+
- `repo`: Repository name (string, required)
596+
- `workflow_id`: Workflow ID or filename (string, required)
597+
- `ref`: Git reference (branch, tag, or SHA) (string, required)
598+
- `inputs`: Input parameters for the workflow (object, optional)
599+
600+
- **get_workflow_run** - Get details of a specific workflow run
601+
602+
- `owner`: Repository owner (string, required)
603+
- `repo`: Repository name (string, required)
604+
- `run_id`: Workflow run ID (number, required)
605+
606+
- **get_workflow_run_logs** - Download logs for a workflow run
607+
608+
- `owner`: Repository owner (string, required)
609+
- `repo`: Repository name (string, required)
610+
- `run_id`: Workflow run ID (number, required)
611+
612+
- **list_workflow_jobs** - List jobs for a workflow run
613+
614+
- `owner`: Repository owner (string, required)
615+
- `repo`: Repository name (string, required)
616+
- `run_id`: Workflow run ID (number, required)
617+
- `filter`: Filter by job status (string, optional)
618+
- `page`: Page number (number, optional)
619+
- `perPage`: Results per page (number, optional)
620+
621+
- **get_job_logs** - Download logs for a specific job
622+
623+
- `owner`: Repository owner (string, required)
624+
- `repo`: Repository name (string, required)
625+
- `job_id`: Job ID (number, required)
626+
627+
- **rerun_workflow_run** - Re-run an entire workflow
628+
629+
- `owner`: Repository owner (string, required)
630+
- `repo`: Repository name (string, required)
631+
- `run_id`: Workflow run ID (number, required)
632+
- `enable_debug_logging`: Enable debug logging for the re-run (boolean, optional)
633+
634+
- **rerun_failed_jobs** - Re-run only the failed jobs in a workflow run
635+
636+
- `owner`: Repository owner (string, required)
637+
- `repo`: Repository name (string, required)
638+
- `run_id`: Workflow run ID (number, required)
639+
- `enable_debug_logging`: Enable debug logging for the re-run (boolean, optional)
640+
641+
- **cancel_workflow_run** - Cancel a running workflow
642+
643+
- `owner`: Repository owner (string, required)
644+
- `repo`: Repository name (string, required)
645+
- `run_id`: Workflow run ID (number, required)
646+
647+
- **list_workflow_run_artifacts** - List artifacts from a workflow run
648+
649+
- `owner`: Repository owner (string, required)
650+
- `repo`: Repository name (string, required)
651+
- `run_id`: Workflow run ID (number, required)
652+
- `page`: Page number (number, optional)
653+
- `perPage`: Results per page (number, optional)
654+
655+
- **download_workflow_run_artifact** - Get download URL for a specific artifact
656+
657+
- `owner`: Repository owner (string, required)
658+
- `repo`: Repository name (string, required)
659+
- `artifact_id`: Artifact ID (number, required)
660+
661+
- **delete_workflow_run_logs** - Delete logs for a workflow run
662+
663+
- `owner`: Repository owner (string, required)
664+
- `repo`: Repository name (string, required)
665+
- `run_id`: Workflow run ID (number, required)
666+
667+
- **get_workflow_run_usage** - Get usage metrics for a workflow run
668+
669+
- `owner`: Repository owner (string, required)
670+
- `repo`: Repository name (string, required)
671+
- `run_id`: Workflow run ID (number, required)
672+
571673
### Code Scanning
572674

573675
- **get_code_scanning_alert** - Get a code scanning alert

0 commit comments

Comments
 (0)