Skip to content

fix: require authentication for MCP server actions - #6921

Merged
CXP-shawn merged 1 commit into
mainfrom
security/mcp-action-auth
Oct 20, 2026
Merged

CXP-shawn merged 1 commit into
mainfrom
security/mcp-action-auth

Conversation

@CXP-shawn

Copy link
Copy Markdown
Collaborator

Summary

Follow-up hardening for #6889 and the MCP Server Action vulnerability reported in #6757.

  • require a valid deployment CODE for every MCP Server Action when MCP is enabled
  • fail closed when ENABLE_MCP is true but CODE is not configured
  • pass the configured access code from all MCP UI and chat callers
  • stop MCP child processes from inheriting the complete application environment; only the SDK safe defaults and explicitly configured MCP variables are passed
  • document the MCP CODE requirement in English, Chinese, and Korean

Why

#6889 prevents MCP actions from running when ENABLE_MCP is disabled. An MCP-enabled deployment would still expose privileged Server Actions without authentication, and spawned MCP processes inherited unrelated application secrets. This PR closes both gaps.

Verification

  • yarn test:ci test/mcp-actions-require-enabled.test.ts test/mcp-client-environment.test.ts
  • yarn build

Both completed successfully.

@CXP-shawn
CXP-shawn merged commit 1d3dc33 into main Oct 20, 2026
1 check failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant