Skip to content
Software capabilities

GitHub capability

Read GitHub Actions job logs

GitHub’s MCP server can read Actions job logs when the Actions toolset is available. Use the REST endpoint to download one job’s log, or use gh or the Actions page to inspect a failure by step.

Documentation reviewed

Ways to do it

API

GET /repos/{owner}/{repo}/actions/jobs/{job_id}/logs

Request the log for one job and follow the download redirect.

Requirements
Repository read access and a numeric job ID. A fine-grained token for a private repository needs Actions read permission.
Limitations
The redirect URL expires after one minute.

Example

curl --fail --location -H "Authorization: Bearer $GITHUB_TOKEN" \
  "https://api.github.com/repos/$OWNER/$REPO/actions/jobs/$JOB_ID/logs"
Read source: GitHub REST API job logs

MCP

get_job_logs

Retrieve the log for a workflow job from a client connected to GitHub’s MCP server.

Requirements
Access to the repository and a connection that exposes the Actions toolset.
Limitations
Set return_content to true when you need the log text in the tool response. With the default setting, the tool returns URLs.

Example

{
  "owner": "OWNER",
  "repo": "REPO",
  "job_id": 123456,
  "return_content": true
}
Read source: GitHub MCP Server Actions tools

CLI

gh run view --job <job-id> --log

Print one job’s log in your terminal. Add --log-failed in place of --log to focus on failed steps.

Requirements
GitHub CLI authenticated for the repository and the numeric job ID.
Limitations
Some lines can appear under UNKNOWN STEP when gh cannot associate them with a specific step.

Example

gh run view --repo "$OWNER/$REPO" --job "$JOB_ID" --log
Read source: GitHub CLI run view

Interface

Actions → workflow run → job

Open a run, select the job, and expand the step you want to inspect.

Requirements
Access to the repository’s Actions page and the run.
Limitations
Searching the job log covers expanded steps. Expand the relevant steps first.
Read source: GitHub workflow run logs