Top 200 ReposEXPLORER
Browse agents, categories and pages
Back to results
Planned, not doneThe source describes an intention, not a finished result.

Have Claude Read GitHub Code and Post Drafts

Overview

Connect Claude Code to GitHub's remote MCP server so it can read code, issues and pull requests in a repository you do not have checked out, draft the change in local files, and open it as a draft pull request only after you approve.

Problem or Objective

More in Coding and Code Review

AI Agents and Models

Tools and Integrations

Tools
Claude Code · GitHub
Prerequisites
Claude Code (most surfaces require a Claude subscription or Anthropic Console account), a GitHub fine-grained personal access token for the repositories involved, and a local clone to edit in.

How It Works

Create a fine-grained GitHub personal access token limited to the repositories you want Claude to work with, and add GitHub's remote MCP server to Claude Code with the command in Anthropic's MCP guide. Run /mcp and check the server shows a checkmark. Ask Claude to read the relevant files, the issue and any open pull requests through the server and to explain how the code is organised before changing anything. Then have it write the proposed change in a local clone or working folder with its normal file tools, and run the tests there. Read the diff yourself. Only when you are satisfied, tell Claude to push a branch and open a draft pull request with a description of what changed and why; otherwise ask for another round of edits.

Implementation Workflow

Steps assembled from the agents, tools and prompt of this entry. Adapt them to your own setup.

  1. Choose the agentSet up Claude Code.
  2. Connect the toolsConnect the tools this workflow relies on: Claude Code, GitHub.
  3. Check the prerequisitesClaude Code (most surfaces require a Claude subscription or Anthropic Console account), a GitHub fine-grained personal access token for the repositories involved, and a local clone to edit in.
  4. Gather your detailsCollect what the prompt asks for: Repository owner and name, Folder to read, Issue to work on, Local working copy, Test command, Branch to push.
  5. Run the starter promptPaste the starter prompt below into Claude Code and adapt it to your case.
  6. Check against the documentationCompare what you get with the documentation at code.claude.com before you rely on it.

Practical Starter Prompt: Read remotely, draft locally

Fill the fields to adapt the prompt. Empty fields stay as visible [placeholders].

Preview
Using the GitHub MCP server, read [Repository owner and name]: the files under [Folder to read], issue [Issue to work on] and any open pull requests that touch them. Explain how the code is organised and what the issue needs. Then write the change in [Local working copy] and run [Test command]. Show me the diff and the test results and wait for my approval. Only after I approve, push the branch [Branch to push] and open it as a draft pull request with a short description.

Approve the diff and test results before Claude pushes. The pull request opens as a draft so you can review it again on GitHub before asking anyone else.

Expected Results and Benefits

This is a suggested workflow, not a reported result. The points below are what the cited documentation says the tools can do.

This is a suggested workflow, not a reported outcome. Anthropic's MCP guide shows adding GitHub's remote MCP server with a personal access token and then asking Claude Code to review a pull request, create an issue or list open pull requests. Its overview says Claude Code reads code, edits files and runs commands. The guide does not show this exact read-remotely, edit-locally split, so try it on a small change first.

Limitations and Considerations

Give the token access only to the repositories involved, and prefer read access until you want Claude to open pull requests. The claude mcp add command saves the configuration without validating the token, so check /mcp before starting. Review the diff and run the tests before anything is pushed; Claude Code asks before running commands unless you have allowed them. Most Claude Code surfaces require a Claude subscription or Anthropic Console account. Results depend on your setup and were not independently reproduced by Top 200 Repos.

GitHub Repositories

AI Agent Repository

Source code of the agent that does the work.

Related Videos

About anthropics/claude-code

About anthropics/claude-code

Independent creators. Listing a video implies no endorsement, sponsorship or partnership.

Sources

  1. Connect Claude Code to tools via MCP - Claude Code Docs (opens in a new tab)

    Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 12:10 UTC

    What this source supports
    • GitHub's remote MCP server authenticates with a GitHub personal access token passed as a header; the guide suggests a fine-grained token with access to the repositories you want Claude to work with.
    • The claude mcp add command saves the configuration without validating credentials; to verify the connection, run /mcp and check that the server's row shows a checkmark.
    • Once connected, the guide's examples include asking Claude to review a pull request, create a new issue and show open pull requests.
  2. Overview - Claude Code Docs (opens in a new tab)

    Project documentation · code.claude.com · Undated · Source checked 25 Nov 2026, 11:57 UTC

    What this source supports
    • Claude Code is an agentic coding tool that reads your codebase, edits files, runs commands, and integrates with your development tools.
    • Most Claude Code surfaces require a Claude subscription or Anthropic Console account.
Report a problem

More with Claude Code

Planned, not done

Create Custom Store Tools Instead of Paying for Subscriptions

Use Claude Code to write small in-house tools for an online shop, such as a reply helper for support mail or a margin report, as an alternative to paying for separate apps, with testing before you rely on them.

code.claude.comanthropics/claude-code
Reported by source

Answer technical questions by letting async agents run experiments

Simon Willison sends research questions to cloud coding agents such as Claude Code for web and Codex Cloud, which write and run experiments in a dedicated repo and open a PR.

simonwillison.net · 6 Nov 2025anthropics/claude-code, openai/codex
Planned, not done

Structure Repeated Browser Research Into Evidence Tables

Give Claude Code the open-source Browser Use CLI with a local browser, ask the same research questions across a short list of pages, and keep every answer as a sourced table row.

github.comanthropics/claude-code, browser-use/browser-use

View all: Claude Code