# Where Is Desktop Commander MCP Configuration Stored?

> Discover where Desktop Commander MCP stores its configuration. Find config.json in ~/.claude-server-commander/config.json for user-specific settings.

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

---

**Desktop Commander MCP stores user-specific configuration in `~/.claude-server-commander/config.json`, with the path dynamically constructed from the user's home directory at runtime.**

Desktop Commander MCP, developed by wonderwhy-er, is an open-source Model Context Protocol (MCP) server that enables Claude AI to execute desktop commands. Understanding exactly where this tool persists its settings is crucial for troubleshooting, backing up preferences, or manually editing constraints. This guide breaks down the configuration architecture based on the actual source code implementation.

## Default Configuration Location

The application determines the configuration directory at runtime using Node.js environment detection. In [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) (lines 4-7), the code constructs the path by combining `os.homedir()` with the constant directory name `.claude-server-commander`:

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

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

```

This creates a platform-independent path that resolves to:
- **macOS/Linux**: `~/.claude-server-commander/`
- **Windows**: `%USERPROFILE%\.claude-server-commander\`

### Runtime Configuration File

Inside this hidden directory, the primary configuration file is **[`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json)**. According to [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) lines 9-10, the full path is exported as:

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

```

This file contains the active user settings that the application reads and writes during operation via [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts).

### Log File Storage

Alongside the configuration, Desktop Commander MCP maintains a log file for Claude tool calls. The file **`claude_tool_call.log`** resides in the same directory with a maximum size cap of **10 MiB** to prevent unbounded disk usage.

## Template vs. Runtime Configuration

The repository includes a template configuration file at the project root ([`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json)), but this serves only as a reference example. The actual runtime configuration that Desktop Commander MCP reads and modifies is always located in the user-specific path described above, as implemented in [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts).

## Accessing Configuration Programmatically

To interact with the configuration location in your own extensions or debugging scripts, import the path constants from the source:

```typescript
// Retrieve the runtime config path
import { CONFIG_FILE } from './config';

// Example: load the JSON configuration
import fs from 'fs';
const raw = fs.readFileSync(CONFIG_FILE, 'utf-8');
const userConfig = JSON.parse(raw);
console.log('Desktop Commander config →', userConfig);

```

For command-line inspection, you can view the stored configuration directly:

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

```

Or monitor the tool call logs in real-time:

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

```

## Summary

- Desktop Commander MCP stores active configuration in **`~/.claude-server-commander/config.json`**, built dynamically from `os.homedir()`.
- The constants `CONFIG_DIR` and `CONFIG_FILE` are defined in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts) and used throughout the application.
- A secondary log file (`claude_tool_call.log`) with a **10 MiB size limit** exists in the same directory.
- The project root [`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json) is only a template; runtime settings are always read from the per-user hidden directory.
- File I/O operations are handled by [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts), which respects the paths defined in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts).

## Frequently Asked Questions

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

The configuration file is located at `~/.claude-server-commander/config.json` on Unix-based systems or `%USERPROFILE%\.claude-server-commander\config.json` on Windows. This path is determined at runtime by joining the user's home directory with the `.claude-server-commander` folder constant defined in [`src/config.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config.ts).

### What is the difference between the template config.json and the runtime configuration?

The [`config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/config.json) file in the project root serves as a template or reference example shipped with the wonderwhy-er/DesktopCommanderMCP repository. The actual runtime configuration that the application reads and modifies is stored in the user's home directory under [`.claude-server-commander/config.json`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/.claude-server-commander/config.json), as managed by [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts).

### How can I manually edit the Desktop Commander MCP configuration?

You can edit the configuration directly by modifying the JSON file at `~/.claude-server-commander/config.json` using any text editor. Changes typically take effect on the next application start. Alternatively, use the configuration management methods defined in [`src/config-manager.ts`](https://github.com/wonderwhy-er/DesktopCommanderMCP/blob/main/src/config-manager.ts) to programmatically update settings while ensuring schema validation.

### Is there a size limit for the log files created by Desktop Commander MCP?

Yes, the `claude_tool_call.log` file stored alongside the configuration has a size cap of **10 MiB**. This prevents the log file from consuming excessive disk space while maintaining a reasonable history of Claude tool interactions for debugging purposes.