local-code-agent
Click on "Install 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-code-agentread the main.py file in my workspace"
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-code-agent
A local MCP Server built on FastMCP: allows external AI (ChatGPT, Claude, etc.) to remotely control your local workspace via HTTP—file read/write/edit, search, shell commands, Git operations—with sandbox isolation, sensitive file protection, and audit logging.
This project contains no AI/LLM logic, only tool-layer services and security controls.
Requirements
Python 3.10+ (FastMCP hard requirement)
pip install -r requirements.txt(fastmcp, pyyaml)
Related MCP server: OpenAI Secure MCP Tunnel
Quick Start
Method 1: GUI (Recommended)
python start.pyConsole window steps:
Workspace folder: Click "Select…" to choose a folder. All AI operations are confined to this folder (sandbox); changing the folder switches the sandbox root.
Connection prompt: The middle of the window has a "Connection Prompt" card. Copy the text inside and send it to the web-based AI. The AI will then bind to this MCP server according to the configuration (no token required).
Port: Default 8000; change if occupied.
Read-only mode: When checked, all write/edit/command tools are rejected. Toggling takes effect immediately while running.
Click "Start Service" → the status bar shows version, read-only status, workspace, and uptime; the log area displays real-time service logs.
Stop: Click "Stop Service", or close the window directly (a confirmation prompt will appear first).
Method 2: Command Line
# 1. 安装依赖
pip install -r requirements.txt
# 2. 启动服务(默认监听 127.0.0.1:8000,MCP 路径 /mcp,无需 Token)
python server.pyOptional parameters: --workspace D:\projects\my-project (sandbox root), --host 0.0.0.0 (allow LAN access), --port 9000. Stop with Ctrl+C.
Verification and Health Check
After the service starts, visit: GET http://127.0.0.1:8000/health (no authentication). Returns:
{ "status": "ok", "service": "local-code-agent", "version": "0.1.0",
"workspace": "D:\\projects\\my-project", "readonly": false,
"uptime_seconds": 3 }Other endpoints (including /mcp) are directly accessible without authentication.
LAN Access
By default, it listens only on 127.0.0.1, so only the local machine can connect. For other devices on the same LAN:
python server.py --host 0.0.0.0Client connection address: http://<local LAN IP>:8000/mcp (use ipconfig to find the local IP). Exposing to the LAN means any device on the same subnet can access it without authentication—proceed with caution.
It is not recommended to expose directly to the public internet. If public access is needed, set up a reverse proxy solution (Nginx + TLS, frp, or other tunneling tools) and enforce HTTPS and authentication at the reverse proxy layer.
Graphical Interface (Optional)
You can use it without writing command lines. tkinter is part of the Python standard library, no extra installation needed.
python start.pyConsole features:
Workspace folder: Click "Select…" to open a folder picker. Only one folder can be selected at a time; all AI operations are confined to that folder (sandbox). Changing the folder replaces the current selection.
Connection prompt: Built-in editable prompt text. Click "Copy Prompt" to copy it in one click, then send it to the web-based AI to complete the MCP binding. No token required.
Port / Read-only mode: Set the listening port; check read-only to disable write/edit/command tools.
Start / Stop service: Start FastMCP within the GUI process (background thread + uvicorn) using a dedicated log handler. Stopping waits for the service thread to finish.
Switch while running: Changing the workspace or toggling read-only takes effect immediately without restarting. Port changes require a service restart.
Status bar: Polls
/health, displays version, read-only status, current workspace, and uptime.Log area: Displays real-time service output, automatically strips ANSI escape codes, right-click to copy, auto-truncates after 600 lines.
The GUI and command line share the same sandbox and audit mechanisms; the integration method is identical.
Client Integration
Local client: fill URL with http://127.0.0.1:8000/mcp; LAN client uses http://<local LAN IP>:8000/mcp (server must be started with --host 0.0.0.0). No authentication required.
Claude Desktop's claude_desktop_config.json:
{
"mcpServers": {
"local-code-agent": {
"url": "http://127.0.0.1:8000/mcp"
}
}
}Tool List
Tool | Parameters | Description |
| path, offset=0, limit=0 | limit 0 means all; offset is the starting line number to skip |
| path, content | Automatically creates parent directories; sensitive paths are rejected |
| path, old_text, new_text, dry_run=false | Exact text match must be unique |
| path=".", recursive=false | Returns structured entries; skips .git |
| pattern, path=".", file_pattern="*" | Returns |
| path | Returns structured size, mtime, type |
| path, lines=100 | Reads the tail of a file |
| pattern, path="." | Returns structured path array; rejects out-of-bounds patterns |
| source, destination | Does not overwrite existing target |
| source, destination | Copies files only, does not overwrite |
| path | Automatically creates parent directories |
| path | Deletes files only |
| path, url | Supports any HTTP(S) URL; disables redirects; 50MB limit |
| command, timeout=30 | Executes arbitrary commands within the workspace; SSE streaming output |
| — | Read-only |
| message |
|
Security Model
Sandbox: All paths are resolved via
realpathand must fall within the workspace root directory (intercepts symlink escapes).../and absolute paths cannot break out.Authentication: No token authentication. The service listens only on
127.0.0.1by default; if external access is needed, add authentication at the reverse proxy layer.Dangerous operation confirmation: Git commits require the request header
x-confirm: trueto execute.Sensitive files:
.env,.env.*,*.pem,*.key,id_rsa,.ssh/,.aws/,credentialsare blocked at any path level. Returns a uniform "access denied" without revealing whether the file exists.Downloads: Supports any HTTP(S) host; disables redirects; aborts and deletes partial files if over 50MB.
Audit log: JSON line format, rotated at 10MB × 5, records timestamp, tool name, sanitized parameters, result, and duration.
Read-only mode:
python server.py --readonlyor GUI checkbox. Write/command tools are still visible but returnread-only modewhen called. Can be toggled while running.
Configuration Priority
Workspace: --workspace > environment variable MCP_WORKSPACE > config.yaml (default .). All other configurations come from config.yaml (see default values in the file).
Project Structure
server.py # FastMCP 入口:配置、认证、/health
tool_registry.py # 工具注册(与生命周期分离)
config.py / config.yaml # 默认值 + YAML
sandbox.py # 路径沙盒 + 敏感文件过滤
audit.py # 轮转 JSON 审计日志
tools/file_ops.py # 读/写/编辑/列目录/搜索
tools/file_management.py # 删/改名/复制/建目录/stat/tail/glob
tools/download.py # HTTP(S) 下载(无域名白名单)
tools/command.py # 同步 run_command(测试/非流式)
tools/git_ops.py # status/diff/log/branch/commit
runtime.py # 运行时只读标志
gui/ # tkinter 控制台(进程内服务)
start.py # GUI 入口
tests/ # test_core.py + test_extra.pyKnown Limitations
Python 3.8 cannot run this service (fastmcp requires 3.10+); the logic modules are compatible with 3.8 and can be tested with
python tests/test_core.py.run_commanduses SSE streaming output with a total timeout of 3600 seconds.Only a single workspace is supported. Multi-workspace switching and session-level context are not yet implemented (YAGNI).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Zero-setup MCP gateway securely connecting AI to your tools with authentication and workflows
Connect AI assistants to your GitHub-hosted Obsidian vault to seamlessly access, search, and analy…
- QuallaaOAuthcom.quallaa
Talk to your public-facing AI from any MCP client — Claude, ChatGPT, Cursor, Cline, Windsurf.
Operate Linux, macOS and Windows from your LLM. Every action runs through an auditable allowlist.
Related MCP Servers
- FlicenseNot gradedqualityCmaintenanceEnables AI assistants to access files and terminal of a local computer via a public HTTPS endpoint, secured with GitHub OAuth.-
- AlicenseNot gradedqualityBmaintenanceEnables file operations and bash command execution on the local workspace, securely exposed to ChatGPT via OpenAI Tunnel.2MIT
- AlicenseNot gradedqualityCmaintenanceEnables remote MCP clients like ChatGPT to run shell commands and manage files on your local machine via a Cloudflare tunnel, exposing tools for file operations, search, and task management.1MIT
- FlicenseNot gradedqualityCmaintenanceEnables macOS users to securely connect AI assistants such as Notion AI, Claude, and Cursor to their local files and terminal through an MCP server protected by a Bearer token and Cloudflare Tunnel.-
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/jhonsmithsamsmith/webmcp-coder'
If you have feedback or need assistance with the MCP directory API, please join our Discord server