local-mcp
Provides safe Git status, diff, and log operations on local repositories, with protections against external diff/textconv/fsmonitor.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@local-mcpcheck the git status and diff of my current project"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
local-mcp
A secure local developer runtime and Model Context Protocol (MCP) server for AI-assisted coding on macOS and other Unix-like development environments.
local-mcp gives AI clients structured access to local projects without exposing an unrestricted shell. It combines project trust, filesystem confinement, safe Git reads, controlled task execution, Developer Runtime state, workspace snapshots, and stdio/HTTP MCP transports.
Status
This project is currently in early development (0.1.0). The security model is intentionally conservative and may evolve before a stable release.
Related MCP server: Softority MCP Server
Features
Project registration, discovery, trust and permission management
Safe filesystem browsing, search, reading, writing and exact text replacement
Protected path rules for
.git,.env, private keys,.devmcp.yamland other sensitive filesSafe Git status, diff and log operations with external diff/textconv/fsmonitor protections
Restricted task execution using structured
program + argsinstead of shell command stringsProject-root anchored executable allowlists
Test, typecheck and lint execution
Package script discovery and controlled execution
Symbol definition/reference lookup
Developer Runtime process management with
dev_start,dev_logs,dev_stopanddev_listWorkspace snapshots, restore previews and controlled restore
Security scanning for risky project configuration and suspicious code patterns
MCP over stdio and HTTP
Loopback Host/Origin/Referer/Fetch-Metadata checks for local HTTP mode
Request body, rate-limit, process-output and runtime resource limits
๐ก Killer Feature: Seamless ChatGPT Web Integration (Unlimited Coding Without 5-Hour Caps)
When using ChatGPT Web for deep coding assistance, developers commonly face two bottlenecks:
Usage limits: Cloud-based Advanced Data Analysis (Code Interpreter) burns through strict 5-hour rate limits, causing popup lockouts that disrupt workflow.
Environment isolation: Cloud sandboxes cannot directly read, write, or run tests on your local machine, forcing frustrating manual copy-pasting.
How Does local-mcp Enable Unlimited Coding?
local-mcp connects ChatGPT Web to your local projects using a "Cloud Reasoning Brain + Local Execution Engine" architecture:
flowchart TD
subgraph Cloud["โ๏ธ Cloud Brain (OpenAI Cloud)"]
User(["๐ค Developer"]):::userNode -->|"Prompt / Coding Task"| WebUI["๐ป ChatGPT Web<br/><b>Standard chat stream ยท Zero cloud sandbox quota consumed</b>"]:::cloudNode
WebUI -->|"Intent parsing & Standard MCP tool calls"| Tunnel["๐ Secure HTTPS Tunnel<br/><b>Cloudflare Tunnel / ngrok / Proxy</b>"]:::tunnelNode
end
subgraph Local["๐ฅ๏ธ Local Execution Engine (Your Machine)"]
Tunnel -->|"Remote MCP (HTTP / SSE)"| Server["โก Local shmcp-http Server<br/><b>Bearer Token Auth + 16MB Streaming Fuse</b>"]:::serverNode
Server -->|"Code Introspection"| TaskRead["๐ Workspace search & AST symbol navigation"]:::localAction
Server -->|"Precision Modification"| TaskWrite["๐ Safe filesystem write & exact patch"]:::localAction
Server -->|"Local Build & Verification"| TaskTest["๐งช Run pnpm test / typecheck / lint"]:::localAction
Server -->|"Process Lifecycle"| TaskDev["๐ Supervise Dev Server & live logs"]:::localAction
TaskRead --> Sandbox["๐ก๏ธ Multi-Layer Security Guard<br/><b>Path traversal defense ยท Credential shield ยท Read-only for untrusted</b>"]:::sandboxNode
TaskWrite --> Sandbox
TaskTest --> Sandbox
TaskDev --> Sandbox
Sandbox -->|"Real execution stdout & error stack traces"| Server
end
Server -->|"Stream JSON-RPC results"| WebUI
WebUI -->|"Autonomous closed-loop self-correction"| User
classDef cloudNode fill:#e8f4fd,stroke:#10a37f,stroke-width:2px,color:#111;
classDef tunnelNode fill:#fff8e1,stroke:#ffa000,stroke-width:2px,color:#111;
classDef serverNode fill:#f3e5f5,stroke:#8e24aa,stroke-width:2px,color:#111;
classDef localAction fill:#e8f5e9,stroke:#388e3c,stroke-width:1.5px,color:#111;
classDef sandboxNode fill:#ffebee,stroke:#d32f2f,stroke-width:2px,stroke-dasharray: 4 4,color:#111;
classDef userNode fill:#f5f5f5,stroke:#616161,stroke-width:2px,color:#111;Zero Cloud Sandbox Consumption: All file indexing, precise syntax patching, type checking, test runs, and dev server supervision occur directly on your local computer. It does not consume OpenAI's cloud container resources.
Continuous All-Day Workflow: To ChatGPT Web, this operates through standard text/tool conversation streams, completely bypassing the strict 5-hour code execution limits so you can refactor, write features, and debug without interruption.
Instant WYSIWYG Feedback: ChatGPT modifies code locally and runs test suites immediately, inspecting error stack traces and self-correcting autonomously without manual intervention.
Security model
The project is designed around four layers:
Global policy
โ
Project trust and project policy
โ
Developer Runtime
โ
Filesystem / Git / process / MCP toolsProject trust
Newly registered and auto-discovered projects are untrusted by default.
An untrusted project is treated as read-only:
filesystem reads may be allowed by policy
writes and deletes are disabled
shell/task execution is disabled
workspace restore is disabled
repository-provided
AGENTS.mdcontent is not automatically injected into project context
Trust must be granted locally through the CLI:
shcli project trust <name>Trust can be revoked with:
shcli project untrust <name>Restricted execution is not a sandbox
Restricted mode limits executable resolution, arguments, environment variables and project-local executables. It does not provide operating-system sandboxing.
Package managers and build tools can execute project code. Task execution therefore still requires an explicitly trusted project.
Protected files
Default protected patterns include:
.git
.git/**
.vscode/**
.idea/**
.env
.env.*
*.pem
*.key
*.p12
*.pfx
id_rsa
id_ed25519
.devmcp.yamlProtected files cannot be read or modified through normal filesystem MCP tools.
Requirements
Node.js
>= 22.12.0pnpm
macOS or another Unix-like development environment is the primary target
Optional tools such as Git, ripgrep, Go, Swift, Flutter or Gradle are required only for the related project features.
Development
Install dependencies:
pnpm install --frozen-lockfileRun the checks:
pnpm test
pnpm typecheck
pnpm buildClean generated output:
pnpm cleanCLI & MCP Server
The management CLI is:
shcliUseful management commands include:
shcli project add <path>
shcli project list
shcli project trust <name>
shcli project untrust <name>
shcli doctor
shcli configThe standalone stdio MCP server executable remains:
shmcpMCP stdio server
Connect AI clients (Claude Desktop, Cursor, etc.) directly using:
shmcpFor local development:
pnpm dev:mcpInstallation via Smithery (One-Click)
To install for Claude Desktop or Cursor automatically via Smithery:
npx -y @smithery/cli install @shworks/local-mcp --client claudeMCP HTTP server
The HTTP executable is:
shmcp-httpDefault configuration:
Host: 127.0.0.1
Port: 8787Supported environment variables:
MCP_HOST
MCP_PORT
MCP_AUTH_TOKEN
MCP_ALLOW_INSECURE_HTTP
MCP_MAX_BODY_BYTES
MCP_ALLOWED_HOSTSMCP_ALLOWED_HOSTS is only for trusted HTTP Host values (for example, a reverse-proxy hostname). Authenticated MCP requests do not depend on browser Origin / Referer headers. Browser-source checks are enforced only for unauthenticated loopback mode.
Example:
MCP_AUTH_TOKEN="replace-with-a-strong-token" \
MCP_HOST="127.0.0.1" \
MCP_PORT="8787" \
shmcp-httpNon-loopback HTTP requires authentication. Plain HTTP on a non-loopback address is rejected by default and must be explicitly enabled with:
MCP_ALLOW_INSECURE_HTTP=1For remote access, prefer an HTTPS reverse proxy instead of exposing plaintext HTTP.
Connecting with ChatGPT Web (3 Steps to Unlimited Coding)
Connecting your local workspace to ChatGPT Web takes only three simple steps:
Step 1: Start shmcp-http with a Secure Auth Token
MCP_AUTH_TOKEN="set-your-strong-random-token" \
MCP_HOST="127.0.0.1" \
MCP_PORT="8787" \
shmcp-httpStep 2: Expose via Secure HTTPS Tunnel (Cloudflare Tunnel or ngrok)
Since ChatGPT Web runs in the cloud, expose your local port via a secure tunnel:
# Using Cloudflare Tunnel (cloudflared):
cloudflared tunnel --url http://127.0.0.1:8787
# Or using ngrok:
ngrok http 8787You will receive a public HTTPS URL such as https://your-tunnel.trycloudflare.com.
Step 3: Create a Dedicated Assistant via GPTs Editor (Official Method for Plus / Team)
๐ก Important Note: In ChatGPT Plus Web, global MCP tools cannot be attached directly in generic chat windows. The official, stable way supported by OpenAI is creating a dedicated assistant via My GPTs:
Open the official GPT Editor in your browser: https://chatgpt.com/gpts/editor.
Switch to the Configure tab:
Name: Enter
Local Dev Assistant(or your preferred name).Instructions: Add a concise prompt, e.g.:
"You are an expert full-stack local coding assistant. Always use the connected local MCP tools to inspect code, edit files, and execute tests before answering."
Scroll down to the bottom, find Actions, and click Create new action:
Authentication: Select API Key, Auth Type Bearer, and enter the
MCP_AUTH_TOKENfrom Step 1.Schema: Click Import from URL and enter
https://your-tunnel.trycloudflare.com/openapi.json(ChatGPT will automatically import the OpenAPI 3.1.0 schema).
In the top-right corner, click Create / Update and choose Only me to save.
Start Unlimited Pairing:
In the ChatGPT Web sidebar, click on your newly created custom GPT at any time.
Pair-program naturally in the browser chat:
"Inspect our project README, find uncovered edge cases in packages/core, apply fixes, and run pnpm test to verify!"
All reasoning flows through standard chat, while code execution and test verification run on your local machine without burning through strict 5-hour Code Interpreter quotas!
Project configuration
Projects may define .devmcp.yaml for controlled tasks and project-specific restrictions.
Example:
permissions:
read: true
write: true
delete: false
shell: restricted
commands:
test:
program: pnpm
args: ["test"]
cwd: "."
timeoutMs: 120000
typecheck:
program: pnpm
args: ["typecheck"]
cwd: "."
timeoutMs: 120000
build:
program: pnpm
args: ["build"]
cwd: "."
timeoutMs: 180000A project configuration can restrict the global policy further, but cannot elevate permissions beyond the global policy.
.devmcp.yaml itself is protected and symbolic links are rejected.
Developer Runtime
Stateful tools use a Developer Runtime to keep bounded local state such as:
recent test results
managed development processes
workspace snapshots
Runtime resources are bounded and can be reset without changing project files outside the controlled restore mechanism.
Representative tools include:
test_run
test_failures
typecheck
lint
symbol_definition
symbol_references
dev_start
dev_list
dev_logs
dev_stop
package_scripts
package_run_script
workspace_snapshot
workspace_snapshot_list
workspace_restore_preview
workspace_restore
security_scan
runtime_status
runtime_capabilities
runtime_resetInstallation & Release Gate
Currently, build the project from source or link globally using pnpm.
Before creating a release, the intended release gate is:
pnpm install --frozen-lockfile
pnpm test
pnpm typecheck
pnpm buildA release should use an immutable Git tag and source archive with a verified SHA-256 checksum.
Reporting security issues
Please avoid publishing exploitable security issues in a public issue before a fix is available. If a private security reporting channel is configured for the repository, use that channel first.
Discovery & Machine Introspection
The HTTP server provides standard machine-readable discovery endpoints so AI clients, reverse proxies, and developer portals can discover server capabilities automatically:
Endpoint | Method | Purpose | Authentication |
|
| Service landing status and endpoint directory | Public |
|
| Health check probe | Public |
|
| OpenAPI 3.1.0 specification (for ChatGPT Custom Actions 1-click import) | Public |
|
| RFC-style well-known OpenAPI specification endpoint | Public |
|
| MCP protocol metadata and transport configuration | Public |
|
| JSON-RPC 2.0 protocol endpoint | Bearer Token |
GitHub Topics for Discovery
When hosting on GitHub, add these repository topics to ensure automated crawlers (Smithery, PulseMCP, Glama) index your server:
mcp, mcp-server, model-context-protocol, chatgpt-actions, claude-desktop, cursor, developer-tools
License
Licensed under the Apache License, Version 2.0. See LICENSE.
This server cannot be deployed
Maintenance
Related MCP Connectors
Develop, manage, and debug Railway projects, services, and deployments from within agents.
Git-backed platform for skills, tools, and context for AI agents
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Shared control plane for AI coding agents โ tasks, memory, decisions, file locks. 12 tools.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceSecure local development platform that exposes controlled developer capabilities (FS, Git, search, command execution) to AI assistants via MCP with deny-by-default security and audit logging.-
- AlicenseNot gradedqualityAmaintenanceProvides AI clients with safe, structured access to local filesystem, Git repositories, and project contexts, featuring file operations, git status/diff, project management, and built-in code review/bug analysis prompts.681 npmMIT
- FlicenseNot gradedqualityAmaintenanceEnables AI agents to develop within a local project workspace by reading and modifying files, running commands and tests, checking Git state, and persisting progress as history sessions that can be restored in later conversations.-
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to turn local projects into persistent workspaces, providing file editing, command execution, Git integration, and cross-session history management.-