ChatGPT Desktop Commander
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
ChatGPT Desktop Commander
简体中文 | English
Self-hosted MCP server and desktop agent for accessing your own files, terminal, processes, and SSH sessions from an MCP-compatible client.
ChatGPT Desktop Commander consists of a local Agent and an HTTP Relay. The Agent connects outbound to the Relay over WebSocket; the Relay exposes a Streamable HTTP MCP endpoint for remote clients. For local MCP clients, a direct stdio mode is also available.
This project is self-hosted software. You deploy and operate your own instance, use your own domain if remote access is needed, and keep your own credentials. No project-maintained public endpoint or shared account is provided.
Features
File operations: read, write, append, exact edit, move, delete, metadata, directory listing and creation.
Search file names and file contents.
Execute local shell commands with timeout and output limits.
Interactive SSH sessions with host fingerprint verification.
Process listing and termination.
Receive image bytes and save supported image formats into an authorized directory.
Device status page and persistent tool usage statistics.
Directory allowlist, separate Relay API key and Agent bridge token, and automatic backups for supported destructive writes.
Local stdio mode for MCP clients that can launch a local process.
Related MCP server: scriptit
Architecture
Remote MCP client
|
| HTTPS / Streamable HTTP
v
Your domain (optional) -> Cloudflare Tunnel or reverse proxy
|
v
Relay (your host, default port 8723)
^
| outbound WebSocket
|
Agent (your desktop / workstation)
|
+-- authorized files
+-- shell and processes
+-- SSH sessionsFor local-only clients, connect directly through bin/stdio.js; no domain, tunnel, or public server is required.
Requirements
Node.js 18 or newer.
macOS, Linux, or Windows with a compatible shell environment. The included shell scripts target macOS/Linux; Windows users can start the Node entry points directly or use WSL.
An MCP-compatible client.
For remote access: a domain name and a reachable HTTPS ingress. A Cloudflare account and Cloudflare Tunnel are one option, not a project requirement.
Quick start: local mode
Clone the repository and install dependencies:
git clone https://github.com/JIayand/chatgpt-desktop-commander.git cd chatgpt-desktop-commander npm installCreate your private configuration:
cp config/config.example.json config/config.jsonEdit
config/config.json. Setagent.allowedDirsto one or more existing absolute directories you explicitly want the Agent to access. Do not use the example placeholder as-is.Start and check the services:
npm start npm run statusOn first start, random Relay API and bridge secrets are generated and stored in the ignored
config/config.local.jsonfile. Keep this file private.Open the local status page at
http://127.0.0.1:8723/.
Stop or restart:
npm run stop
npm run restartConnect a local MCP client (stdio)
Local stdio mode does not require a domain, HTTPS, Cloudflare, or a running Relay. Configure your MCP client to launch the project's bin/stdio.js entry point.
Generic MCP configuration example (replace the path with the absolute path on your computer):
{
"mcpServers": {
"desktop-commander": {
"command": "node",
"args": ["/absolute/path/to/chatgpt-desktop-commander/bin/stdio.js"]
}
}
}The stdio process uses the same config/config.json and directory permissions. Restart the MCP client after changing the configuration. The exact configuration-file location varies by client; see that client's MCP documentation.
Connect a remote MCP client
Remote clients need a public HTTPS address that you own and configure. The project does not ship with a default public URL.
Deploy the Relay on a host that can remain online.
Keep the Relay listening on loopback when a local tunnel or reverse proxy is used.
Configure a domain and HTTPS ingress using Cloudflare Tunnel, Nginx, Caddy, or another trusted provider.
Set
relay.publicUrlin your privateconfig/config.jsonto your own origin, for examplehttps://mcp.example.com(no/mcpsuffix).Ensure the Agent's
agent.relayUrlpoints to the Relay WebSocket bridge. If Agent and Relay run on the same host, the defaultws://127.0.0.1:8723/bridgeis suitable.Restart Relay and Agent. Configure the remote MCP client with your own endpoint:
https://mcp.example.com/mcp.Complete the OAuth authorization flow in the client.
The status page is available at your own origin root, for example https://mcp.example.com/.
Cloudflare Tunnel (recommended no-inbound-port option)
Cloudflare Tunnel can publish a local Relay without opening an inbound port on your router or exposing the Relay port directly. You need a Cloudflare account and a domain whose DNS is managed by Cloudflare. Use your own hostname throughout; do not copy anyone else's hostname.
Install
cloudflaredusing the official installation guide.Authenticate and create a named tunnel:
cloudflared tunnel login cloudflared tunnel create desktop-commander cloudflared tunnel route dns desktop-commander mcp.example.comCreate
~/.cloudflared/config.yml(replace the tunnel UUID and local username/path):tunnel: YOUR_TUNNEL_UUID credentials-file: /absolute/path/to/.cloudflared/YOUR_TUNNEL_UUID.json ingress: - hostname: mcp.example.com service: http://127.0.0.1:8723 - service: http_status:404Start the Relay locally, then run the tunnel:
npm start cloudflared tunnel run desktop-commanderSet
relay.publicUrltohttps://mcp.example.comin your private config and restart the Relay:npm run restartTest the endpoint and configure your MCP client with
https://mcp.example.com/mcp.
For persistent service installation, follow Cloudflare's current Run as a service documentation. Keep the tunnel credentials JSON outside the repository and never commit it.
Official docs:
Other reverse proxies
You can use Nginx, Caddy, or another HTTPS reverse proxy instead. Configure it to forward HTTP requests to the Relay and preserve the required WebSocket upgrade for the Agent bridge if the Agent connects through that proxy. Do not expose the bridge endpoint publicly without its bridge token. Keep TLS enabled for public access.
Configuration
Copy config/config.example.json to config/config.json and edit it. The first launch generates relay.apiKey and relay.bridgeToken into config/config.local.json; both private config files are ignored by Git.
Setting | Purpose |
| Relay bind address and port. Keep loopback when using a local tunnel/reverse proxy. |
| Your public HTTPS origin, e.g. |
| Secret used to authenticate MCP requests / OAuth-issued access tokens. Generated on first start. |
| Separate secret used by the Agent-to-Relay bridge. Generated on first start. |
| WebSocket bridge URL used by the Agent. |
| Existing absolute directories the Agent may access. |
| Disables the directory allowlist when true. High risk; not recommended. |
| Enables local shell command execution. |
| Enables interactive SSH tools; disabled by default. |
| Enables backups before supported overwrite/delete operations. |
Environment overrides supported by the current configuration loader include CDC_PORT, CDC_HOST, CDC_API_KEY, CDC_BRIDGE_TOKEN, CDC_PUBLIC_URL, CDC_RELAY_URL, CDC_DEVICE_NAME, CDC_ALLOWED_DIRS, CDC_ALLOW_SHELL, CDC_ALLOW_SSH, and CDC_ALLOW_ALL_DIRS.
Available tools
The current build registers 19 tools:
Files:
read_file,write_file,append_file,edit_file,receive_image_file,get_file_infoDirectories:
list_directory,create_directory,move_file,delete_filesSearch:
search_filesTerminal:
execute_commandSSH:
ssh_session_open,ssh_session_write,ssh_session_read,ssh_session_resize,ssh_session_closeProcesses:
list_processes,kill_process
Tool availability is controlled by local configuration and permissions. Some operations can modify or delete files or execute commands with the privileges of the operating-system user running the Agent.
Security
This software can execute commands and access files on your behalf. Treat it as a privileged remote administration tool.
Keep
allowedDirsnarrow. AvoidallowAllDirs: trueunless you fully understand the consequences.Keep the Relay bound to loopback behind a trusted HTTPS tunnel/reverse proxy whenever possible.
Use strong, unique generated secrets. Never publish
config/config.local.json,config/config.json, tunnel credentials, private keys, logs, or usage data.Do not expose the Agent bridge directly to the Internet.
Enable SSH only when required; verify host fingerprints independently.
Restrict who can reach your public MCP endpoint. Consider Cloudflare Access or an equivalent access-control layer where compatible with your MCP client.
Run the Agent under a dedicated OS account with limited filesystem and process privileges where practical.
Review every command and file operation requested by your MCP client.
See SECURITY.md for the security model and reporting guidance.
Development
npm install
npm testNode.js test runner is used. No production build step is required.
License
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Remote MCP access to user-authorized Linux, Windows and Intel Mac devices for AI assistants.
Termalin's hosted MCP server. Claude, ChatGPT or any MCP client runs commands, moves files over SFTP, queries databases and reads server metrics and monitoring alerts on your servers, keylessly through Termalin Connectors: no SSH key is handed over and no inbound port is opened. Per-host command policy and an audit log. Needs a termal.in Pro or Team account (new accounts start with a 14-day Pro trial).
Remote MCP server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
SSH client, server management and one remote MCP URL for your machines, with human approvals.
Related MCP Servers
- AlicenseAqualityCmaintenanceAn MCP server that gives AI agents SSH access to remote machines through your local OpenSSH client, enabling remote command execution, file transfer, persistent shell sessions, and port forwarding.17447 PyPI42MIT
- FlicenseNot gradedqualityDmaintenanceEnables agents to connect to remote MCP servers once, access their tools through a compact MCP endpoint, pair a CLI inside sandboxes, and create watches that turn command or tool output into pollable structured events.2-
- AlicenseNot gradedqualityBmaintenanceConnects ChatGPT and MCP clients to authorized local development environments, enabling secure file access, shell execution, persistent tasks, browser/desktop control, and remote management of projects.23MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI clients and agents to execute commands in real interactive PTY sessions, manage host filesystem operations, and access 15 MCP tools via Stdio, SSE, or REST with secure API-key authentication.-