# Desktop Commander MCP — Local Terminal + Files > Desktop Commander MCP gives agents controlled local terminal + filesystem tools (including PDF/DOCX/Excel). Install via npx and verify by listing tools. ## Install Merge the JSON below into your `.mcp.json`: # Desktop Commander MCP — Local Terminal + Files > Desktop Commander MCP gives agents controlled local terminal + filesystem tools (including PDF/DOCX/Excel). Install via npx and verify by listing tools. ## Quick Use 1) Install ```bash npx @wonderwhy-er/desktop-commander@latest setup ``` 2) Run ```bash In your MCP client: ask to list files in a folder and run a safe read-only command ``` 3) Verify ```bash In your MCP client: confirm Desktop Commander tools appear ``` --- ## Intro **Best for**: developers who want a single MCP server for terminal + file inspection while keeping work local **Works with**: Claude Desktop or any MCP client, Node.js + npx; local filesystem access **Setup time**: 8 minutes ### Quant Data - Install via `npx ... setup` with auto-updates (repo) - Built-in PDF/DOCX/Excel support (repo) --- ## How to Use It Well Use Desktop Commander as your agent's local bridge: inspect files, run reproducible commands, and keep artifacts (logs, reports) versioned in your repo. ### Adoption Checklist - Start with one real task and keep the scope narrow - Capture a baseline: time-to-first-success and output quality - Version your config/skills so teammates stay in sync ### Guardrails Define a safety policy: which commands are allowed, which folders are readable, and when human approval is required. ### FAQ **Q: Is it safe by default?** A: Treat it like giving a coworker terminal access: start with read-only tasks, restrict directories, and avoid storing secrets in logs. **Q: Do I need Docker?** A: No. The repo offers multiple install options; Docker is optional if you want extra isolation. **Q: How do I avoid context overflow?** A: Prefer targeted reads and pagination; the repo supports offset/length style reads to keep outputs small. --- ## Source & Thanks > GitHub: https://github.com/wonderwhy-er/DesktopCommanderMCP > Owner avatar: https://avatars.githubusercontent.com/u/1150639?v=4 > License (SPDX): MIT > GitHub stars (verified via `api.github.com/repos/wonderwhy-er/DesktopCommanderMCP`): 6,024 --- # Desktop Commander MCP——本地终端与文件工具 > Desktop Commander MCP 让 AI 代理在本机安全执行终端与文件操作(含 PDF/DOCX/Excel)。npx 安装后即可在 Claude Desktop/其他 MCP 客户端调用。 ## 快速使用 1)安装 ```bash npx @wonderwhy-er/desktop-commander@latest setup ``` 2)运行 ```bash In your MCP client: ask to list files in a folder and run a safe read-only command ``` 3)验证 ```bash In your MCP client: confirm Desktop Commander tools appear ``` --- ## 简介 **适合谁**:想把终端与文件检查统一交给一个 MCP server,并把数据留在本机的开发者 **适用环境**:Claude Desktop 或其他 MCP 客户端、Node.js + npx、本地文件系统权限 **安装耗时**:8 分钟 ### 量化信息 - 可用 `npx ... setup` 安装并自动更新(仓库) - 内置 PDF/DOCX/Excel 支持(仓库) --- ## 用好它的方式 把 Desktop Commander 当作 agent 的本地桥梁:检查文件、跑可复现命令,并把日志/报告作为产物落到仓库里。 ### 推广清单 - 先选一个真实任务,小范围试跑 - 记录基线:首次成功耗时与输出质量 - 配置/技能要版本化,避免团队漂移 ### 风险与护栏 先定义安全策略:允许哪些命令、可读哪些目录、哪些操作必须人工确认。 ### FAQ **Q: 默认安全吗?** A: 把它当成给同事终端权限:先做只读任务、限制目录范围,并避免把密钥写进日志。 **Q: 必须用 Docker 吗?** A: 不必。仓库提供多种安装方式;Docker 只是想要额外隔离时的可选项。 **Q: 怎么避免上下文溢出?** A: 优先做定点读取和分页;仓库支持按 offset/length 取输出,避免一次塞太多内容。 --- ## 来源与感谢 > GitHub:https://github.com/wonderwhy-er/DesktopCommanderMCP > Owner avatar:https://avatars.githubusercontent.com/u/1150639?v=4 > 许可证(SPDX):MIT > GitHub stars(已通过 `api.github.com/repos/wonderwhy-er/DesktopCommanderMCP` 核验):6,024 --- Source: https://tokrepo.com/en/workflows/desktop-commander-mcp-local-terminal-files Author: MCP Hub