anthropics / anthropics/claude-code-action

Unclear: do we need to install Github MCP server ?

Open
#204 2 comments 0 reactions 1 assignee Claimed by @ashwin-ant View on GitHub
documentation mcp p3 question
Dominant language
TypeScript
Stars
8.9k
Forks
2.1k
Avg merge
3d 9h
Merged PRs (30d)
10

Description

Hello,

I'm trying to setup the auto review with Claude, and I was wondering **If I needed to install Github MCP in order claude to be able to use the inline comment on the pull request or not**.

I tried to install it, then found an issue about using the upstream MCP from Github so I was like "then, do we need to install it or not ?".

In case you need to install it, how do you pass the personal github token to the MCP ?
See my `action.yml` file:

```
name: Claude Auto Review

on:
pull_request:
types: [labeled]

jobs:
auto-review:
if: github.event.label.name == 'Claude Review'
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
id-token: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Automatic PR Review
uses: anthropics/claude-code-action@beta
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
mcp_config: |
{
"mcpServers": {
"context7": {
"transport": "http",
"url": "https://mcp.context7.com/mcp"
},
"github": {
"url": "https://api.githubcopilot.com/mcp/",
"authorization_token": "Bearer "
}
}
}
timeout_minutes: "60"
direct_prompt: |
Please review this pull request and provide comprehensive feedback. Use context7 if needed to check the code, and the github tools to interact with the PR.

Focus on:
- Code quality and best practices
- Potential bugs or issues
- Performance considerations
- Security implications
- Test coverage
- Documentation updates if needed

Provide constructive feedback with specific suggestions for improvement.
Use inline comments to highlight specific areas of concern.
allowed_tools: "mcp__context7__resolve-library-id,mcp__context7__get-library-docs,mcp__github__create_pending_pull_request_review,mcp__github__add_pull_request_review_comment_to_pending_review,mcp__github__submit_pending_pull_request_review,mcp__github__get_pull_request_diff"
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.