feat: add trusted/untrusted session source MCP access control#971
Open
cyrusagent wants to merge 2 commits intomainfrom
Open
feat: add trusted/untrusted session source MCP access control#971cyrusagent wants to merge 2 commits intomainfrom
cyrusagent wants to merge 2 commits intomainfrom
Conversation
Add sessionSourceTrust and mcpAccess config fields to EdgeConfig schema, enabling users to control which MCP servers are available to sessions based on their source platform's trust level (Linear, GitHub, Slack). - Add TrustLevelSchema, SessionSourceTrustSchema, McpAccessSchema to core - Add getEffectiveMcpConfigPaths() to EdgeWorker for trust-based filtering - Thread sessionSource through all three session creation paths - Update ChatSessionHandler to accept trust-filtered mcpConfigPath - Add trust config hot-reload detection to ConfigManager - Add 27 new tests (16 schema + 11 EdgeWorker filtering) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <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.
Assignee: Payton
Linear: CYPACK-933
Summary
Adds trusted/untrusted session source MCP access control, allowing operators to restrict which user-configured MCP servers are available to agent sessions based on their originating platform (Linear, GitHub, Slack).
sessionSourceTrustandmcpAccessfields onEdgeConfigSchema— fully backward compatible (omitting both preserves current behavior where all sources get all MCPs)EdgeWorker.getEffectiveMcpConfigPaths()resolves which~/.cyrus/mcp-configs/files to load based on source trust level. Built-in MCPs (Linear, Cyrus Tools) are always injected regardless of trust.ConfigManagerdetects changes to trust config fields on config file updatesConfig example
{ "sessionSourceTrust": { "linear": "trusted", "github": "untrusted", "slack": "untrusted" }, "mcpAccess": { "trusted": ["server-a", "server-b"], "untrusted": ["server-a"] } }With this config, Linear sessions get
mcp-server-a.jsonandmcp-server-b.json, while GitHub and Slack sessions only getmcp-server-a.json.Files changed
packages/core/src/config-schemas.tsTrustLevelSchema,SessionSourceTrustSchema,McpAccessSchema+ EdgeConfigSchema fieldspackages/core/src/config-types.tspackages/core/src/index.tspackages/edge-worker/src/EdgeWorker.tsgetEffectiveMcpConfigPaths(), session source threadingpackages/edge-worker/src/ChatSessionHandler.tsmcpConfigPathon deps interfacepackages/edge-worker/src/ConfigManager.tspackages/core/test/config-schemas.trust.test.tspackages/edge-worker/test/EdgeWorker.session-source-trust.test.tsTest plan
🤖 Generated with Claude Code