Local Workspace MCP Manager

Local Workspace MCP Manager

Enables ChatGPT Web Developer Mode to securely read, search, list, and edit files inside user-approved local folders, and optionally run approved developer commands on the user's Windows machine.

Category
访问服务器

README

Local Workspace MCP Manager

A Windows desktop app that lets ChatGPT Web (Developer Mode) securely read, search, list, and edit files inside folders you explicitly approve — and optionally run approved developer commands. Built as a single-process Rust/Tauri application embedding an MCP server (Streamable HTTP on 127.0.0.1) that is published to ChatGPT through Tailscale Funnel.

There is exactly one MCP doorway to your filesystem: a fail-closed policy pipeline. Every MCP tool call goes through it. The desktop UI is a separate administrative control plane for workspace permissions, connection settings, and lifecycle; UI audit rows are operational history rather than the MCP pipeline's fail-closed response gate.

How the connection works

  • The MCP server binds loopback only (127.0.0.1:<ephemeral port>).
  • A bundled Tailscale Funnel sidecar publishes that loopback server to the public internet at https://<your-hostname>.ts.net (Funnel requires a one-time tailnet admin enablement: HTTPS certificates + the funnel node attribute).
  • The public URL embeds a secret capability token. Funnel is public ingress — the secret URL is what protects the endpoint, so treat it like a password: anyone who obtains it can call your MCP connection. Rotate it any time from Security → Rotate connection URL.

Tech stack

  • Shell: Tauri 2 (Rust) with a system tray (open, start/stop tunnel, pause MCP access, quit), close-to-tray, launch-at-login, start-minimized-to-tray, and single-instance enforcement
  • UI: React 18 + TypeScript (strict), styled with Tailwind CSS v4 and vendored shadcn/ui primitives (new-york/zinc, 2px-radius "Quiet Console" tokens); toasts via sonner; bundled Inter Variable / JetBrains Mono Variable fonts; Light/Dark/System theme persisted in settings
  • Core pipeline: crates/core — the fail-closed policy pipeline (pause → workspace → capability → confinement → sensitive-file deny list → execution) with an append-only SQLite audit log

Prerequisites

  • Windows 10/11
  • Rust toolchain with the MSVC target (rustup default stable-x86_64-pc-windows-msvc) and Visual Studio Build Tools (C++ workload)
  • Node.js (LTS) + npm
  • A Tailscale account (free tier works); a tailnet admin must enable Funnel once (HTTPS certificates under DNS settings + the funnel node attribute under Access controls)

Build & run

npm install

# Development (hot-reload UI):
npx tauri dev

# Release build (produces an NSIS installer):
npx tauri build

Artifacts land under src-tauri/target/release/ (executable) and src-tauri/target/release/bundle/nsis/ (installer).

Sidecar binaries

The Tailscale Funnel sidecar (Go, in sidecars/tailscale-funnel) is built by the packaging step (npm run build:sidecar → scripts/build-tailscale-sidecar.ps1) and is the only connection sidecar bundled as binaries/tailscale-funnel-sidecar. The retired OpenAI/Cloudflare tunnel runtime is no longer compiled or packaged; legacy settings parsing remains only for upgrade compatibility.

First-run setup

  1. Launch the app and complete the onboarding wizard: add at least one Workspace (Read starts on, Write/Execute off), then sign in to Tailscale when prompted.
  2. Press Start on the Dashboard. The app starts the local MCP server, spawns the Funnel sidecar, and walks you through any one-time tailnet approvals.
  3. When the card turns Online, copy the secret capability URL into ChatGPT (Developer Mode → create a connector of type MCP / remote endpoint) and keep it private.

Everyday behavior is configurable in Settings:

  • General: auto-start the tunnel when the app opens, start with Windows, start minimized to the tray, keep running in the tray when the window closes
  • Appearance: Light / Dark / System theme
  • Connection: the Funnel hostname label (changes require a Tailscale identity reset)

The system tray mirrors the essentials: open the window, start/stop the tunnel, pause/resume MCP access, quit.

MCP tool surface

