mirror of
https://github.com/anthropics/claude-code-action.git
synced 2026-01-22 22:44:13 +08:00
fix: remove unnecessary GitHub comment server inclusion in agent mode (#549)
The GitHub comment MCP server was being included in agent mode even when no comment tools were explicitly allowed. This fix ensures the server is only included in tag mode where it's always needed for updating Claude comments. 🤖 Generated with [Claude Code](https://claude.ai/code) Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -74,10 +74,6 @@ export async function prepareMcpConfig(
|
||||
tool.startsWith("mcp__github_inline_comment__"),
|
||||
);
|
||||
|
||||
const hasGitHubCommentTools = allowedToolsList.some((tool) =>
|
||||
tool.startsWith("mcp__github_comment__"),
|
||||
);
|
||||
|
||||
const hasGitHubCITools = allowedToolsList.some((tool) =>
|
||||
tool.startsWith("mcp__github_ci__"),
|
||||
);
|
||||
@@ -89,7 +85,7 @@ export async function prepareMcpConfig(
|
||||
// Include comment server:
|
||||
// - Always in tag mode (for updating Claude comments)
|
||||
// - Only with explicit tools in agent mode
|
||||
const shouldIncludeCommentServer = !isAgentMode || hasGitHubCommentTools;
|
||||
const shouldIncludeCommentServer = !isAgentMode;
|
||||
|
||||
if (shouldIncludeCommentServer) {
|
||||
baseMcpConfig.mcpServers.github_comment = {
|
||||
|
||||
Reference in New Issue
Block a user