Local Workspace MCP
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.
Local Workspace MCP
Bahasa Indonesia
Apa ini?
Local Workspace MCP berjalan sepenuhnya di komputermu. Ada dua bagian:
Editor web di
http://127.0.0.1:43787— file tree, edit, autosave, buat/rename/hapus file.Server MCP — protokol yang dipakai Claude, ChatGPT, Gemini, Copilot, opencode, Cursor dan lainnya untuk memanggil tools. Lewat MCP, AI bisa membaca file, menulis kode, mengedit sebagian, menyusun struktur folder, mencari teks, dan menghapus file — langsung di disk kamu.
Tidak ada cloud, tidak ada akun, tidak ada database, tidak ada telemetri. Hanya Node.js dan dua dependency. Untuk akses dari luar, satu perintah ssh lewat localhost.run sudah cukup — tanpa domain, tanpa Cloudflare, tanpa kartu kredit.
Kelebihan
Kelebihan | Penjelasan |
Satu workspace, banyak AI | Semua client MCP memakai folder yang sama. Ganti AI tanpa memindahkan file. |
Langsung ke disk | AI menulis file asli, bukan potongan kode di chat. Penulisan atomik, folder induk dibuat otomatis. |
11 tool siap pakai | Baca, tulis, edit sebagian, scaffold struktur, cari, pindah, hapus. |
Dua mode koneksi |
|
Publik tanpa akun | localhost.run: tanpa domain, tanpa akun, tanpa build step. |
Editor yang tidak mengganggu | Autosave 700 ms, Ctrl+S, Tab = 2 spasi, indikator Ln/Col. |
Sandbox | Semua operasi dikunci ke satu folder; path traversal dan symlink keluar ditolak. |
Bisa diaudit | Setiap tulis, edit, pindah, dan hapus dicatat di |
Ringan | Tanpa framework, tanpa DB, tanpa bundler. |
Lintas OS | Windows, macOS, Linux. |
Cara menjalankan
Prasyarat: Node.js 18.17+. OpenSSH client hanya dibutuhkan kalau ingin tunnel publik (ssh -V).
git clone https://github.com/rinaldisign/local-workspace-mcp.git
cd local-workspace-mcp
npm install
npm startDi Windows: klik dua kali start.bat, atau jalankan npm.cmd install lalu npm.cmd start.
Saat pertama jalan, token dibuat otomatis di .token dan dicetak di terminal:
Editor UI : http://127.0.0.1:43787
MCP (local) : http://127.0.0.1:43787/mcp
Workspace : ...\local-workspace-mcp\workspace
TOKEN : 3f9c...Buka http://127.0.0.1:43787, tempel token sekali (disimpan di browser).
Pilih folder kerja: isi path absolut di kolom folder pada header, klik use. Kalau foldernya belum ada, kamu akan ditanya apakah mau dibuat. Pilihan disimpan di config.json dan dipakai lagi saat start berikutnya.
Urutan prioritas: config.json → WORKSPACE_DIR di .env → ./workspace. Root drive (C:\) dan folder sistem ditolak.
Akses publik dengan localhost.run
Dua terminal:
npm start # terminal 1 - aplikasi
npm run tunnel # terminal 2 - tunnelPerintah mentahnya:
ssh -o ServerAliveInterval=30 -R 80:localhost:43787 nokey@localhost.runTerminal tunnel mencetak URL seperti https://a1b2c3d4.lhr.life. URL MCP-mu:
https://a1b2c3d4.lhr.life/mcpURL berubah setiap sesi dan hanya hidup selama kedua proses berjalan.
Hubungkan AI
opencode — stdio (paling aman), ~/.config/opencode/opencode.json:
{
"mcp": {
"local-workspace": {
"type": "local",
"command": ["node", "/path/ke/local-workspace-mcp/mcp-stdio.js"],
"enabled": true
}
}
}opencode — remote lewat tunnel:
{
"mcp": {
"local-workspace-http": {
"type": "remote",
"url": "https://a1b2c3d4.lhr.life/mcp",
"headers": { "Authorization": "Bearer <TOKEN>" },
"enabled": true
}
}
}Claude Desktop — stdio:
{
"mcpServers": {
"local-workspace": {
"command": "node",
"args": ["/path/ke/local-workspace-mcp/mcp-stdio.js"]
}
}
}Claude / client lain — remote: Settings → Connectors → Add custom connector, isi https://a1b2c3d4.lhr.life/mcp. Kalau UI-nya mendukung header, tambahkan Authorization: Bearer <TOKEN>.
Setelah tersambung, cukup minta: "buat landing page di workspace saya" — AI memanggil create_tree / save_code dan file benar-benar muncul di disk.
Keamanan
Default-nya token aktif (
OPEN_MODE=false). Pertahankan begitu.OPEN_MODE=truemematikan auth sepenuhnya: siapa pun yang bisa mencapai URL itu bisa membaca, menulis, dan menghapus file. Hanya untuk uji lokal — jangan dipakai bersamaan dengan tunnel publik.URL tunnel itu publik, bukan rahasia. Hanya token yang membatasi akses.
Server hanya bind ke
127.0.0.1, jadi tidak terbuka ke LAN.Jangan menaruh kredensial di folder workspace selama tunnel hidup; trafik melewati server pihak ketiga.
Persempit permukaan dengan
ALLOWED_EXTENSIONSdanMAX_FILE_BYTES. Semua perubahan tercatat di.logs/activity.jsonl.
Detail lengkap: SECURITY.md.
Related MCP server: RelayForge MCP
English
What is this?
Local Workspace MCP runs entirely on your computer. Two parts:
Web editor at
http://127.0.0.1:43787— file tree, editing, autosave, create/rename/delete.MCP server — the protocol Claude, ChatGPT, Gemini, Copilot, opencode, Cursor and others use to call tools. Over MCP an AI can read files, write code, patch part of a file, scaffold folders, search text, and delete files directly on your disk.
No cloud, no account, no database, no telemetry. Just Node.js and two dependencies. For remote access, one ssh command through localhost.run is enough — no domain, no Cloudflare, no credit card.
Why use it
Advantage | Details |
One workspace, many AIs | Every MCP client shares the same folder. Switch AI without moving files. |
Straight to disk | The AI writes real files, not chat snippets. Atomic writes, parent folders created. |
11 ready-made tools | Read, write, patch, scaffold, search, move, delete. |
Two transports |
|
Public without an account | localhost.run: no domain, no signup, no build step. |
Editor that stays out of the way | 700 ms autosave, Ctrl+S, Tab = 2 spaces, Ln/Col. |
Sandboxed | Locked to one folder; path traversal and escaping symlinks are rejected. |
Auditable | Every write, edit, move and delete is appended to |
Lightweight | No framework, no DB, no bundler. |
Cross-platform | Windows, macOS, Linux. |
How to run
Requires Node.js 18.17+. An OpenSSH client is only needed for the public tunnel (ssh -V).
git clone https://github.com/rinaldisign/local-workspace-mcp.git
cd local-workspace-mcp
npm install
npm startOn Windows, double-click start.bat, or run npm.cmd install then npm.cmd start.
On first run a token is generated into .token and printed:
Editor UI : http://127.0.0.1:43787
MCP (local) : http://127.0.0.1:43787/mcp
Workspace : ...\local-workspace-mcp\workspace
TOKEN : 3f9c...Open http://127.0.0.1:43787 and paste the token once (kept in your browser).
Pick the working folder: put an absolute path in the folder box in the header and click use. If the folder does not exist you will be asked whether to create it. The choice is saved in config.json and reused on the next start.
Priority: config.json → WORKSPACE_DIR in .env → ./workspace. Drive roots (C:\) and system folders are refused.
Public access with localhost.run
Two terminals:
npm start # terminal 1 - the app
npm run tunnel # terminal 2 - the tunnelRaw command:
ssh -o ServerAliveInterval=30 -R 80:localhost:43787 nokey@localhost.runThe tunnel prints a URL such as https://a1b2c3d4.lhr.life. Your MCP URL is:
https://a1b2c3d4.lhr.life/mcpThe URL changes every session and only lives while both processes are running.
Connect an AI
opencode — stdio (safest), ~/.config/opencode/opencode.json:
{
"mcp": {
"local-workspace": {
"type": "local",
"command": ["node", "/path/to/local-workspace-mcp/mcp-stdio.js"],
"enabled": true
}
}
}opencode — remote through the tunnel:
{
"mcp": {
"local-workspace-http": {
"type": "remote",
"url": "https://a1b2c3d4.lhr.life/mcp",
"headers": { "Authorization": "Bearer <TOKEN>" },
"enabled": true
}
}
}Claude Desktop — stdio:
{
"mcpServers": {
"local-workspace": {
"command": "node",
"args": ["/path/to/local-workspace-mcp/mcp-stdio.js"]
}
}
}Claude / other clients — remote: Settings → Connectors → Add custom connector and paste https://a1b2c3d4.lhr.life/mcp. If the UI supports headers, add Authorization: Bearer <TOKEN>.
Then just ask: "make a landing page in my workspace" — the AI calls create_tree / save_code and the files appear on disk.
Security
Token mode is the default (
OPEN_MODE=false). Keep it.OPEN_MODE=truedisables auth entirely: anyone who can reach the URL can read, write and delete files. Local testing only — never alongside a public tunnel.A tunnel URL is public, not secret. Only the token restricts access.
The server binds to
127.0.0.1only, so it is not reachable from your LAN.Do not keep credentials in the workspace while a tunnel is live; traffic passes through a third-party server.
Narrow the surface with
ALLOWED_EXTENSIONSandMAX_FILE_BYTES. Every change is logged to.logs/activity.jsonl.
Full details: SECURITY.md.
Reference
MCP tools
Tool | What it does |
| absolute path, limits, allowed extensions, folder categories |
| recursive tree (bounded) |
| read one text file |
| write a full file (atomic, parent dirs created) |
| replace unique text, or |
| save into a category folder by extension |
| scaffold many files/folders at once |
| recursive |
| move / rename |
| delete file or folder |
| text search across the workspace |
save_code category mapping:
Extension | Folder |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
anything else |
|
REST API
All /api/* routes need Authorization: Bearer <TOKEN> (skipped in OPEN_MODE) and return JSON { ok: true | false }.
Method | Path | Body |
GET |
| – (public, includes |
GET |
| – |
GET | POST |
|
|
GET |
| – |
GET |
| – |
POST |
|
|
POST |
|
|
POST |
|
|
POST |
|
|
POST |
|
|
POST |
|
|
POST |
|
|
ALL |
| MCP JSON-RPC |
Quick check:
curl http://127.0.0.1:43787/api/info -H "Authorization: Bearer <TOKEN>"
curl -s https://a1b2c3d4.lhr.life/mcp \
-H 'Accept: application/json, text/event-stream' \
-H 'Content-Type: application/json' \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/list","params":{}}'Configuration / Konfigurasi
Copy .env.example to .env and edit:
Variable | Default | Meaning |
|
| HTTP port |
|
| bind address (keep loopback for tunnels) |
|
| initial workspace folder |
| – | fixed token (otherwise generated into |
|
|
|
|
| max file size (2 MB) |
|
| max tree entries returned |
| built-in list | comma-separated writable extensions |
Never committed (see .gitignore): .env, .token, config.json, .logs/, workspace/, node_modules/.
Troubleshooting
Symptom | Fix |
| use |
Port already in use | change |
UI keeps asking for a token | paste the value from |
AI writes but nothing appears | the AI writes to the workspace folder, not this repo — check the |
| add it to |
Tunnel URL stopped working | the SSH session ended; rerun |
| install the OpenSSH client |
Project layout / Struktur proyek
server.js HTTP: static UI + REST + MCP
mcp-stdio.js stdio transport entry point
mcp-core.js 11 MCP tools
lib/config.js env loader, token, OPEN_MODE, config.json
lib/fs-service.js filesystem core (sandbox, atomic writes, search)
public/index.html single-page editor
public/app.js editor logic (autosave, tree, modals)
public/styles.css theme
start.bat|.sh start the app
tunnel.bat|.sh start the localhost.run tunnel
docs/hero.png repository bannerLicense / Lisensi
MIT — see LICENSE.
Disclaimer
The banner image is fan art that includes third-party AI product names and logos for illustration only. This project is not affiliated with, endorsed by, or sponsored by OpenAI, Anthropic, Google, Microsoft, DeepSeek, Perplexity, or Meta.
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 server exposing your Node Command fleet (files, shell, processes, browser) to AI hosts.
Nifty's MCP server — exposes tasks, projects, messages, and files as tools for AI agents.
A real-time, multiplayer filesystem for agents and humans: shared files, live edits, history.
Safe folder access for ChatGPT and Claude: read, write and search files, risky tools opt-in.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceA lightweight, stdio-based MCP server enabling AI assistants to perform local file system operations like reading, writing, searching, and executing commands.5,198 npmMIT
- AlicenseNot gradedqualityCmaintenanceGives MCP-compatible AI clients a controlled bridge to local files, processes, search, and document utilities, including reading/writing and moving files, text block editing, directory listing, content search, starting and managing terminal processes, and PDF/Excel/DOCX/image handling. It serves these tools over MCP Streamable HTTP at a configurable endpoint, with optional Bearer-token authentication and read-only or restricted-directory modes for safer remote exposure.1MIT
- AlicenseAqualityBmaintenanceEnables MCP-capable AI clients to control a local computer over stdio with filesystem operations, ripgrep search, shell command execution, and persistent process sessions.14MIT
- AlicenseNot gradedqualityBmaintenanceEnables MCP-compatible AI assistants to list, inspect, read, search, and modify local files and directories within configured filesystem roots, with permission controls and optional read-only or deletion restrictions.MIT