* List configured MCP servers for a project (name -> command). * Used to show server info in the system prompt. * * Applies both project-level disabled state and workspace-level overrides: * - Project disabled + workspace enabled => enabled * - Project enabled + workspace disabled =>
(
projectPath: string,
overrides?: WorkspaceMCPOverrides,
trusted = false
)
| 778 | * @param overrides - Optional workspace-level overrides |
| 779 | */ |
| 780 | async listServers( |
| 781 | projectPath: string, |
| 782 | overrides?: WorkspaceMCPOverrides, |
| 783 | trusted = false |
| 784 | ): Promise<MCPServerMap> { |
| 785 | const allServers = await this.getAllServers(projectPath, trusted); |
| 786 | const enabled = this.applyServerOverrides(allServers, overrides); |
| 787 | return this.filterServersByPolicy(enabled); |
| 788 | } |
| 789 | |
| 790 | /** |
| 791 | * Filter servers based on the effective policy (e.g. disallow stdio/remote). |