* Filter servers based on the effective policy (e.g. disallow stdio/remote).
(servers: MCPServerMap)
| 791 | * Filter servers based on the effective policy (e.g. disallow stdio/remote). |
| 792 | */ |
| 793 | private filterServersByPolicy(servers: MCPServerMap): MCPServerMap { |
| 794 | if (!this.policyService?.isEnforced()) { |
| 795 | return servers; |
| 796 | } |
| 797 | |
| 798 | const filtered: MCPServerMap = {}; |
| 799 | for (const [name, info] of Object.entries(servers)) { |
| 800 | if (this.policyService.isMcpTransportAllowed(info.transport)) { |
| 801 | filtered[name] = info; |
| 802 | } |
| 803 | } |
| 804 | |
| 805 | return filtered; |
| 806 | } |
| 807 | |
| 808 | /** |
| 809 | * Apply workspace MCP overrides to determine final server enabled state. |
no test coverage detected