How muwinds/local-tool-bridge works
Local Tool Bridge lets ChatGPT or another MCP client invoke tools on the user’s computer, with a desktop control panel for policies, approvals, and audit visibility. The main flow is client → authenticated MCP transport (optionally through the Secure MCP Tunnel) → dispatcher → policy and approval checks → filesystem or shell tools. Direct Remote MCP is a separate optional ingress with its own authentication choices. The graph reflects the README and sampled source; unsampled HTTP, WebSocket, and Direct MCP internals are represented only at the documented subsystem level.
Main entry points: dispatch.rs RPC Dispatcher · lib.rs Host Runtime · main.rs Control Panel · direct_mcp.rs Direct Remote MCP
Components 22
User Interface
- Control Panel
src/crates/gui/src/main.rs - Panel State
src/crates/gui/src/app.rs - Approval Dialog
src/crates/gui/src/approver.rs
Client Ingress
- Host Runtime
src/crates/host/src/lib.rs - Loopback MCP
src/crates/host/src/mcp.rs - Direct Remote MCP
src/crates/host/src/direct_mcp.rs - OAuth And PKCE
src/crates/host/src/oauth.rs - Secure MCP Tunnel
src/crates/host/src/tunnel.rs - HTTP / WebSocket
src/crates/host/src/http.rs - WebSocket Transport
src/crates/host/src/websocket.rs
Tool Execution
- RPC Dispatcher
src/crates/core/src/dispatch.rs - Tool Registry
src/crates/core/src/tools/mod.rs - Codex Tools
src/crates/core/src/tools/codex.rs - Filesystem Tools
src/crates/core/src/tools/fs.rs - Shell Tool
src/crates/core/src/tools/shell.rs
Policy And Audit
- Policy Engine
src/crates/core/src/policy/mod.rs - Path Sandbox
src/crates/core/src/policy/path.rs - Audit Log
src/crates/core/src/audit.rs
Other components
- Local User
- ChatGPT / MCP Client
- Local Filesystem
- System Shell
Connections 30
- Local User → Control Panel: configures
- Control Panel → Host Runtime: starts
- Control Panel → Panel State: renders
- Panel State → Approval Dialog: presents requests
- Approval Dialog → RPC Dispatcher: answers approval
- Host Runtime → Loopback MCP: starts
- Host Runtime → Direct Remote MCP: starts optional
- Host Runtime → HTTP / WebSocket: starts optional
- Host Runtime → WebSocket Transport: starts optional
- Host Runtime → RPC Dispatcher: builds
- Control Panel → Secure MCP Tunnel: starts optional
- Secure MCP Tunnel → Loopback MCP: forwards requests
- ChatGPT / MCP Client → Secure MCP Tunnel: calls tools
- ChatGPT / MCP Client → Loopback MCP: calls tools
- ChatGPT / MCP Client → Direct Remote MCP: calls tools
- Direct Remote MCP → OAuth And PKCE: uses optional auth
- Loopback MCP → RPC Dispatcher: dispatches RPC
- Direct Remote MCP → RPC Dispatcher: dispatches RPC
- HTTP / WebSocket → RPC Dispatcher: dispatches RPC
- WebSocket Transport → RPC Dispatcher: dispatches RPC
- RPC Dispatcher → Policy Engine: evaluates calls
- RPC Dispatcher → Tool Registry: looks up tools
- RPC Dispatcher → Audit Log: records calls
- Tool Registry → Codex Tools: registers
- Codex Tools → Filesystem Tools: delegates file calls
- Codex Tools → Shell Tool: delegates execution
- Filesystem Tools → Path Sandbox: resolves paths
- Policy Engine → Path Sandbox: checks confinement
- Filesystem Tools → Local Filesystem: reads and writes
- Shell Tool → System Shell: runs commands