Skip to content

Client Connection

Commands for managing MCP client connections using the gateway pattern.

Supported Clients

ClientIDPlatformReal-time Loading
Claude DesktopclaudemacOS, WindowsNo
CursorcursormacOS, Windows, LinuxYes
WindsurfwindsurfmacOS, Windows, LinuxYes
KirokiromacOS, Windows, LinuxYes
VS CodevscodemacOS, Windows, LinuxYes
ZedzedmacOS, Windows, LinuxYes
Claude Codeclaude-codeCLINo
CodexcodexmacOS, Windows, LinuxNo
GeminigeminimacOS, Windows, LinuxNo
Google AntigravityantigravitymacOS, Windows, LinuxNo

Gateway Pattern

MCP Server Manager uses a gateway pattern for client connections:

  • A single mcpsm server is added to each connected client's configuration
  • This server points to localhost:{port}/mcp (via supergateway or direct URL, depending on the client)
  • All your configured servers are accessible through this single gateway
  • When the port is changed, all connected clients are automatically updated

clients

List detected MCP clients and their connection status.

bash
mcpsm clients

Output

Detected MCP Clients:

  1. Claude Desktop     ✔ Installed   Connected
  2. Cursor            ✔ Installed   Disconnected
  3. Windsurf          ✘ Not installed
  4. VS Code           ✔ Installed   Connected
  5. Zed               ✔ Installed   Disconnected
  6. Claude Code       ✘ Not installed

Status Legend:

  • ✔ Connected - Client has mcpsm gateway server configured
  • Disconnected - Client is installed but not connected
  • ✘ Not installed - Client application not found

clients connect

Connect a client by adding the mcpsm gateway server to its configuration.

bash
mcpsm clients connect <client>

Examples

bash
# Connect Claude Desktop
mcpsm clients connect claude

# Connect Cursor
mcpsm clients connect cursor

# Connect multiple clients
mcpsm clients connect cursor
mcpsm clients connect windsurf

What Happens

  1. The mcpsm gateway server is added to the client's config
  2. The server proxies requests to the daemon at localhost:{port}/mcp
  3. All your configured servers become accessible in that client
  4. For real-time loading clients, changes appear without restart

clients disconnect

Disconnect a client by removing the mcpsm gateway server from its configuration.

bash
mcpsm clients disconnect <client>

Example

bash
# Disconnect Cursor
mcpsm clients disconnect cursor

What Happens

  • The mcpsm gateway server is removed from the client's config
  • The client will no longer have access to your MCP servers
  • Other servers in the client's config are preserved

clients open

Open a client's config file in your default editor.

bash
mcpsm clients open <client>

Examples

bash
# Open Claude Desktop config
mcpsm clients open claude

# Open Cursor config
mcpsm clients open cursor

Workflow Example

1. Add your MCP servers

bash
mcpsm add myserver
mcpsm add anotherserver

2. Connect your clients

bash
mcpsm clients connect claude
mcpsm clients connect cursor
mcpsm clients connect windsurf

3. Use servers in clients

All your servers are now available in Claude Desktop, Cursor, Windsurf, and Zed through the mcpsm gateway.

4. Change port if needed

bash
mcpsm port 9000

All connected clients are automatically updated with the new port!

5. Disconnect when done

bash
mcpsm clients disconnect cursor

Port Changes

When you change the gateway port:

bash
# In Settings
mcpsm settings set port 9000

# Or directly
mcpsm port 9000

Automatic Updates:

  • All connected clients are automatically reconnected
  • The new port is written to each client's configuration
  • No manual editing required
  • Real-time loading clients (Cursor, Windsurf, VS Code, Zed) see changes without restart

Released under the MIT License.