Workbench MCP Server
Provides remote project access via MCP, enabling file operations, code search, git commands, and background Claude CLI execution.
README
Workbench MCP Server
An MCP server for remote access to a project over the network. It lets a
Claude CLI running on another machine read/write files, search code, run
allow-listed commands and work with git in the context of a chosen project — and
also launch a Claude CLI on the host machine in the background (claude_start).
Originally built for Workbench, but it
works with any project — the path is set via MCP_PROJECT_ROOT.
Quick start
git clone https://github.com/jazz-max/workbench-mcp.git && cd workbench-mcp
npm install
cp .env.example .env
# edit .env: set MCP_AUTH_TOKEN and MCP_PROJECT_ROOT
npm start
On a successful start you'll see:
MCP server listening on http://0.0.0.0:3100/mcp (auth enabled)
Project root: /path/to/your/project
Install via npm / npx
Without cloning the repository:
# one-off run, no install
MCP_AUTH_TOKEN=<token> MCP_PROJECT_ROOT=/path/to/project npx workbench-mcp
# or install globally
npm install -g workbench-mcp
MCP_AUTH_TOKEN=<token> MCP_PROJECT_ROOT=/path/to/project workbench-mcp
When run via
npx/global install there is no.envnext to the server — set the configuration via environment variables directly. In this caseMCP_PROJECT_ROOTis required (otherwise the server doesn't know which project to serve).
Run via pm2 (recommended for long-running use)
pm2 start server.mjs --name workbench-mcp
pm2 save
pm2 startup # start on boot (one-time)
pm2 logs workbench-mcp # logs
pm2 restart workbench-mcp # restart after changes
Configuration (.env)
| Variable | Default | Description |
|---|---|---|
MCP_PORT |
3100 |
Server port |
MCP_AUTH_TOKEN |
(empty) | Bearer token. Without a token the server runs without authentication (use only on a trusted local network) |
MCP_PROJECT_ROOT |
parent directory | Absolute path to the project the server serves |
Generate a token: node -e "console.log(crypto.randomUUID())"
Connecting Claude CLI (from another machine)
# host IP (macOS): ipconfig getifaddr en0
claude mcp add workbench \
--transport http \
--url http://<IP>:3100/mcp \
--header "Authorization: Bearer <TOKEN_FROM_.env>"
claude mcp list # verify
claude mcp remove workbench
Tools
| Tool | Description |
|---|---|
project_info |
Project overview: CLAUDE.md, servlet list (if servlets.json exists), docs/, current branch |
read_file |
Read a file (path relative to project root), up to 1 MB, with line numbers |
write_file |
Write a file (creates directories). Forbidden: .env*, node_modules/, vendor/ |
list_files |
List a directory (optionally recursive, name filter), up to 500 entries |
search_code |
Search by content (regex/grep), glob filter, excludes node_modules/vendor/.git/storage/public |
run_command |
A command from the allowlist, execFile (no shell), 30s timeout, output up to 1 MB |
git_status |
Current branch, git status --porcelain, last 10 commits |
claude_start |
Launch claude -p in the background with a prompt → returns a taskId |
claude_result |
Status and result of a background task by taskId (running/done/error) |
allowlist for run_command: git, php, composer, npm, node, npx, ls, cat, head, tail, find, grep, rg, wc, diff, file, which, pwd, echo
Scenario: remote development from two machines
Machine A — the project and the MCP server. Machine B — the Claude CLI for exploration.
LAN (port 3100)
Machine B ──────────────────────> Machine A
Claude CLI MCP server
(research, specs) (project files, git, commands)
Note: Claude Code CLI must be installed on both machines — on B as the client that connects to the MCP server and drives the work, and on A, where
claude_startruns Claude locally on the host for coding.
A typical flow for a new feature:
- The MCP server is running on machine A.
- In the Claude CLI on machine B:
> Use project_info to understand the project structure > Read app/Servlets/BaseServlet.php — the base class > Read app/Servlets/DemoBooksScraper.php — an example > Research example.com and write a spec to docs/spec.md - Without switching to machine A, ask your Claude to delegate the coding to the host:
Claude on machine B calls> Ask claude on the workbench to write the parser per docs/spec.mdclaude_start→ a separate Claude CLI launches on machine A ("the workbench") and writes the code. Collect the result viaclaude_result.
Security
- Requests are protected by a Bearer token (
MCP_AUTH_TOKEN). Without a token the server runs without authentication — only expose it on a trusted network. run_commandis restricted to an allowlist and usesexecFile(no shell injection).write_fileforbids writing to.env*,node_modules/,vendor/.- The server grants remote access to files and command execution — do not expose it to the public internet without a separate reverse proxy with TLS and authentication.
Troubleshooting
- Cannot connect: both machines on the same network; check the IP;
curl http://localhost:3100/mcpshould return 405; check the firewall (macOS may ask to allow Node.js). - Unauthorized: the token in
--headermust matchMCP_AUTH_TOKEN. - Command not allowed: the command is not in the allowlist.
- Port in use:
lsof -ti:3100 | xargs kill -9.
License
MIT.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。