# Where Desktop Commander MCP Stores Configuration: File Paths Explained

> Discover where Desktop Commander MCP stores its configuration files. Learn about key file paths for user settings and directory definitions.

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

---

**Desktop Commander MCP stores user-specific configuration in `~/.claude-server-commander/config.json`, with directory definitions located in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) and read/write operations handled by [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts).**

Desktop Commander MCP persists settings in a hidden directory within your home folder rather than the project directory. Understanding these exact file paths is essential for debugging, manual edits, or backup procedures. According to the source code in `wonderwhy-er/DesktopCommanderMCP`, the application uses Node.js path resolution to ensure consistent configuration storage across platforms.

## Configuration Directory Location

The application constructs its storage path dynamically using the Node.js `os` module. In [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) (lines 4-7), the base directory is built by joining the user's home directory with the constant `.claude-server-commander`:

```typescript
// From src/config.ts
import { homedir } from 'os';
import { join } from 'path';

export const USER_HOME = homedir();
export const CONFIG_DIR = join(USER_HOME, '.claude-server-commander');

```

This approach ensures that configuration follows the user across system sessions while keeping the directory hidden from standard file explorers.

## Primary Configuration Files

### Main Configuration File (config.json)

The runtime configuration is stored at `~/.claude-server-commander/config.json`. As defined in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) (lines 9-10), this path is exported as the `CONFIG_FILE` constant:

```typescript
export const CONFIG_FILE = join(CONFIG_DIR, 'config.json');

```

The [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts) module provides the interface for reading and persisting user settings to this specific location, never to the repository's root directory.

### Tool Call Log (claude_tool_call.log)

Alongside the main configuration, the `.claude-server-commander` directory contains `claude_tool_call.log`, which records Claude tool invocations. The implementation maintains a strict 10 MiB size cap on this log file to prevent unbounded disk usage.

## Template vs Runtime Configuration

The repository includes a template [`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json) at the project root, but this serves only as documentation or a reference starting point. Desktop Commander MCP exclusively reads from the user-specific path constructed in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts). The [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts) implementation strictly isolates user data by reading from and writing to the hidden home directory location, ensuring that multiple users on the same system maintain separate configurations.

## Accessing Configuration Programmatically

To interact with the configuration location in custom scripts or application extensions:

```typescript
import { CONFIG_FILE, CONFIG_DIR } from './config';
import fs from 'fs';

// Reading existing configuration
const rawConfig = fs.readFileSync(CONFIG_FILE, 'utf-8');
const userConfig = JSON.parse(rawConfig);

// Ensuring directory exists before writes
if (!fs.existsSync(CONFIG_DIR)) {
  fs.mkdirSync(CONFIG_DIR, { recursive: true });
}

```

For command-line inspection or debugging:

```bash

# View current Desktop Commander MCP settings

cat ~/.claude-server-commander/config.json

# Monitor real-time tool invocations

tail -f ~/.claude-server-commander/claude_tool_call.log

```

## Summary

- Desktop Commander MCP configuration resides in a hidden `.claude-server-commander` directory within the user's home folder (`os.homedir()`)
- The exact path is constructed in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) and exposed as the `CONFIG_FILE` constant
- Runtime settings are stored in [`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json) with a 10 MiB capped `claude_tool_call.log` file alongside it
- [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts) handles all persistence operations exclusively to the user-specific location
- The project root [`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json) serves only as a template and is never accessed during runtime

## Frequently Asked Questions

### Where exactly is the Desktop Commander MCP configuration file located?

The configuration file is located at `~/.claude-server-commander/config.json` on Unix-like systems and `%USERPROFILE%\.claude-server-commander\config.json` on Windows. This path is dynamically generated in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) by joining the result of `os.homedir()` with the `.claude-server-commander` directory name.

### Can I move the Desktop Commander MCP configuration to a different location?

No, the configuration path is hardcoded in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) using the `CONFIG_FILE` constant derived from `USER_HOME` and `CONFIG_DIR`. To use a custom location, you must modify the source code in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) to change the `CONFIG_DIR` definition and rebuild the application, or create a symbolic link from the default location.

### What is the difference between the config.json in the project root and the one in my home directory?

The [`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json) at the project root is a template file shipped with the repository for reference purposes only. Desktop Commander MCP exclusively reads from and writes to the runtime configuration file located at `~/.claude-server-commander/config.json`, which is managed by the functions in [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts).

### How do I backup my Desktop Commander MCP settings?

Copy the file `~/.claude-server-commander/config.json` to your backup location. You can also archive the entire `.claude-server-commander` directory to include the `claude_tool_call.log` history. The configuration uses standard JSON format, making it portable across different installations using the same version of Desktop Commander MCP.