anthropics / anthropics/claude-code-action

Unclear: do we need to install Github MCP server ?

オープン
#204 コメント 2 件 リアクション 0 件 担当者 1 名 @ashwin-ant が担当を希望しています GitHub で見る
documentation mcp p3 question
主要言語
TypeScript
スター
8.9k
フォーク
2.1k
平均マージ
3日 9時間
マージ済み PR(30日)
10

説明

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

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。