GPT Commander
Used as a linter and formatter in the opinionated primitives for Node projects (lint, format tools).
Used as a linter in the opinionated primitives for Node projects (lint tool).
Offers tools for common Git operations: git_status, git_diff, and git_commit_prepare.
Used as a test runner in the opinionated primitives for Node projects (run_tests tool).
Used as a test runner in the opinionated primitives for Node projects (run_tests tool).
Detected as a package manager and used for running test, lint, build, and dev commands.
Provides a standalone MCP server that exposes local Ollama models via tools like ollama_list_models, ollama_generate, and ollama_chat.
Detected as a package manager and used for running test, lint, build, and dev commands.
Detected as a Python package manager and used for running test, lint, build, and dev commands.
Used as a formatter in the opinionated primitives for Node projects (format tool).
Used as a test runner in the opinionated primitives for Python projects (run_tests tool).
Used as a linter and formatter in the opinionated primitives for Python projects (lint and format tools).
Used as a test runner in the opinionated primitives for Node projects (run_tests tool).
Detected as a package manager and used for running test, lint, build, and dev commands.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@GPT Commander search for 'TODO' in workspace"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
GPT Commander: An LLM-Facing Software Engineering Substrate
GPT Commander is a security-first MCP server that gives LLMs a safe, structured way to operate on a developer environment. It provides filesystem, process, and search tools; opinionated build/test/lint primitives; optional IDE-native context via VS Code; and integrations for CLI runners and memory stores.
This repo is intentionally "LLM-native": the tool surface is constrained, named, and predictable so models can operate reliably without improvising shell commands.
Why this exists
LLMs are best when the action space is small, stable, and explicit.
Most existing "terminal helpers" are too permissive or too brittle.
The difference between "helper" and "pair programmer" is IDE context and safe primitives.
Related MCP server: mcp-devtools
Feature highlights (all the bells + whistles)
Security guardrails: path allowlist, command blocklist, read/write limits, binary file sniffing.
Process management: start, interact, read output, kill; TTL auto-prunes long-running sessions.
Search + edits: ripgrep-backed search + targeted block replacement.
Opinionated primitives:
run_tests,lint,build,typecheck,dev_server_start, etc.IDE bridge (VS Code): diagnostics, symbols, references, workspace edits, and unsaved buffers.
CLI wrappers: safe runners for Codex, Claude, and Gemini CLIs.
Memory MCP: a
memory_notetool that stores ad hoc notes externally.Telemetry: optional tool/command metrics + JSONL event log.
Onboarding gate: mandatory obstacle course to ensure the model is actually calling tools correctly.
HTTP/SSE or stdio: run as a local stdio MCP or as a URL-based SSE MCP.
Requirements
Node.js >= 18
ripgrep (
rg) on PATH (recommended forstart_search)
Install
npm install
npm run buildRun: Stdio MCP (local clients)
Add to your MCP config (e.g. GPT Desktop, Claude Desktop, Codex, etc.):
{
"mcpServers": {
"gpt-commander": {
"command": "node",
"args": ["/path/to/dist/index.js"],
"env": {
"GPT_DC_CONFIG": "/optional/custom/config.json"
}
}
}
}Run: HTTP/SSE MCP (URL clients)
npm run build
node dist/sse.jsThen point your MCP client at:
http://127.0.0.1:3333/mcpIf you are using a reverse proxy or tailnet URL, set an absolute endpoint:
GPT_DC_HOST=127.0.0.1 GPT_DC_PORT=3333 \
GPT_DC_ABSOLUTE_ENDPOINT="https://your-host.example/desktop" \
node dist/sse.jsOllama MCP (optional)
This repo includes a standalone MCP server that exposes local Ollama via tools.
npm run build
OLLAMA_HOST="http://127.0.0.1:11434" node dist/ollama-mcp.jsTools:
ollama_list_modelsollama_show_modelollama_generateollama_chat
Optional env:
OLLAMA_HOST(defaulthttp://127.0.0.1:11434)OLLAMA_TIMEOUT_MS(default120000)
OpenWebUI tool (sparse + CLI)
OpenWebUI Function plugin that bridges to Commander MCP with a minimal tool list plus CLI wrappers.
File:
openwebui/commander_mcp_bridge.pySetup:
openwebui/README.md
Configuration
Default config is created at ~/.gpt-desktop-commander/config.json.
{
"allowedDirectories": ["$HOME"],
"blockedCommands": ["rm", "shutdown", "reboot", "mkfs", "mount", "umount"],
"fileReadLimitBytes": 10485760,
"fileWriteLineLimit": 10000,
"defaultShell": "$SHELL",
"enableShell": true,
"telemetryEnabled": false,
"telemetryLogFile": "$HOME/.gpt-desktop-commander/telemetry.jsonl",
"telemetryMaxEvents": 200,
"processTtlMinutes": 480,
"onboarding": {
"enabled": true
},
"memoryMcp": {
"enabled": false,
"url": "",
"defaultType": "note",
"defaultScope": "",
"defaultTags": [],
"defaultTtlDays": 0
},
"ideBridge": {
"enabled": false,
"host": "127.0.0.1",
"port": 7311,
"token": "<generated>",
"requestTimeoutMs": 15000,
"originAllowlist": []
}
}Set GPT_DC_CONFIG to point at a specific config file. The config is loaded at server start, so restart the server to apply changes.
Onboarding gate (mandatory)
When onboarding.enabled is true, all tool calls are gated until onboarding completes. The tool list is still visible so the model can discover commander_onboard.
Onboarding steps:
commander_onboardtools/listlist_directorystart_searchcommander_finish
This ensures the model has proven it can execute tools correctly before getting full capabilities.
IDE Bridge (VS Code)
The IDE bridge exposes LSP-grade context: diagnostics, symbols, references, workspace edits, and unsaved buffers.
Enable in config:
{
"ideBridge": {
"enabled": true,
"host": "127.0.0.1",
"port": 7311,
"token": "YOUR_TOKEN"
}
}Install the VS Code extension from the
vscode-extension/folder.Set VS Code settings:
gptDesktopCommander.bridgeUrl = "ws://127.0.0.1:7311"
gptDesktopCommander.bridgeToken = "YOUR_TOKEN"Use
ide_list_workspaces()to get theworkspaceId, then call:
ide_get_diagnosticside_symbol_searchide_find_referenceside_read_bufferide_apply_workspace_edit
Opinionated primitives (Node + Python)
The project_info tool detects project language and tooling. Primitives use the best available commands:
Node/TypeScript
Detection:
package.json, lockfiles for npm/yarn/pnpmtsconfig*.jsonfor typecheck Commands:run_tests:npm run testor localvitest/jest/mocha/avalint:npm run lintor localeslint/biomeformat:npm run formator localprettier/biometypecheck: localtsc/vue-tsc --noEmitdev_server_start:npm run devornpm run start
Python
Detection:
pyproject.toml,requirements.txt,setup.pyuv,poetry, orpipCommands:run_tests:pytestlint:ruff check .‑format:ruff format .orblack .‑typecheck:mypy .
CLI wrappers (Codex, Claude, Gemini)
Set the paths and the CLI wrappers become tools:
CODEX_PATH=/opt/homebrew/bin/codex
CLAUDE_PATH=$HOME/.local/bin/claude
GEMINI_PATH=/opt/homebrew/bin/gemini
GEMINI_WORKDIR=$HOME/gemini-workTools:
codex_run(args?, cwd?, env?, timeoutMs?, maxBufferBytes?, input?)claude_run(args?, cwd?, env?, timeoutMs?, maxBufferBytes?, input?)gemini_run(args?, cwd?, env?, timeoutMs?, maxBufferBytes?, input?)
Memory MCP integration
memory_note writes to a separate Memory MCP (e.g. memory.write).
Config:
{
"memoryMcp": {
"enabled": true,
"url": "https://memory.example/mcp",
"defaultType": "note"
}
}Tool:
memory_note { "content": "...", "type": "note", "tags": ["ops"] }Telemetry
When enabled, get_metrics returns totals and recent events for:
tool calls
command exits
durations
error counts
Optional JSONL logging is written to telemetryLogFile.
Tool surface
Core tools:
commander_onboardcommander_finishget_metricsmemory_notelist_directory,read_file,write_file,get_file_infostart_process,interact_with_process,read_process_output,list_sessions,kill_processstart_search(ripgrep)edit_block
IDE tools:
ide_list_workspaces,ide_get_diagnostics,ide_symbol_search,ide_find_referenceside_read_buffer,ide_apply_workspace_edit
Primitives:
project_inforun_tests,run_unit_tests,run_integration_testslint,format,typecheck,builddev_server_start,dev_server_stop
Dev helpers:
git_status,git_diff,git_commit_preparesearch_code,find_symbol,open_file_at_line
Environment variables
Server:
GPT_DC_CONFIG(config path override)GPT_DC_HOST,GPT_DC_PORT(SSE bind)GPT_DC_TAILNET_HOST(allowed host list)GPT_DC_ABSOLUTE_ENDPOINT(absolute base for SSE rewrite)GPT_DC_TLS_KEY,GPT_DC_TLS_CERT(optional HTTPS)
CLI wrappers:
CODEX_PATH,CLAUDE_PATH,GEMINI_PATH,GEMINI_WORKDIR
Security model
Path allowlist: every FS op is resolved inside
allowedDirectoriesusing realpath.Command blocklist: hard-fails dangerous commands before spawn.
Read/write limits: prevents giant file operations.
Binary detection: rejects non-text reads by default.
Process TTL: prevents zombie processes from lingering.
Troubleshooting
Tool not found: ensure you are calling tools by name via
tools/call, not/Commander/link_*.Tool list stale: start a new chat to refresh the tool registry.
CLI tool missing: verify the
*_PATHenv var is set before server start.IDE bridge offline: confirm VS Code extension is running and token matches.
SSE origin mismatch: set
GPT_DC_ABSOLUTE_ENDPOINTfor proxy/tailnet URLs.
Roadmap ideas
Append-only audit log
Rich search (glob + ignore support)
Safer structured edits (range-based)
Per-tool rate limits
License
PolyForm Noncommercial 1.0.0. See LICENSE.md.
Available Tools
40 toolsbuildC
Run build with a detected command
Inputs: cwd, target.
claude_runC
Run the Claude CLI with safe arguments
Inputs: cwd, env, args, input, +2 more.
codex_runC
Run the Codex CLI with safe arguments
Inputs: cwd, env, args, input, +2 more.
commander_finishB
Complete onboarding after required steps
Inputs: no named parameters.
commander_onboardA
Start mandatory onboarding and return the one sheet + obstacle course
Inputs: no named parameters.
dev_server_startC
Start a detected dev server and return a process id
Inputs: cwd, target.
dev_server_stopA
Stop a dev server by process id
Inputs: id (required).
edit_blockB
Replace the Nth occurrence of text in a file
Inputs: path (required), target (required), replacement (required), occurrence.
find_symbolC
Find symbols using IDE index (LSP)
Inputs: query (required), workspaceId (required).
formatC
Run formatting with a detected command
Inputs: cwd, target.
gemini_runC
Run the Gemini CLI with safe arguments
Inputs: cwd, env, args, input, +2 more.
get_file_infoD
Stat a file
Inputs: path (required).
get_metricsC
Get telemetry metrics and recent events
Inputs: maxEvents, includeEvents.
git_commit_prepareC
Stage changes (optional) and return a commit prep summary
Inputs: cwd, paths, stageAll.
git_diffC
Get git diff (optionally staged)
Inputs: cwd, staged.
git_statusC
Get git status (short)
Inputs: cwd.
ide_apply_workspace_editC
Apply a VS Code WorkspaceEdit (atomic) with a preview summary
Inputs: edit (required), workspaceId (required), previewOnly.
ide_find_referencesC
Find references using the IDE index
Inputs: line (required), path (required), character (required), workspaceId (required).
ide_get_diagnosticsB
Get IDE diagnostics (optionally filtered by file or severity)
Inputs: workspaceId (required), path, severity.
ide_list_workspacesA
List connected IDE workspaces
Inputs: no named parameters.
ide_read_bufferB
Read an IDE buffer (includes unsaved changes when available)
Inputs: path (required), workspaceId (required).
ide_symbol_searchC
Search workspace symbols using the IDE index
Inputs: query (required), workspaceId (required).
interact_with_processC
Send stdin to a process
Inputs: id (required), input (required).
kill_processC
Kill a process
Inputs: id (required).
lintC
Run lint with a detected command
Inputs: cwd, target.
list_directoryB
List directory entries
Inputs: path.
list_sessionsB
List active processes
Inputs: no named parameters.
memory_noteC
Store a note in the memory MCP
Inputs: content (required), tags, type, scope, +1 more.
open_file_at_lineC
Read a file snippet around a line number
Inputs: line (required), path (required), context.
project_infoC
Detect project tooling, package managers, scripts, and CI
Inputs: cwd.
read_fileD
Read a text file with limits
Inputs: path (required), limit, offset.
read_process_outputC
Read buffered process output
Inputs: id (required), maxLines.
run_integration_testsC
Run integration tests with a detected command
Inputs: cwd, target.
run_testsC
Run project tests with a detected command
Inputs: cwd, target.
run_unit_testsC
Run unit tests with a detected command
Inputs: cwd, target.
search_codeC
Search code using ripgrep with safe defaults
Inputs: query (required), cwd, glob, depth, +1 more.
start_processC
Start a long-running process
Inputs: command (required), cwd, env, args, +1 more.
start_searchC
Search files with ripgrep
Inputs: query (required), cwd, depth.
typecheckC
Run typecheck with a detected command
Inputs: cwd, target.
write_fileC
Write a text file (line-limited)
Inputs: path (required), content (required), append.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 40 tools
Several tools have overlapping purposes: start_search and search_code both use ripgrep, and ide_symbol_search and find_symbol both use the IDE/LSP symbol index. This creates ambiguity in tool selection, especially for agents trying to choose the right search or symbol tool.
Most tools follow a verb_noun snake_case pattern (e.g., read_file, kill_process, list_sessions, dev_server_start). However, memory_note is a noun phrase rather than a verb, and a few tools are bare verbs (lint, format, build), creating minor inconsistency.
At 40 tools, the surface is very large. While the server aims to cover many domains, there are redundant tools (e.g., start_search/search_code, ide_symbol_search/find_symbol) that inflate the count and could be consolidated, making the tool set feel heavy and less focused.
Core workflows such as file operations, process management, IDE integration, and project commands are well covered. However, there are notable gaps: no file delete/rename, no memory retrieval (only memory_note), and git tools stop short of an actual commit, leaving some workflows incomplete.
Maintenance
Related MCP Connectors
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
MCP server for your apps' tools and custom tools, plus hosted AI agents and approval-gated workflows
Shared memory MCP server for Claude Code, Codex, Gemini CLI and Cursor. Cited, editable.
MCP server for secureFlows: token-free URL builders and integration-linting tools for AI agents.
Related MCP Servers
- AlicenseCqualityCmaintenanceA privacy-first MCP server that provides local LLM-enhanced tools for code analysis, security scanning, and automated task execution using backends like Ollama and LM Studio. It enables symbol-aware code reviews and workspace exploration while ensuring that all code and analysis remain strictly on your local machine.36ISC
- AlicenseBqualityDmaintenanceProduction-grade MCP server that gives AI agents safe access to your local dev environment: filesystem, databases, processes, and OpenAPI specs.1555 npm4MIT
- AlicenseNot gradedqualityBmaintenanceA powerful MCP server that enables LLMs to safely execute code, control file systems, search the web, and integrate with services like Gmail and TMDB.MIT
- AlicenseNot gradedqualityCmaintenanceLocal-first MCP server that provides project context, verification gates, and structured tools for coding agents to discover knowledge, run diagnostics, and execute allowlisted commands within a repository.41 npmMIT