Connect GitHub to Codex

Manage repositories, issues, pull requests, and Actions. Add Toolspoke to Codex once and it can use 26 GitHub actions. Your GitHub credential stays in Toolspoke, and you choose which actions Codex may call.

Set it up in Codex

Three steps, the first one once for every toolkit you will ever add.

  1. Add Toolspoke to Codex

    ~/.codex/config.toml

    [mcp_servers.toolspoke] url = "https://toolspoke.com/mcp"

    Codex signs in to Toolspoke on its own the first time it connects, so there is no key to paste.

  2. Install GitHub and connect it

    Add GitHub to a project in your Toolspoke workspace.

    Personal access token. You provide it once, when you install the connector. Toolspoke encrypts it at rest and decrypts it only for the length of a single call, and the gateway attaches it to the outbound request itself, so it is never part of the arguments an agent sends.

    Personal access token
    Create it under Settings → Developer settings → Personal access tokens, on github.com or on your own Enterprise Server instance. Fine-grained tokens need Contents, Issues, Pull requests, and Actions read/write, plus Dependabot alerts read for security metrics, on the repositories you want to reach.
  3. Choose what Codex may do

    All 26 actions start on. Switch off any of the 10 actions that change something in GitHub, and Codex gets a refusal if it tries.

What you can ask Codex for

A few of the GitHub actions that only read, so they are safe to try first.

  • List repositories, newest activity first
  • List an organisation's repositories
  • List a user's public repositories
  • List issues in a repository, newest updated first by default

What Codex can do in GitHub

16 actions read and 10 write.

Reads

  • List my repos

    List repositories, newest activity first. Omit owner to list the repositories the token's own account can reach (including private and organisation ones); pass owner to list a specific organisation's or user's repositories. Use this to resolve a repository's exact owner/repo pair and default branch before other actions.

  • List org repos

    List an organisation's repositories. Use list_user_repos for a personal account, and list_my_repos for the authenticated account's own repositories.

  • List user repos

    List a user's public repositories. Use list_org_repos for an organisation, and list_my_repos for the authenticated account's own repositories.

  • Search repositories

    Search public and accessible repositories with GitHub search syntax, e.g. "language:go stars:>500 topic:cli" or "org:vercel next". Use this to find a repository when you do not already know its owner/repo pair.

  • List issues

    List issues in a repository, newest updated first by default. Pull requests are excluded, use list_pull_requests for those. Filter by state, labels, assignee, or an updated-since timestamp to keep the result small.

  • Get issue

    Fetch one issue with its full body. Set include_comments to also pull the discussion thread. Works for a pull request number too, but returns only its issue-side fields, use get_pull_request for branch and diff detail.

  • List issue comments

    Read the comments on an issue, oldest first. Call get_issue first for the issue itself.

  • List pull requests

    List pull requests in a repository. Filter by state, or by head ("owner:branch") and base branch to find the PR for a specific branch.

  • Get pull request

    Fetch one pull request with its body, merge state, and diff totals. Set include_files to also list the changed files with per-file line counts (file names and counts only, not the patch text).

  • List pull request files

    List the files a pull request changes, with per-file additions and deletions. Call get_pull_request first for the pull request itself.

  • Get file contents

    Read a file or list a directory from a repository at a branch, tag, or commit. Text files come back decoded and truncated at 40,000 characters; directories come back as an entry listing. Use this before quoting or editing repository content.

  • List commits

    List commits on a branch, optionally narrowed to one file path, one author, or a date range. Returns short SHAs and first-line messages, so pair it with get_file_contents when you need the actual change.

  • List workflow runs

    List GitHub Actions runs for a repository, newest first. Narrow to one workflow file, a branch, or a status such as "failure" to check whether CI is green before merging.

  • List runs for workflow

    List runs of one workflow, newest first. Use list_workflow_runs for every workflow in the repository.

  • Get branch

    Read a named branch and its current commit SHA and tree SHA. Use commit.sha to create a new branch and commit.commit.tree.sha as create_tree.base_tree. Branches containing slashes are supported.

  • List dependabot alerts

    List Dependabot dependency vulnerability alerts for one repository. Defaults to open alerts; use severity high,critical to measure outstanding serious dependency risks (lower is better). Returns items and nextCursor; pass nextCursor as after until it is null before counting. An inaccessible repository or disabled/unavailable scanning is an error, never zero alerts. OAuth/classic tokens require security_events (public_repo for public repositories); fine-grained tokens require Dependabot alerts read. Existing OAuth connections may need reconnecting for the new scope. This is a dependency-security outcome, not a measure of every PR review; improvements require fixes to be merged. Never dismiss alerts to improve a metric.

Writes

  • Create issue

    Open a new issue in a repository. Returns the created issue including its number and URL.

  • Update issue

    Edit an existing issue: change its title or body, close or reopen it, or replace its labels and assignees. Pass at least one field to change; labels and assignees replace the current set rather than adding to it. Closing an issue is reversible, set state to "open" to undo it.

  • Comment on issue

    Post a comment on an issue or on a pull request's conversation tab. Pull requests accept the same issue number here.

  • Create pull request

    Open a pull request from an existing branch. The head branch must already exist and differ from base. Use draft when the work is not ready for review.

  • Run workflow

    Trigger a workflow_dispatch run of a GitHub Actions workflow on a branch or tag. The workflow must declare a workflow_dispatch trigger, and any inputs it declares as required must be supplied. Poll list_workflow_runs afterwards for the outcome.

  • Create branch

    Create a new branch at an existing commit SHA. First call get_branch for the named base branch and pass commit.sha. This never replaces an existing branch; GitHub rejects a duplicate name.

  • Create or update file

    Commit a single file on an explicitly named existing branch. Supply base64-encoded UTF-8 content. To update a file, first read get_file_contents at that branch and pass its current blob sha; omit sha only for a new file. For several files in one commit, use create_tree, create_commit and update_branch instead.

  • Create tree

    Prepare several added or updated text files in one Git tree. Required base_tree preserves every unchanged file: use the target branch current commit.commit.tree.sha from get_branch. Supply complete plain UTF-8 content for each file. This creates a tree object only; follow with create_commit and update_branch to publish all the changes together.

  • Create commit

    Create a commit object for a tree created by create_tree. Pass the branch current commit SHA as the single parent, and the new tree SHA. This does not move a branch; call update_branch with the returned sha to publish the commit, then create_pull_request if appropriate.

  • Update branch

    Fast-forward an existing branch to a commit created by create_commit. Never force-pushes: if somebody changed the branch, GitHub rejects a non-fast-forward update. Re-read get_branch and rebuild the tree and commit on that new head rather than overwriting their work.

GitHub in Codex: questions

Does Codex see my GitHub credential?

No. The credential is stored encrypted in Toolspoke, and the gateway adds it to each call. Codex only ever talks to Toolspoke, and the dashboard shows the last four characters of the credential and nothing more.

Can I stop Codex from changing things in GitHub?

Yes. Each of the 26 actions can be switched off for a project. Turn off the 10 that change something and Codex can only read.

Will 26 actions crowd Codex's context?

No. Toolspoke shows Codex five bridge tools, plus a guide where a toolkit has one, and Codex searches for the GitHub action it needs when it needs it. Adding more toolkits does not add more tools to its list.

Does the same work in ChatGPT?

ChatGPT and Codex share one OpenAI account. In ChatGPT, add a custom MCP connector in its settings and paste the same address.

What does it cost?

Tool calls are free on every plan, and a GitHub call does not run in a sandbox, so it bills nothing.

Try GitHub in Codex

Free to start, and tool calls cost nothing on any plan.