Ten tools are exposed. list_workspaces returns approved workspace ids (redacted — never absolute paths; it is pause-gated and audited like every tool). The nine workspace-scoped tools are list_directory, find_files, search_text, read_file, read_files (≤8 per call), create_file (≤10 MB), apply_patch, run_command (approved basenames: git, cargo, rustc, npm, npx, node, pnpm, yarn, python, python3, pip, go, dotnet), and run_powershell (requires the workspace's Full PowerShell mode). Read tools return bounded results (read_file returns a ≤256 KB window with a truncation flag) and carry a revision (sha256) that apply_patch requires as base_revision.

Security model

  • Loopback-only binding: the MCP server listens strictly on 127.0.0.1 — never on all interfaces. The only external exposure is the sidecar's outbound HTTPS funnel.
  • Secret capability URL: the public endpoint embeds an unguessable capability token; there is no login flow on the endpoint. Rotate it from the Security page if it leaks.
  • Pause kill switch: one toggle (UI, tray) suspends all MCP tool calls (ACCESS_PAUSED), including list_workspaces; UI operations keep working. Pause wins even in unrestricted mode.
  • Fail-closed pipeline: every tool invocation passes one pipeline — pause check, workspace lookup, capability gates (READ_DISABLED/WRITE_DISABLED/EXECUTE_DISABLED), path confinement (canonicalized, component-wise containment; symlinks/junctions cannot escape), sensitive-file deny-list, execution policy — then writes exactly one audit row. Any pipeline failure short-circuits to a structured error, and an unrecordable audit row fails the call.
  • Sensitive-file deny-list: .env*, *.pem, *.key, id_rsa*, .git/config, credentials*, *.pfx, *.p12, secrets.*, and all of node_modules/** are blocked at any depth, for reads and writes alike. Overriding requires unrestricted mode (see below) or a code change.
  • Patch-first editing: edits are anchored string replacements (apply_patch), not whole-file writes; every edit carries a base_revision (SHA-256 of content as last seen) and fails with FILE_CHANGED_SINCE_READ if the file changed externally. New files are written atomically via temp-file + rename.
  • Append-only audit log: every MCP request writes exactly one audit row (allow / deny / error) before its response is sent; rows can never be updated or deleted. Rows produced in unrestricted mode are marked. The latest 100 events are visible in the UI.
  • Bounded execution: commands run without a shell (no quoting/parsing surface), inside a Windows Job Object (timeout kills the whole process tree), with sanitized environment, 60 s default / 10 min max timeout, and 512 KiB captured per output stream. PowerShell scripts travel through stdin only — never argv, audit detail, or diagnostics — and child console windows are never shown.
  • Unrestricted access (opt-in): a Security-page switch, gated behind a typed confirmation and a persistent red banner. It relaxes capability gates, the sensitive-file deny list, the approved-command allowlist, and the Full-PowerShell workspace gate — for every workspace. The folder boundary (paths still resolve inside registered workspaces), the pause kill switch, and audit recording remain in force. Leave it off unless you fully trust your conversations.
  • Secret handling: the capability token never appears in UI read-back paths, command lines, or diagnostics. Connection secrets live in a DPAPI-protected store under the current user's LocalAppData; settings.json holds only non-secret preferences.
  • Hardened webview: a non-null Content-Security-Policy (default-src 'self', IPC-restricted connect-src, inline styles allowed for Radix positioning); the opener plugin allowlists only login.tailscale.com, tailscale.com, and *.ts.net URLs.

Known limitations (honesty notes)

  • Working-directory confinement is not a Windows security sandbox: an executed program can still open paths outside the workspace with your account's permissions.
  • Funnel is public ingress; the endpoint's only protection is the secrecy of the capability URL. Rotate it if in doubt.
  • Real Tailscale-tailnet + ChatGPT connector acceptance remains environment-dependent and must still be run before calling a release production-certified; the automated local lifecycle/MCP suites do not substitute for that external check.

Error codes

Tool errors surface as structured results { code, message, detail? } with these stable codes:

Code Meaning
ACCESS_PAUSED kill switch engaged
WORKSPACE_NOT_FOUND unknown workspace_id
READ_DISABLED / WRITE_DISABLED capability off
EXECUTE_DISABLED / POWERSHELL_DISABLED execution off / workspace not in Full-PowerShell mode
COMMAND_NOT_ALLOWED program not on the approved list (or a path was given)
PATH_OUTSIDE_WORKSPACE confinement violation (audited with detail)
SENSITIVE_FILE_BLOCKED deny-list hit
FILE_NOT_FOUND target missing
FILE_EXISTS create collision
INVALID_PATCH anchor missing/ambiguous
FILE_CHANGED_SINCE_READ revision mismatch
RESULT_TOO_LARGE bounds exceeded without truncation possible
INVALID_ARGUMENT malformed client input (bad regex/glob, >8 read_files paths)
IO_ERROR filesystem failure (OS message included)

Development

npx tsc --noEmit        # frontend type gate
npm run build           # frontend production build
cargo test --workspace  # 240+ Rust unit + integration tests

The integration suites drive the real sidecar spawn/parse pipeline against a fake sidecar fixture — no Tailscale network needed.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选