@developkiko/desktop-commander
MCP server for terminal operations and file editing, enabling AI assistants to manage files, run commands, and process large content with auto-chunking.
README
π·πΊ Π ΡΡΡΠΊΠ°Ρ Π²Π΅ΡΡΠΈΡ
<br />
<div align="center"> <h1>π₯οΈ @developkiko/desktop-commander</h1> <p><strong>MCP server for terminal operations and file editing</strong></p> <p>Fork of <a href="https://github.com/wonderwhy-er/DesktopCommanderMCP">Desktop Commander</a> with critical fixes for large file handling</p>
<p> <a href="https://www.npmjs.com/package/@developkiko/desktop-commander"> <img src="https://img.shields.io/npm/v/@developkiko/desktop-commander?style=for-the-badge&logo=npm&color=cb3837" alt="npm version" /> </a> <a href="https://github.com/developkiko/DsktpCmndr/blob/main/LICENSE"> <img src="https://img.shields.io/github/license/developkiko/DsktpCmndr?style=for-the-badge&color=blue" alt="MIT License" /> </a> <a href="https://github.com/developkiko/DsktpCmndr"> <img src="https://img.shields.io/github/stars/developkiko/DsktpCmndr?style=for-the-badge&logo=github&color=gold" alt="GitHub Stars" /> </a> <br /> <a href="https://nodejs.org/"> <img src="https://img.shields.io/badge/node-%3E%3D18.0.0-brightgreen?style=for-the-badge&logo=node.js" alt="Node Version" /> </a> <a href="https://www.typescriptlang.org/"> <img src="https://img.shields.io/badge/built%20with-TypeScript-3178C6?style=for-the-badge&logo=typescript" alt="TypeScript" /> </a> <img src="https://img.shields.io/badge/MCP-server-6C47FF?style=for-the-badge&logo=anthropic" alt="MCP Server" /> </p> </div>
π Table of Contents
- What is this?
- β¨ What's Fixed?
- π¦ Installation
- βοΈ Configuration in Chatbox AI
- π§ Available Tools
- π‘ Usage Examples
- π Why This Fork?
- π Links
π§ What is this?
Desktop Commander is an MCP (Model Context Protocol) server that gives AI assistants like Claude, Chatbox, Cursor, and others direct access to your computer's file system and terminal.
With it, an LLM agent can:
- π Create, read, edit, and delete files and folders
- π Search for files and text across your project
- π₯οΈ Run terminal commands and Python scripts
- π Work with PDFs, Excel files, and images
- βοΈ Perform surgical text replacements with
edit_block
This is a maintained fork with critical bug fixes β see below.
β¨ What's Fixed?
The original Desktop Commander had a critical issue: no content size limits in file operations. When an AI tried to write files larger than ~500 lines, the entire content was sent as a single MCP JSON-RPC message, causing:
β
Unterminated string in JSON at position 37769
π΄ Problem 1: write_file buffer overflow
Before (original): Writing 5000 lines β 1 giant JSON-RPC string β stdio buffer overflows β JSON.parse crash
After (fixed): Content is automatically split into 30-line chunks, each written in a separate MCP call:
| Chunk | Mode | Content |
|---|---|---|
| #1 | rewrite | Lines 1β30 |
| #2 | append | Lines 31β60 |
| #3 | append | Lines 61β90 |
| ... | append | ... |
| #167 | append | Lines 4971β5000 |
π΄ Problem 2: No size validation for read/write
Before: writeFile() could receive 500MB+ in one call β OOM. readFile() could load a 2GB file β heap overflow.
After: Explicit byte limits with clear error messages:
writeFile(): 10 MB max content sizereadFileInternal(): 50 MB max file sizehandleWriteFile(): 10,000 lines hard cap with auto-chunking up to that limit
π΄ Problem 3: Windows path handling
Paths are now properly normalized regardless of slash direction (/ vs \).
π¦ Installation
Option A: Via npx (recommended)
npx @developkiko/desktop-commander@latest
Option B: Global install
npm install -g @developkiko/desktop-commander
desktop-commander
Option C: Local development
# Clone and build
git clone https://github.com/developkiko/DsktpCmndr.git
cd DsktpCmndr
npm install
npm run build
# Run directly
node dist/index.js
βοΈ Configuration in Chatbox AI
To use this server in Chatbox AI:
- Open Settings β MCP Servers
- Click Add MCP Server (or edit existing)
- Fill in:
| Field | Value |
|---|---|
| Name | DsktpCmndr |
| Type | stdio |
| Command | npx |
| Args | @developkiko/desktop-commander@latest |
| Env | (leave empty unless needed) |
- Save and restart Chatbox
Or, for the local build:
- Command:
node- Args:
E:\LLM\mcps\DsktpCmndr\dist\index.js
π§ Available Tools
| # | Tool | Description |
|---|---|---|
| 1 | read_file |
Read files (text, PDF, Excel, images) with offset/length pagination |
| 2 | read_multiple_files |
Read multiple files at once |
| 3 | write_file |
Auto-chunking! Writes files with automatic splitting for large content |
| 4 | edit_block |
Surgical find-and-replace in files |
| 5 | create_directory |
Create folders (recursive) |
| 6 | list_directory |
List folder contents with configurable depth |
| 7 | move_file |
Move or rename files |
| 8 | get_file_info |
Get file metadata (size, dates, line count, sheets) |
| 9 | write_pdf |
Create and modify PDF files |
| 10 | start_process |
Run terminal commands and REPLs (Python, Node.js, etc.) |
| 11 | read_process_output |
Read process output with pagination |
| 12 | interact_with_process |
Send input to a running process |
| 13 | force_terminate |
Stop a running process |
| 14 | kill_process |
Kill a process by PID |
| 15 | start_search |
Search files by name or content (streaming) |
| 16 | get_config |
View server configuration |
| 17 | set_config_value |
Modify server configuration |
π‘ Usage Examples
π Creating a project structure
"Create folders for a React project:
src/components,src/pages,src/hooks,public, and a blankREADME.md"
flowchart LR
A["π₯οΈ You ask AI"] --> B["create_directory('src/components')"]
A --> C["create_directory('src/pages')"]
A --> D["create_directory('src/hooks')"]
A --> E["create_directory('public')"]
A --> F["write_file('README.md','# My Project')"]
π Searching for text in files
"Find all
.tsfiles inE:\WORK\my\GameDevthat containGameLoopand show the first 10 lines"
start_search(path="E:\WORK\my\GameDev", pattern="GameLoop", searchType="content", filePattern="*.ts")get_more_search_results(sessionId)- For each result:
read_file(path, offset=0, length=10)
π Analyzing a large CSV
Bad approach: β "Read this 500MB CSV file" β MCP buffer overflow
Good approach: β "Read the first 5 lines of
sales.csvto see headers, then start Python and analyze with pandas"
1. read_file("sales.csv", offset=0, length=5) β shows headers
2. start_process("python -i")
3. import pandas as pd
4. df = pd.read_csv("E:/DATA/sales.csv") β Python reads directly
5. df.groupby("Region")["Amount"].sum() β analysis in Python
π Running a Python script
"Run
E:\scripts\backup.pyand tell me what it outputs"
1. start_process("python E:\scripts\backup.py")
2. read_process_output(pid)
βοΈ Replacing text across files
"Replace
console.logwithlogger.infoin all.jsfiles inE:\WORK\app"
1. start_search(path="E:\WORK\app", pattern="console.log", filePattern="*.js")
2. For each match: edit_block(file, old="console.log", new="logger.info")
π Why This Fork?
The original Desktop Commander by wonderwhy-er is a fantastic project. This fork exists to:
- Fix the critical auto-chunking bug β large files would crash the MCP transport
- Add proper size validation β prevent OOM from accidental giant file reads/writes
- Provide ongoing maintenance β as an independent community fork
- Ensure Windows compatibility β proper path handling for Windows users
All credit for the original architecture goes to wonderwhy-er and contributors.
π Links
| Resource | Link |
|---|---|
| π¦ npm | @developkiko/desktop-commander |
| π GitHub | github.com/developkiko/DsktpCmndr |
| π Original | Desktop Commander by wonderwhy-er |
| π¬ MCP Protocol | modelcontextprotocol.io |
<div align="center"> <sub>Built with β€οΈ by <strong>Kiko</strong> β MIT License</sub> </div>
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.