MCP Client Manager
A client manager for the Model Context Protocol (MCP) that provides a simple way to manage multiple MCP clients connected to different servers.
Power your agent
The publisher's own command. Not a PlugMCP endpoint.
Host a copy with our keys and logs.
npx -y @automatalabs/[email protected]Claude Code has no install link for a local command. Copy the command below and run it in a terminal.
claude mcp add automatalabs-mcp-client-manager -- npx -y @automatalabs/mcp-client-manager@1.0.5Run in a terminal.
{ "mcpServers": { "automatalabs-mcp-client-manager": { "command": "npx", "args": [ "-y", "@automatalabs/[email protected]" ] } }}claude_desktop_config.json
Remote URL or a command on your machine? How the two installs differ
Run on PlugMCP
A new server you create. It is not this listing's official endpoint. Use the publisher install when you want their URL and their credentials.
LaunchFrom the publisher
A client manager for the Model Context Protocol (MCP) that provides a simple way to manage multiple MCP clients connected to different servers.
A client manager for the Model Context Protocol (MCP) that handles multiple connections and provides a simple unified API
npm install @modelcontextprotocol/client-manager
import { MCPClientManager } from '@modelcontextprotocol/client-manager';
import { WebSocketTransport } from '@modelcontextprotocol/sdk/client/websocket.js';
// Create a manager with auto-reconnect enabled
const manager = new MCPClientManager({
autoReconnect: true,
defaultTimeout: 10000
});
// Connect to a server
const transport = new WebSocketTransport('ws://localhost:3000');
const clientId = await manager.addServer(transport, 'local-server');
// List available tools from all connected servers
const tools = await manager.listTools();
console.log('Available tools:', tools);
// Call a tool on any server that provides it
const result = await manager.callTool('my-tool', { param: 'value' });
console.log('Tool result:', result);
// Connect to multiple servers
const server1Id = await manager.addServer(
new WebSocketTransport('ws://server1:3000'),
'server-1'
);
const server2Id = await manager.addServer(
new WebSocketTransport('ws://server2:3000'),
'server-2'
);
// You can work with specific servers using their IDs
const server1Tools = await manager.getClient(server1Id).listTools();
// Or use the unified API to work with all servers
const allTools = await manager.listTools();
// Listen for connection errors
manager.on('connectionError', ({ serverName, error }) => {
console.error(`Failed to connect to ${serverName}:`, error);
});
// Listen for transport closures
manager.on('transportClosed', ({ clientId, serverName }) => {
console.warn(`Connection to ${serverName} closed`);
});
// Listen for operation errors
manager.on('operationError', ({ operation, clientId, serverName, error }) => {
console.error(`Error during ${operation} on ${serverName}:`, error);
});
The MCPClientManager constructor accepts a configuration object with these options:
constructor(config: Partial<MCPClientManagerConfig> = {})
Creates a new MCPClientManager instance with the given configuration.
async addServer(transport: ClientTransport, serverName: string, clientConfig?: Partial<ClientConfig>): Promise<ClientIdentifier>async reconnectClient(clientId: ClientIdentifier): Promise<boolean>removeClient(id: ClientIdentifier): booleanisClientHealthy(clientId: ClientIdentifier): booleanlistServerNames(): string[]hasServer(serverName: string): booleangetClientInfo(id: ClientIdentifier): Omit<ClientInfo, 'client'> | undefinedgetClientIdByServerName(serverName: string): ClientIdentifier | undefinedlistClientIds(): ClientIdentifier[]async listPrompts(timeout?: number): Promise<unknown[]>async getPrompt(promptName: string, args?: PromptParams, timeout?: number): Promise<unknown>async listResources(timeout?: number): Promise<unknown[]>async readResource(resourceUri: string, timeout?: number): Promise<unknown>async listTools(timeout?: number): Promise<unknown[]>async callTool(toolName: string, args?: Record<string, unknown>, timeout?: number): Promise<ToolResponse>serverAdded: Emitted when a server is successfully addedconnectionError: Emitted when there's an error connecting to a servertransportError: Emitted when there's an error with a transporttransportClosed: Emitted when a transport is closedclientReconnected: Emitted when a client is successfully reconnectedreconnectionError: Emitted when there's an error reconnecting a clientcloseError: Emitted when there's an error closing a transportclientRemoved: Emitted when a client is removedoperationError: Emitted when there's an error during an operationMIT
A client manager for the Model Context Protocol (MCP) that handles multiple connections and provides a simple unified API
{ "mcpServers": { "automatalabs-mcp-client-manager": { "command": "npx", "args": [ "-y", "@automatalabs/[email protected]" ] } }}Tools
No tool list yet. Remote servers get one after the first health check.
FAQ
Copy the stdio config for Cursor, Claude Desktop, Claude Code, or VS Code on this page. It uses the publisher's install, not a PlugMCP proxy.
No required environment variable is listed on this record.
@automatalabs/mcp Client Manager runs locally over stdio.
Last checked 2026-11-16. A client manager for the Model Context Protocol (MCP) that handles multiple connections and provides a simple unified API