You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Kept OAuth authentication features in README.md quickstart section
- Merged new claude_env input from upstream into action.yml
- Maintained fork-specific claude-code-base-action reference
|`allowed_tools`| Additional tools for Claude to use (the base GitHub tools will always be included) | No | "" |
126
135
|`disallowed_tools`| Tools that Claude should never use | No | "" |
127
136
|`custom_instructions`| Additional custom instructions to include in the prompt for Claude | No | "" |
137
+
|`mcp_config`| Additional MCP configuration (JSON string) that merges with the built-in GitHub MCP servers | No | "" |
128
138
|`assignee_trigger`| The assignee username that triggers the action (e.g. @claude). Only used for issue assignment | No | - |
129
139
|`trigger_phrase`| The trigger phrase to look for in comments, issue/PR bodies, and issue titles | No |`@claude`|
140
+
|`claude_env`| Custom environment variables to pass to Claude Code execution (YAML format) | No | "" |
130
141
131
142
\*Required when using direct Anthropic API (default and when not using Bedrock, Vertex, or OAuth)
132
143
133
144
> **Note**: This action is currently in beta. Features and APIs may change as we continue to improve the integration.
134
145
146
+
### Using Custom MCP Configuration
147
+
148
+
The `mcp_config` input allows you to add custom MCP (Model Context Protocol) servers to extend Claude's capabilities. These servers merge with the built-in GitHub MCP servers.
149
+
150
+
#### Basic Example: Adding a Sequential Thinking Server
- Always use GitHub Secrets (`${{ secrets.SECRET_NAME }}`) for sensitive values like API keys, tokens, or passwords. Never hardcode secrets directly in the workflow file.
199
+
- Your custom servers will override any built-in servers with the same name.
200
+
135
201
## Examples
136
202
137
203
### Ways to Tag @claude
@@ -276,6 +342,22 @@ This action is built on top of [`anthropics/claude-code-base-action`](https://gi
276
342
277
343
## Advanced Configuration
278
344
345
+
### Custom Environment Variables
346
+
347
+
You can pass custom environment variables to Claude Code execution using the `claude_env` input. This is useful for CI/test setups that require specific environment variables:
The `claude_env` input accepts YAML format where each line defines a key-value pair. These environment variables will be available to Claude Code during execution, allowing it to run tests, build processes, or other commands that depend on specific environment configurations.
IMPORTANT: For this inline PR review comment, you have been provided with ONLY the mcp__github__update_pull_request_comment tool to update this specific review comment.
454
-
455
-
Tool usage example for mcp__github__update_pull_request_comment:
All four parameters (owner, repo, commentId, body) are required.
463
-
</comment_tool_info>`
464
-
: `<comment_tool_info>
465
-
IMPORTANT: For this event type, you have been provided with ONLY the mcp__github__update_issue_comment tool to update comments.
438
+
${`<comment_tool_info>
439
+
IMPORTANT: You have been provided with the mcp__github_file_ops__update_claude_comment tool to update your comment. This tool automatically handles both issue and PR comments.
466
440
467
-
Tool usage example for mcp__github__update_issue_comment:
441
+
Tool usage example for mcp__github_file_ops__update_claude_comment:
468
442
{
469
-
"owner": "${context.repository.split("/")[0]}",
470
-
"repo": "${context.repository.split("/")[1]}",
471
-
"commentId": ${context.claudeCommentId},
472
443
"body": "Your comment text here"
473
444
}
474
-
All four parameters (owner, repo, commentId, body) are required.
475
-
</comment_tool_info>`
476
-
}
445
+
Only the body parameter is required - the tool automatically knows which comment to update.
446
+
</comment_tool_info>`}
477
447
478
448
Your task is to analyze the context, understand the request, and provide helpful responses and/or implement code changes as needed.
479
449
@@ -487,7 +457,7 @@ Follow these steps:
487
457
1. Create a Todo List:
488
458
- Use your GitHub comment to maintain a detailed task list based on the request.
489
459
- Format todos as a checklist (- [ ] for incomplete, - [x] for complete).
490
-
- Update the comment using ${eventData.eventName==="pull_request_review_comment" ? "mcp__github__update_pull_request_comment" : "mcp__github__update_issue_comment"} with each task completion.
460
+
- Update the comment using mcp__github_file_ops__update_claude_comment with each task completion.
491
461
492
462
2. Gather Context:
493
463
- Analyze the pre-fetched data provided above.
@@ -517,11 +487,11 @@ ${context.directPrompt ? ` - DIRECT INSTRUCTION: A direct instruction was prov
517
487
- Look for bugs, security issues, performance problems, and other issues
518
488
- Suggest improvements for readability and maintainability
519
489
- Check for best practices and coding standards
520
-
- Reference specific code sections with file paths and line numbers${eventData.isPR ? "\n - AFTER reading files and analyzing code, you MUST call mcp__github__update_issue_comment to post your review" : ""}
490
+
- Reference specific code sections with file paths and line numbers${eventData.isPR ? "\n - AFTER reading files and analyzing code, you MUST call mcp__github_file_ops__update_claude_comment to post your review" : ""}
521
491
- Formulate a concise, technical, and helpful response based on the context.
522
492
- Reference specific code with inline formatting or code blocks.
523
493
- Include relevant file paths and line numbers when applicable.
524
-
- ${eventData.isPR ? "IMPORTANT: Submit your review feedback by updating the Claude comment. This will be displayed as your PR review." : "Remember that this feedback must be posted to the GitHub comment."}
494
+
- ${eventData.isPR ? "IMPORTANT: Submit your review feedback by updating the Claude comment using mcp__github_file_ops__update_claude_comment. This will be displayed as your PR review." : "Remember that this feedback must be posted to the GitHub comment using mcp__github_file_ops__update_claude_comment."}
525
495
526
496
B. For Straightforward Changes:
527
497
- Use file system tools to make the change locally.
@@ -576,8 +546,8 @@ ${context.directPrompt ? ` - DIRECT INSTRUCTION: A direct instruction was prov
576
546
577
547
Important Notes:
578
548
- All communication must happen through GitHub PR comments.
579
-
- Never create new comments. Only update the existing comment using ${eventData.eventName==="pull_request_review_comment" ? "mcp__github__update_pull_request_comment" : "mcp__github__update_issue_comment"} with comment_id: ${context.claudeCommentId}.
580
-
- This includes ALL responses: code reviews, answers to questions, progress updates, and final results.${eventData.isPR ? "\n- PR CRITICAL: After reading files and forming your response, you MUST post it by calling mcp__github__update_issue_comment. Do NOT just respond with a normal response, the user will not see it." : ""}
549
+
- Never create new comments. Only update the existing comment using mcp__github_file_ops__update_claude_comment.
550
+
- This includes ALL responses: code reviews, answers to questions, progress updates, and final results.${eventData.isPR ? "\n- PR CRITICAL: After reading files and forming your response, you MUST post it by calling mcp__github_file_ops__update_claude_comment. Do NOT just respond with a normal response, the user will not see it." : ""}
581
551
- You communicate exclusively by editing your single comment - not through any other means.
582
552
- Use this spinner HTML when work is in progress: <img src="https://github.com/user-attachments/assets/5ac382c7-e004-429b-8e35-7feb3e8f9c6f" width="14px" height="14px" style="vertical-align: middle; margin-left: 4px;" />
583
553
${eventData.isPR&&!eventData.claudeBranch ? `- Always push to the existing branch when triggered on a PR.` : `- IMPORTANT: You are already on the correct branch (${eventData.claudeBranch||"the created branch"}). Never create new branches when triggered on issues or closed/merged PRs.`}
@@ -650,7 +620,9 @@ export async function createPrompt(
0 commit comments