fix: MCP サーバー接続エラーを修正 - #640
Conversation
- playwright: npx に --yes フラグを追加 (インストール確認プロンプトによるタイムアウトを防止) - github: api.githubcopilot.com (HTTP/Copilot依存) から @modelcontextprotocol/server-github (stdio) に変更 gh auth token から動的にトークンを取得 - figma: OAuth 認証が必要で接続不可のため削除 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🔍 AI Code Review (Local Hook)Models: Codex (default) / Gemini (default) 🤖 Codex Review指摘事項はありません。 判定 🤖 Generated by post_pr_ai_review.py hook |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7f5a83e8ee
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| "headers": {} | ||
| "type": "stdio", | ||
| "command": "bash", | ||
| "args": ["-c", "GITHUB_PERSONAL_ACCESS_TOKEN=$(gh auth token) npx --yes @modelcontextprotocol/server-github"] |
There was a problem hiding this comment.
Fail fast when GitHub token lookup fails
This command masks gh auth token failures: in bash -c, an assignment with command substitution (GITHUB_PERSONAL_ACCESS_TOKEN=$(gh auth token) ...) does not stop execution when gh is missing or not authenticated, so npx is still started with an empty token. In fresh environments this yields a connected-looking MCP server that later fails GitHub operations with auth errors, making the original setup problem hard to diagnose.
Useful? React with 👍 / 👎.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
.github/test.md (1)
1-3: Consider neutralizing informal wording for repository docs.Lines [1-3] and Line [115] use casual phrasing (
草,笑) that may not fit team-facing security guidance. Consider a more neutral tone.Also applies to: 115-115
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In @.github/test.md around lines 1 - 3, Replace casual/slang phrases "草" and any "笑" or similarly informal wording in the repository document with neutral professional language; update the sentences in the opening anecdote (the lines referencing Claude Code and force-push) to a concise, factual description about accidental force-push risks and steps taken to review security settings, and do the same for the other occurrence noted as "笑" so all team-facing security guidance uses formal tone and clear, actionable wording.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.github/test.md:
- Around line 24-34: The JSON config example currently appears as regular
Markdown (the block containing the "permissions" object and the "deny" array
with entries like "Bash(rm -rf *)"), which causes linting/formatting issues; fix
it by wrapping that entire JSON snippet in a fenced code block using triple
backticks and the language tag (```json) at the start and closing triple
backticks at the end so the wildcard characters are preserved and parsed as
code.
In @.mcp.json:
- Around line 10-12: Update the MCP start command so it does not assume `gh auth
token` always succeeds: first read `GITHUB_PERSONAL_ACCESS_TOKEN` from env, then
fallback to `GITHUB_TOKEN`, and only if both are unset run `gh auth token`; if
that also fails emit a clear error and exit instead of passing an empty token to
the MCP server. Change the `args` entry that currently runs
`GITHUB_PERSONAL_ACCESS_TOKEN=$(gh auth token) npx --yes
`@modelcontextprotocol/server-github`` to a shell snippet that checks
`GITHUB_PERSONAL_ACCESS_TOKEN`, then `GITHUB_TOKEN`, then `gh auth token` and
exports the chosen value before invoking `npx --yes
`@modelcontextprotocol/server-github``, failing with a descriptive message if no
token is available.
---
Nitpick comments:
In @.github/test.md:
- Around line 1-3: Replace casual/slang phrases "草" and any "笑" or similarly
informal wording in the repository document with neutral professional language;
update the sentences in the opening anecdote (the lines referencing Claude Code
and force-push) to a concise, factual description about accidental force-push
risks and steps taken to review security settings, and do the same for the other
occurrence noted as "笑" so all team-facing security guidance uses formal tone
and clear, actionable wording.
| { | ||
| "permissions": { | ||
| "deny": [ | ||
| "Bash(rm -rf *)", | ||
| "Bash(curl *)", | ||
| "Bash(wget *)", | ||
| "Bash(git push --force *)", | ||
| "Bash(chmod 777 *)" | ||
| ] | ||
| } | ||
| } |
There was a problem hiding this comment.
Wrap config examples in fenced code blocks.
Lines [24-34] are parsed as normal Markdown, and wildcard entries (e.g., *) trigger formatting/lint issues (like MD037). Please fence JSON examples to preserve exact syntax.
📝 Example fix
- {
- "permissions": {
- "deny": [
- "Bash(rm -rf *)",
- "Bash(curl *)",
- "Bash(wget *)",
- "Bash(git push --force *)",
- "Bash(chmod 777 *)"
- ]
- }
- }
+ ```json
+ {
+ "permissions": {
+ "deny": [
+ "Bash(rm -rf *)",
+ "Bash(curl *)",
+ "Bash(wget *)",
+ "Bash(git push --force *)",
+ "Bash(chmod 777 *)"
+ ]
+ }
+ }
+ ```📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| { | |
| "permissions": { | |
| "deny": [ | |
| "Bash(rm -rf *)", | |
| "Bash(curl *)", | |
| "Bash(wget *)", | |
| "Bash(git push --force *)", | |
| "Bash(chmod 777 *)" | |
| ] | |
| } | |
| } |
🧰 Tools
🪛 markdownlint-cli2 (0.21.0)
[warning] 28-28: Spaces inside emphasis markers
(MD037, no-space-in-emphasis)
[warning] 30-30: Spaces inside emphasis markers
(MD037, no-space-in-emphasis)
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In @.github/test.md around lines 24 - 34, The JSON config example currently
appears as regular Markdown (the block containing the "permissions" object and
the "deny" array with entries like "Bash(rm -rf *)"), which causes
linting/formatting issues; fix it by wrapping that entire JSON snippet in a
fenced code block using triple backticks and the language tag (```json) at the
start and closing triple backticks at the end so the wildcard characters are
preserved and parsed as code.
|
(aside) |
|
Claude finished @keito4's task in 5m 59s —— View job CI修正対応
調査結果現在のCIチェックは全て成功しています:
PRが 適用した修正レビューコメント(CodeRabbit・Codex両方)で指摘された 修正前: "args": ["-c", "GITHUB_PERSONAL_ACCESS_TOKEN=$(gh auth token) npx --yes @modelcontextprotocol/server-github"]
修正後: "args": [
"-c",
"TOKEN=\"${GITHUB_PERSONAL_ACCESS_TOKEN:-${GITHUB_TOKEN:-$(gh auth token 2>/dev/null)}}\"; [ -n \"$TOKEN\" ] || { echo 'GitHub MCP: missing token' >&2; exit 1; }; export GITHUB_PERSONAL_ACCESS_TOKEN=\"$TOKEN\"; exec npx --yes @modelcontextprotocol/server-github"
]
コミット: |
- GITHUB_PERSONAL_ACCESS_TOKEN → GITHUB_TOKEN → gh auth token の順でフォールバック - 全ての認証情報が存在しない場合は明確なエラーメッセージを出力して終了 - 未認証環境でも原因を特定しやすくする Co-authored-by: keito4 <keito4@users.noreply.github.com>
|
🎉 This PR is included in version 1.107.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
--yesフラグを追加(インストール確認プロンプトによるタイムアウトを防止)
api.githubcopilot.com(HTTP/Copilot依存) から@modelcontextprotocol/server-github(stdio) に変更し、gh auth tokenから動的にトークンを取得Test plan
playwrightツールが利用可能であることを確認githubツールが利用可能であることを確認🤖 Generated with Claude Code
Summary by CodeRabbit