Local ChatGPT Plus
Uses Auth0 as an inbound OAuth 2.1 identity provider for ChatGPT connections, handling login, MFA, consent, token validation, and per-tool scope enforcement.
Provides Git-related tools for managing local repositories, including inspecting and editing code, reviewing changes, and supporting the explore → read → patch → verify → review workflow.
Connects ChatGPT to the local MCP server via OpenAI's Secure MCP Tunnel, enabling ChatGPT to use local coding, command, Git, and agent-workflow tools.
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 ChatGPT Plus
A self-hosted MCP server that lets ChatGPT inspect and edit local code, run tests and commands, manage Git, and use additional agent workflows on macOS.
The core coding workflow stays simple: explore → read → patch → verify → review. Advanced features remain available, including persistent tasks, coding loops, context capsules, edit transactions, rewind, LSP, PTY, subagents, upstream MCP, and browser/desktop computer use.
Requirements and quick start
macOS, Node.js 22.22.2+, npm; Git for Git-related tools.
An HTTPS tunnel if connecting a hosted ChatGPT client to the local server.
# From a checkout containing this macOS edition:
cd /path/to/local-chatgpt-plus
cp .env.example .env
node -e "console.log(require('crypto').randomBytes(24).toString('base64url'))"
# Copy the printed secret into MCP_TOKEN= in .env.
# Set WORKSPACE_PATH to an isolated workspace in .env.
# Configure explicit workspace permissions (the example is not an OS sandbox):
cp profiles/permissions.example.json profiles/permissions.json
# Set PERMISSIONS_CONFIG=profiles/permissions.json in .env.
npm ci
npm startThe local MCP server defaults to http://127.0.0.1:3000; check http://127.0.0.1:3000/health. The optional Admin UI uses http://127.0.0.1:3001/ui when enabled, and now requires a locally generated ADMIN_TOKEN. Browser access uses a same-site login/session cookie plus a CSRF token; authenticated local automation may use a Bearer header. The new-install defaults disable Admin and ChatGPT auto-approval. Enabling Admin also enables its settings and upstream OAuth callback endpoints. Never tunnel Admin. The terminal dashboard starts automatically in an interactive terminal; set LOCAL_CODER_TUI=off for normal logs.
Security: Set MCP_TOKEN before exposing port 3000 through a tunnel. The default workspace permission profile narrows direct path parameters, but shell commands still run with the user's OS privileges; WORKSPACE_PATH changes the default directory but is not a sandbox. Never tunnel the Admin port, and keep the tokenized MCP URL secret. See Security details.
Related MCP server: Moonlight MCP Plugin
Security model
For a freshly installed instance, inbound authentication is token mode unless you explicitly configure OAuth. The reference deployment demonstrates inbound OAuth 2.1 with Auth0 and a Secure MCP Tunnel. Authentication, transport, and local permissions are separate boundaries:
flowchart LR
H["Human operator"] -->|"Login / MFA / consent"| IDP["OAuth identity provider<br/>Auth0 or compatible OIDC"]
IDP -->|"Authorization code + PKCE token exchange"| CHAT["ChatGPT OAuth client"]
CHAT -->|"MCP requests + Bearer access token"| TUN["HTTPS tunnel<br/>outbound client on Mac"]
TUN -->|"Forward only MCP port"| MCP["Local MCP resource server<br/>JWT signature, issuer, audience, subject + scopes"]
MCP -->|"Per-tool authorization"| POLICY["Local permission profile<br/>filesystem / command guards"]
POLICY --> OS["macOS user account and processes"]
ADMIN["Local Admin UI (separate port)"] -.->|"Loopback only; never tunnel"| MCPThe OAuth provider is not the MCP server, and the tunnel is not the authorization system. In token mode the browser OAuth flow is absent and a nonempty random URL-path secret replaces Bearer JWT validation. In either mode, Admin authentication is a separate loopback-only boundary. Even with OAuth and scoped paths, executing arbitrary shell commands is not OS-sandboxed. For setup by another agent, follow Agent-assisted installation; for the publication checklist, see Release security gates.
Inbound OAuth (Auth0): The MCP resource server validates audience-bound access tokens (JWKS/
jose), enforces scopes per tool (fail closed), and requires a validmcp:connectbase scope for every operation. A token lacking a tool's required scope is refused with a clear error. The live deployment runsINBOUND_AUTH_MODE=oauthwith an Auth0 identity provider and a CIMD-registered ChatGPT client; the grant is scoped to the capabilities actually authorized. See the Inbound OAuth guide.Secure MCP Tunnel: Keeps port 3000 private and forwards requests from OpenAI's authorized tunnel endpoint to the Mac. The tunnel client authenticates with its own runtime API key, stored locally.
Runtime authorization: The deployment uses a workspace-scoped permission profile (
profiles/permissions.deploy.json) that binds file paths and shell cwds to the disposable workspace root. Opting into theopenprofile is much broader.Not an OS sandbox: Shell execution is application-level policy.
WORKSPACE_PATHand the workspace profile restrict declared paths and default cwds, but they do not stop a shell command from reading or sending data outside the root. Never tunnel the localhost Admin UI on port 3001.
Fallback — tokenized “No authentication” (the default for a fresh checkout):
With INBOUND_AUTH_MODE=token (or unset) the server gates /mcp/<MCP_TOKEN> by a
local static bearer secret; the tokenized route exists and OAuth metadata is not
served. This is the documented fallback when the OAuth provider is not configured.
MCP_TOKEN must always be set before exposing port 3000 through any tunnel; keep
the tokenized URL secret.
Connect ChatGPT
Currently deployed (recommended): OpenAI Secure MCP Tunnel + OAuth (Auth0).
The server runs INBOUND_AUTH_MODE=oauth; ChatGPT authenticates through Auth0,
consents to the scopes your CIMD client grant allows, and calls MCP tools with an
audience-bound access token. The workspace permission profile keeps paths/cwds
inside the disposable root. Full setup and cutover steps:
Tunnel options → OpenAI Secure MCP Tunnel and
the Inbound OAuth guide.
Start the server (
npm start) and runtunnel-client run --profile-file ~/lcp-tunnel.yaml.In ChatGPT Plugins → Add custom MCP server, enter the name/description, pick Connection: Tunnel, select the provisioned tunnel, and choose Authentication: OAuth.
Complete the Auth0 login, MFA, and consent — this binds the granted scopes (
mcp:connect,files:read,files:write,commands:execute, …) to the access token. The resource server enforces those scopes per tool.Install/enable the plugin.
@Local ChatGPT Plusin a chat before asking it to work on files. Reconnect or start a new chat after a server/tunnel restart, and reauthorize the connector when you change its granted scopes.
Fallback — tokenized “No authentication” (fresh-checkout default): with
INBOUND_AUTH_MODE=token, in the ChatGPT form choose No authentication (the
tunnel is the transport boundary; the local MCP_TOKEN still gates the server).
A public HTTPS endpoint is an alternative when a Secure MCP Tunnel is not
available: expose port 3000 with a trusted HTTPS tunnel (e.g. npm run tunnel
Cloudflare Quick Tunnel) and set the connector URL to
https://<your-tunnel-host>/mcp/<MCP_TOKEN>. An empty MCP_TOKEN causes startup to fail in token mode except for explicitly
marked, loopback-only automated test fixtures; there is no unauthenticated
production endpoint.
A successful connection exposes the native MCP tools chosen by CHATGPT_TOOL_PROFILE (slim by default, full for every native tool). Individual tools can also be enabled or disabled from Admin. The source of truth is src/lib/tool-profile.ts; the regression check is scripts/test-tool-profile.mjs.
Manual ON/OFF control and access modes (lcp)
The lcp controller turns the Local ChatGPT Plus server and the Secure MCP
Tunnel on/off together as per-user launchd jobs, independent of the terminal
or OMP that launched them. Install with:
scripts/lcp-install.sh # installs ~/.local/bin/lcp and writes per-user config
lcp on # start (default: Workspace mode)
lcp off # stop both services and disable auto-restart
lcp status # state, health, ownership, current access mode
lcp restart [--mode <m>] # controlled restart (preserves mode unless overridden)
lcp toggle # OFF→ON(Workspace) / ON→OFF; refuses PARTIAL; never Full
lcp mode <workspace|projects|full> # safe controlled switch
lcp migrate # take over legacy OMP/terminal-owned processesNothing auto-starts at login: the service definitions live in
~/.local/lcp/launchd/ (outside the auto-loaded LaunchAgents folders) and are
bootstrapped only by lcp on. While ON, launchd supervises and restarts a
job after an unexpected crash; lcp off fully unloads both jobs. See
docs/OPERATIONS.md#controller-lcp-lifecycle-consistency-2026-11-20.
Access modes
Mode | Command | Profile | Direct filesystem roots | Notes |
Workspace |
|
| Operator-selected disposable workspace | Writes+commands allowed, unsafe runtimes blocked |
Projects | fresh: |
| Operator-configured project directories | Direct tools restricted to selected folders; unsafe runtimes still blocked |
Full / YOLO |
|
| unrestricted (OS ACLs still apply) | Deliberate, interactive-confirmation opt-in; unsafe runtimes enabled |
lcp on starts in Workspace when the server is OFF. If the server is already
ON, an ordinary lcp on (or --mode <m>) that requests a mode different from
the actual running profile refuses (nonzero exit) rather than silently
relabelling it — the stored mode can no longer disagree with the runtime profile.
Use lcp mode <workspace|projects|full> to switch, and lcp status to see the
stored vs actual runtime mode and whether they agree. lcp off fails closed:
it only succeeds after both launchd jobs are unloaded and ports 3000/3001/8090
have stopped listening, reporting ERROR — OFF incomplete and the remaining
listener/job otherwise. Only --mode full enables Full/YOLO, and only after
explicit interactive confirmation (LCP_FULL_CONFIRM=1 for scripted use).
Authentication (Auth0), OAuth scope checks, and tunnel isolation stay enabled in
every mode. These profiles are application-level policy, not an OS sandbox —
a permitted shell command can read/send data outside the configured roots.
macOS Shortcut import files for ON/OFF/Toggle/Status/Projects are generated by
scripts/gen-shortcuts.sh into shortcuts/ (import by double-clicking each
.shortcut and choosing Add Shortcut). The Projects Shortcut calls
lcp mode projects so it switches from an already-ON deployment. Full/YOLO
deliberately has no shortcut: it requires the interactive YES
confirmation, so it stays Terminal-only.
Capabilities
Area | Examples |
Explore and edit |
|
Run and verify |
|
Repository workflows |
|
Recover work |
|
Extend the agent | Skills, LSP, subagents, upstream MCP servers, browser/desktop MCP integrations |
Observe and configure | Interactive TUI, localhost Admin UI, audit and recovery diagnostics |
These features are intentionally retained even when they are not used during every coding session. Consult the detailed operations guide for configuration, safety controls, permissions, recovery behavior, and the full tool reference.
Configuration
Copy .env.example to .env and adjust only the settings you need. Common options:
Variable | Purpose |
| Default working directory (not a permission boundary) |
| Secret included in the MCP connector URL |
|
|
| Enable/disable the localhost Admin UI |
|
|
| Configure application-level filesystem/command restrictions |
| Configure external MCP servers |
More environment variables and advanced workflows are documented in the configuration reference.
Dashboard (Admin UI) usage
The Admin UI is localhost-only (http://127.0.0.1:3001/ui by default); it stops
being reachable when the server is OFF. To watch live agent activity:
Turn Local ChatGPT Plus on (
lcp on). From an interactive terminallcp onopens the Admin dashboard automatically once the Admin UI is ready (disable withLCP_OPEN_DASHBOARD=0; headless/daemon/lcp restart|mode|togglenever auto-open, so nothing steals focus).Open
http://127.0.0.1:3001/ui.Open the Activity tab and keep Live enabled.
Make a tool call from ChatGPT — it appears in the feed with a friendly description, status, duration, and sanitized expandable details, and any currently-running call appears under Running now.
The Overview tab's Recent tool calls rows are keyboard-accessible disclosure buttons (and whole-row clickable) that expand to sanitized technical details (start/end timestamps in Europe/Berlin with CET/CEST — missing/invalid times show "Time unavailable" — duration, result size, session, project, workspace, error). Open/closed state survives the 5s auto-refresh.
Use the kind/status/search filters; Clear view clears only the local view without deleting durable audit records.
The Missions tab shows the persistent agent-task registry as a task-first board (goal, project, source, status, current step, last activity, blocked/"needs attention") and offers Copy handoff instructions for a human-initiated ChatGPT-to-ChatGPT handoff that shares the same mission id through this MCP plugin.
Activity, audit, and telemetry fields are sanitized server-side: sensitive values (tokens, API keys, passwords, cookie/credential/env values and raw payloads) are redacted or dropped before they reach the API response, the SSE stream, or the durable audit file.
Task status versus live execution
Saved agent_task plans are not autonomous workers. agent_task get/list/resume and the Admin Missions board show an independent execution.state, last linked worker outcome, recovery guidance, and warnings when Git commits are newer than recorded plan progress. Use task_id when launching task-associated subagent or start_process workers. Unambiguous model-agent launches may inherit a task ID across Git worktrees; ambiguity is never guessed. verify_project(task_id=...) saves a verification receipt but does not automatically finish plan steps. Stalled workers require explicit inspection/resumption; LCP never silently replays them.
Development and verification
npm run build
npm test
npm run test:smoke # read-only fail-closed security pre-flight (fast)
npm run test:integration
npm run test:allThe smoke check (npm run test:smoke) asserts that Auth0 token-vs-oauth config
validation, Admin loopback isolation, permission-profile fail-closed, path/
symlink escapes, upstream allowlist, and headless-approval denial all fail
closed, plus a native PTY / language-server smoke when the dependency is
installed. It uses only disposable dirs and never touches live state.
The snapshot is not a live macOS/tunnel/Auth0/GUI test. The local suite
(including test:smoke) proves the code's fail-closed behavior in isolation; a
real Auth0 consent, a live Secure MCP Tunnel reconnect, and an interactive macOS
approval dialog can only be exercised on an actual Mac in an authorized
maintenance window. See
Verification: local smoke vs live maintenance-window validation
and MAINTENANCE_BACKLOG.md for maintainability and
security follow-ups. Do not mark P0.5/P0.6 complete on isolated evidence alone.
Troubleshooting
Problem | First check |
Connection fails or returns 404 | Server and HTTPS tunnel running; connector URL includes |
ChatGPT cannot see tools | Enable/tag the connector; refresh after a server update |
Permission denied | OS permissions and the Local ChatGPT Plus permission profile |
Admin UI unavailable | Check |
Build or test fails | Use the exact error, check Node version and installed dependencies; do not delete |
See extended troubleshooting for long-running sessions, errors, and recoverable state.
Documentation and attribution
AGENTS.md — detailed coding-agent operating instructions and safe workflows
Operations guide — advanced features, Admin UI, TUI, tunnel setup, configuration, and troubleshooting
Security policy — vulnerability reporting, scope and safeguards
Maintenance backlog — validation, vulnerability audit, and evidence-based optimization tasks
Agent-assisted installation — reusable agent prompt, safe defaults, and manual authentication/tunnel steps
Release security gates — threat model, required checks, unresolved risks, and publication checklist
Provenance and security audit — inherited-code, licensing, asset, and secret-review findings
Inbound OAuth implementation spec — the OAuth 2.1 end-user authentication and per-tool authorization specification
Inbound OAuth guide — implemented resource-server auth, mode switch, configuration, provider options, and ChatGPT cutover
This independent project derives from MIT-licensed ChatGPT Local Coder by hoangcoderr. The original copyright and permission notice remain in LICENSE.
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
Use your Mac, Windows or Linux computer from ChatGPT, Claude or Codex: files, commands, documents.
Mac & Windows: let ChatGPT, Claude & Cursor use your email, calendar, iMessage, Teams, files.
Use your own Windows, Mac or Linux computer from ChatGPT, Claude, Cursor or Gemini CLI: run commands, read, write and search files, run long processes. Your computer only makes an outgoing connection (no open ports or VPN). Read-only mode, allowed folders, blocked commands and an action log keep you in control. Free plan available.
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
Related MCP Servers
- AlicenseBqualityCmaintenanceEnables ChatGPT to work directly on local projects by reading files, editing code, running tests and commands, inspecting Git state, and managing durable workflows, with optional delegation to local Codex agents for complex tasks.28MIT
- AlicenseNot gradedqualityCmaintenanceEnables ChatGPT web, desktop, and computer use to access and automate a Mac via 228 MCP tools, including local files, Git, processes, macOS native automation, browser control, and durable goal continuation.MIT
- AlicenseNot gradedqualityCmaintenanceTurns ChatGPT web into a local coding agent, enabling file edits, shell commands, Git operations, patches, and process management through 40+ MCP tools.MIT
- AlicenseNot gradedqualityBmaintenanceEnables ChatGPT in Chat mode to read and write local files, view the screen, and control the macOS desktop, with target locking and local permission controls.2MIT