anthropics / anthropics/claude-code-action

Unclear: do we need to install Github MCP server ?

Đang mở
#204 2 bình luận 0 reaction 1 người được giao Được @ashwin-ant nhận Xem trên GitHub
documentation mcp p3 question
Ngôn ngữ chính
TypeScript
Star
8.9k
Fork
2.1k
Merge trung bình
3 ngày 9 giờ
Pull request đã merge (30 ngày)
10

Mô tả

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"
```

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.