# How to Create Custom MCP Configurations for Different AI Clients (Cursor, Windsurf, VS Code)

> Learn to create custom MCP configurations for Cursor, Windsurf, and VS Code. Add JSON entries to your MCP configuration files to customize your AI client commands easily.

- Repository: [Eduard Ruzga/DesktopCommanderMCP](https://github.com/wonderwhy-er/DesktopCommanderMCP)
- Tags: how-to-guide
- Published: 2026-08-07

---

**To create custom MCP configurations for Cursor, Windsurf, and VS Code, add a JSON entry with the command and arguments to each client's specific MCP configuration file, using the standard `mcpServers` object structure defined in the DesktopCommanderMCP repository.**

DesktopCommanderMCP is an open-source MCP server that exposes file-system and terminal operations to AI assistants through the Model Context Protocol. Creating custom MCP configurations allows you to integrate this server seamlessly across multiple AI clients, enabling consistent tooling whether you use Cursor, Windsurf, VS Code, or Claude Desktop.

## Understanding the Core MCP Configuration Structure

All MCP-compatible clients use the same JSON schema to define server connections. According to the DesktopCommanderMCP source code and documentation, the configuration object requires a `mcpServers` key containing named server definitions.

Each server entry specifies:

- **`command`**: The executable to launch the server (e.g., `npx`, `docker`, `bash`)
- **`args`**: An array of arguments passed to the command
- **Server name**: A unique identifier (e.g., `desktop-commander`) that appears in the client's MCP server list

The standard configuration for installing via npx looks like this:

```json
{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": ["-y", "@wonderwhy-er/desktop-commander@latest"]
    }
  }
}

```

## Client-Specific Configuration File Locations

While the JSON structure remains consistent, each AI client reads MCP configurations from a specific file path. The DesktopCommanderMCP repository documents these locations in the "Install in Other Clients" section of the README.

### Cursor Configuration

Cursor supports both global and project-specific MCP configurations. Create or edit the file at:

- **macOS/Linux**: `~/.cursor/mcp.json` (global) or [`.cursor/mcp.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/.cursor/mcp.json) (project root)
- **Windows**: `%USERPROFILE%\.cursor\mcp.json`

Insert the standard JSON structure:

```json
{
  "mcpServers": {
    "desktop-commander": {
      "command": "npx",
      "args": ["-y", "@wonderwhy-er/desktop-commander@latest"]
    }
  }
}

```

### Windsurf Configuration

Windsurf stores MCP configurations in the Codeium directory structure. Locate or create:

- **macOS/Linux**: `~/.codeium/windsurf/mcp_config.json`
- **Windows**: `%USERPROFILE%\.codeium\windsurf\mcp_config.json`

Use the identical JSON configuration as shown for Cursor.

### VS Code and GitHub Copilot Configuration

VS Code supports MCP configurations at the project level or through User Settings. For project-level configuration, create:

- **Project**: [`./.vscode/mcp.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/./.vscode/mcp.json) (in your workspace root)

Alternatively, access User Settings by navigating to *Settings → Extensions → Copilot → "MCP Servers"* and paste the JSON configuration there.

### Claude Desktop Configuration

Claude Desktop uses an OS-specific configuration file named [`claude_desktop_config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/claude_desktop_config.json):

- **macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`
- **Windows**: `%APPDATA%\Claude\claude_desktop_config.json`
- **Linux**: `~/.config/Claude/claude_desktop_config.json`

## Step-by-Step Setup Guide

Follow these steps to activate DesktopCommanderMCP in any supported client:

1. **Locate the configuration file** using the paths specified above for your target client.
2. **Create the file if missing**. For example, run `touch ~/.cursor/mcp.json` on macOS/Linux or create the file manually on Windows.
3. **Paste the JSON configuration** with your preferred launch method. The npx method shown above automatically downloads and runs the latest version.
4. **Save the file** and **restart the AI client** to reload the MCP server list.
5. **Verify the connection** by checking the client's MCP server UI (Cursor displays this in the "MCP Server" panel, while VS Code shows it in the Chat → MCP pane).

## Advanced Configuration Options

Beyond the standard npx installation, you can customize the command and arguments to suit your environment.

### Docker-Based Configuration

For containerized environments or clients that prefer Docker over Node.js, replace the npx command with Docker parameters:

```json
{
  "mcpServers": {
    "desktop-commander-in-docker": {
      "command": "docker",
      "args": ["run", "-i", "--rm", "mcp/desktop-commander:latest"]
    }
  }
}

```

This configuration works in any client's MCP config file, including those listed for Cursor, Windsurf, and VS Code.

### Server-Side Configuration Management

Once connected, DesktopCommanderMCP maintains its own internal settings through the `config-manager` tool. The server-side configuration is stored in [`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json) within the working directory and managed via the implementation in [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts). This separates client connection settings from server behavior settings.

## Summary

- **Custom MCP configurations** for DesktopCommanderMCP use a standard JSON structure with `mcpServers`, `command`, and `args` keys.
- **Cursor** uses `~/.cursor/mcp.json` or [`.cursor/mcp.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/.cursor/mcp.json).
- **Windsurf** requires `~/.codeium/windsurf/mcp_config.json`.
- **VS Code** supports [`.vscode/mcp.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/.vscode/mcp.json) at the project level or User Settings for global access.
- **Claude Desktop** uses OS-specific paths like `~/Library/Application Support/Claude/claude_desktop_config.json` on macOS.
- **Docker alternatives** replace the npx command with `docker run` parameters for containerized deployments.
- **Restart the client** after editing configuration files to load the MCP server.

## Frequently Asked Questions

### Can I use the same configuration file for all AI clients?

No, each client reads from a specific file path. While the JSON structure inside the file remains identical, you must place the configuration in Cursor's [`mcp.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/mcp.json), Windsurf's [`mcp_config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/mcp_config.json), or VS Code's [`.vscode/mcp.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/.vscode/mcp.json) respectively. The DesktopCommanderMCP server supports multiple simultaneous connections, so you can safely copy the same configuration across all clients you use.

### Do I need to install DesktopCommanderMCP separately before configuring the clients?

When using the npx command with the `-y` flag, the package installs automatically on first run. The `npx -y @wonderwhy-er/desktop-commander@latest` command downloads and executes the latest version without requiring a global npm install. For Docker deployments, ensure the image is available locally or accessible from your registry.

### How do I verify that DesktopCommanderMCP is running correctly?

After restarting your AI client, check the MCP server status panel. In Cursor, look for "desktop-commander" in the MCP Server list with an active status indicator. In VS Code, navigate to the Chat panel and expand the MCP section to see available tools like file-system operations and terminal commands. If the server fails to start, check the client's logs for JSON-RPC connection errors.

### Can I run multiple instances of DesktopCommanderMCP with different configurations?

Yes, the `mcpServers` object supports multiple named entries. You can define separate instances for different working directories or runtime environments by adding unique keys alongside `desktop-commander`. Each entry can specify different command arguments or environment variables, allowing you to isolate file-system access or use different Docker images for specific projects.