MCPcopy
hub / github.com/coder/mux / listServers

Method listServers

src/node/services/mcpServerManager.ts:780–788  ·  view source on GitHub ↗

* 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
  )

Source from the content-addressed store, hash-verified

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).

Callers 6

getAllServersMethod · 0.45
testMethod · 0.45
streamMessageMethod · 0.45
routerFunction · 0.45

Calls 3

getAllServersMethod · 0.95
applyServerOverridesMethod · 0.95
filterServersByPolicyMethod · 0.95

Tested by 1

testMethod · 0.36