feat(scripts): register CSA MCP server with Claude Code#21
Open
kurtseifried wants to merge 1 commit into
Open
Conversation
Adds setup_csa_mcp_server / Register-CSAMcpServer to all five scripts that share the plugin-marketplace contract (macos-ai-tools.sh, windows-ai-tools.ps1, macos-update.sh, macos-plugins.sh, windows-plugins.ps1). Registers `csa-mcp` → `https://cloudsecurityalliance.org/mcp` (HTTP transport, OAuth 2.1 + PKCE) at user scope. Silent-by-default: returns silently when claude/gh is missing, gh is unauthenticated, csa-mcp is already registered (parsed from `claude mcp list`), or the user lacks CSA-Internal access. The CSA- membership gate is a `gh api repos/CloudSecurityAlliance-Internal/ CSA-Plugins` probe — the same proxy used elsewhere for CSA-only behavior. Existing entries are NOT clobbered, since re-adding would invalidate the user's authenticated OAuth session. On a fresh successful registration, prints the standard success line plus a `Run /mcp inside Claude Code to authenticate with the CSA MCP server.` reminder, since the OAuth flow is browser-driven and must be initiated by the user. Failures print the captured stderr indented underneath, matching the marketplace-add error format. Currently Claude Code only — Codex/Gemini support is future work. Bumps SCRIPT_VERSION on all five files. Documents the new contract in CLAUDE.md as a sibling of the existing "Plugin marketplace registration" section. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds CSA MCP server (`csa-mcp` → https://cloudsecurityalliance.org/mcp) registration to the five scripts that share the plugin-marketplace contract.
CLAUDE.md gains a dedicated CSA MCP server registration section right after the existing Plugin install contract section, plus the Shared boilerplate paragraph now mentions the new shared function. `SCRIPT_VERSION` bumped on all five files.
Soft-launch context: per https://cloudsecurityalliance.org/csa-mcp-server-client-setup the server is currently open to `@cloudsecurityalliance.org` accounts and beta testers, so the gate matters.
Test plan
🤖 Generated with Claude Code