act-mcp
by Isco0819
README.md
# act-mcp
MCP stdio server exposing three tools for running GitHub Actions locally via [act](https://github.com/nektos/act).
## Peer dependency: act
`act` must be installed and in `PATH`:
```bash
# macOS
brew install act
# Linux
curl https://raw.githubusercontent.com/nektos/act/master/install.sh | sudo bash
```
## MCP Tools
### `list_workflows`
Globs `.github/workflows/*.yml` and returns job names from each file.
| Field | Type | Description |
|---|---|---|
| `cwd` | `string?` | Repo root (default: `process.cwd()`) |
**Returns**: `Array<{ file: string, jobs: string[] }>`
### `run_job`
Spawns `act -j <jobName>`, captures stdout+stderr, caches logs.
| Field | Type | Description |
|---|---|---|
| `jobName` | `string` | Job ID (key under `jobs:` in the YAML) |
| `cwd` | `string?` | Repo root (default: `process.cwd()`) |
**Returns**: `{ exitCode: number, logs: string }`
### `get_logs`
Returns logs cached by the most recent `run_job` call.
**Returns**: `{ logs: string | null }`
## Agent loop
```
list_workflows → pick failing job
run_job → read exitCode + logs
get_logs → inspect failure output
(patch YAML)
run_job → verify fix
```
## MCP client config (Claude Desktop)
```json
{
"mcpServers": {
"act-mcp": {
"command": "npx",
"args": ["act-mcp"]
}
}
}
```
Or point `cwd` at a specific repo:
```json
{
"mcpServers": {
"act-mcp": {
"command": "npx",
"args": ["act-mcp"],
"env": {}
}
}
}
```
Pass `cwd` as a tool argument at call time:
```json
{ "name": "list_workflows", "arguments": { "cwd": "/path/to/repo" } }
```
## Development
```bash
npm install
npm run build # tsc → dist/
npm test # vitest (uses mock act binary, no act required)
npm run dev # run via tsx without building
```
## Environment variables
| Variable | Default | Description |
|---|---|---|
| `ACT_BIN` | `act` | Path to the act binary (useful for testing) |
TDQS
A4/5.0
Scored across 3 tools
Disambiguation5/5
Each tool targets a distinct action: listing workflows, running a job, and retrieving logs. There is no functional overlap between them.
Naming Consistency5/5
All tool names follow a consistent verb_noun pattern using snake_case: list_workflows, run_job, get_logs. No deviations.
Tool Count5/5
Three tools is within the typical well-scoped range (3-15) and each tool serves a necessary and clear purpose in the workflow.
Completeness5/5
The tool set covers the full lifecycle for the server's domain: listing available workflows, executing a job, and retrieving results. No obvious gaps are present.
Maintenance
ActivityStale
ResponsivenessNo issues