Skip to main content
Glama
WebCoding Harness
by mabyes1

WebCoding Harness

Let the ChatGPT, Gemini and Claude web apps work on your own computer. They can read and edit your code, run commands, look at git history and drive your browser. You can see every step they take, and anything that cannot be undone waits for you.

繁體中文說明

WebCoding Harness is an MCP server that runs on your machine. You add it to the chat app as a custom connector. The assistant then gets tools for your project folders: it reads files, searches, applies patches, runs tests, checks git, and clicks through pages in your own Chrome or Edge.

  • Your machine, your folders. The assistant reaches only the workspaces you name. Commands run as your own Windows or Unix account.

  • You see everything. A local status page, also shown in the browser's side panel, lists every call as it happens: which assistant made it, why, and how it ended.

  • You keep the keys. In the default mode, commands that cannot be undone (deleting a folder tree, force-pushing, formatting a disk) wait for your Yes. Administrator commands are off unless you approve them with a code from your authenticator app, for at most 30 minutes.

  • Nothing in between. I run no accounts, cloud service or telemetry. You expose the server through your own tunnel, and the chat app talks to it directly.

Status: early. I use it every day on Windows 11 with the ChatGPT and Gemini web apps. The tray icon, the approval dialog and Admin YOLO are Windows features.

Contents

Related MCP server: ChatGPT Local Coder

How it fits together

 ChatGPT / Gemini / Claude          (their servers call yours)
            │  HTTPS, you log in once with your password
            ▼
 your tunnel: Tailscale Funnel or Cloudflare Tunnel
            │
            ▼
 WebCoding Harness on your computer        127.0.0.1:8790/mcp
   ├── files, search, patches, git, commands   (only inside your workspaces)
   ├── status page                         127.0.0.1:8791   ◄── side panel in Chrome
   └── browser_use  ──────────────────►  extension in your Chrome or Edge

The chat apps run in their companies' data centers, so they cannot reach localhost. A tunnel gives your computer a public HTTPS address without opening your router. The tunnel is yours, on your own free Tailscale or Cloudflare account. Nothing goes through a server of mine.

Requirements

  • Node.js 22.18 or newer (developed on 24). TypeScript runs directly, with no build step.

  • git, for the git tools.

  • Windows 10 or 11 for the tray icon, the approval dialog and Admin YOLO. They are compiled with the C# compiler that ships with Windows, so no SDK is needed.

  • Chrome or Edge, only if you want the side panel or browser_use.

  • A tunnel, only for the web chat apps: a free Tailscale account (Funnel), or Cloudflare with a domain of your own.

Install

1. Get the code

git clone https://github.com/mabyes1/webcoding-harness.git
cd webcoding-harness
npm install

2. Try it on this computer

npm start -- --workspace C:\src\my-project

Open the status page at http://127.0.0.1:8791/. The MCP endpoint is http://127.0.0.1:8790/mcp. Started like this there is no login, so the server answers only requests addressed to localhost.

Local MCP clients that start their servers themselves (Claude Code, Codex, Claude Desktop and similar) can use it over stdin/stdout instead:

{
  "mcpServers": {
    "webcoding": {
      "command": "node",
      "args": ["C:/path/to/webcoding-harness/src/main.ts", "--stdio", "--workspace", "C:/src/my-project"]
    }
  }
}

That serves only that one client, with no status page and no login.

3. Make it reachable for web chats

a. Choose a login password of at least 12 characters and save it in your data folder, so that it never appears on a command line:

New-Item -ItemType Directory -Force "$env:USERPROFILE\.webcoding-harness" | Out-Null
notepad "$env:USERPROFILE\.webcoding-harness\oauth-password.txt"

On Linux or macOS, the file is ~/.webcoding-harness/oauth-password.txt. You can also set the WEBCODING_OAUTH_PASSWORD environment variable instead.

b. Start a tunnel to port 8790 and note its HTTPS address. Pick one:

Address

How

Tailscale Funnel (no domain needed)

https://<machine>.<tailnet>.ts.net

Install Tailscale and sign in, then run tailscale funnel --bg 8790. The first time, it asks you to enable HTTPS and Funnel for your tailnet. The --bg setting survives restarts. The very first request can take about 40 seconds while the certificate is issued.

Cloudflare Tunnel (your own domain)

https://mcp.example.com

cloudflared tunnel login, cloudflared tunnel create webcoding, cloudflared tunnel route dns webcoding mcp.example.com, then cloudflared tunnel run --url http://localhost:8790 webcoding. Install it as a service to keep it running.

Quick try

https://<random>.trycloudflare.com

cloudflared tunnel --url http://localhost:8790. The address changes every time, and so would your connector.

c. Start the server with that address:

npm start -- --workspace C:\src\my-project --public-url https://mcp.example.com

The server refuses to start with a public address but no password. It also refuses requests that arrive under any other host name. Check that the tunnel reaches it: https://mcp.example.com/healthz should answer {"status":"ok",…}.

4. Add it to your chat app

Use the address with /mcp at the end, for example https://mcp.example.com/mcp. The app sends you to this server's login page; type your password once. From then on the app keeps a token. Each app gets its own token and remembers its own working folder.

Menus move often. These were current in December 2026:

  • ChatGPT: turn on Developer mode (Settings → Apps → Advanced settings), then create an app or connector with the URL and OAuth. On some accounts this lives under Plugins → Add → Create MCP App. In Business and Enterprise workspaces, an admin must allow custom MCP connectors first. (OpenAI help)

  • Gemini: Settings → Connected Apps → Custom apps, then add the URL. Custom apps need Keep Activity turned on. In a chat, type @ to pick the app. (Google help)

  • Claude: Customize → Connectors → Add custom connector (Team and Enterprise plans: Organization settings → Connectors). Do not add a port to the URL. (Anthropic help)

Then ask the assistant something like "Use WebCoding to show me what's in my project and run the tests." When it connects, the server tells it how to use the tools. The server also passes on your workspace's AGENTS.md / CLAUDE.md.

5. Windows: start at sign-in, with a tray icon

Once it works, let Windows start it for you:

.\scripts\windows\install-autostart.ps1 -Workspace 'C:\src\my-project' -PublicUrl 'https://mcp.example.com'

This builds a small tray program and registers a scheduled task that starts it when you sign in. The task runs as you, in your desktop session, without administrator rights. The tray program runs the server without a console window and restarts it if it stops.

The icon shows the server's state:

Icon

Meaning

Green

Answering

Amber

Starting, or not answering

Red

Gave up after five stops in ten minutes

Grey

You stopped it

  • Click the icon to open the status page.

  • Right-click it to:

    • switch between Trusted and YOLO mode (until the next restart);

    • open Admin YOLO;

    • stop, start or restart the server;

    • open the data folder or the server log.

The tunnel is not part of this. Keep Tailscale or cloudflared running as you set it up in step 3.

More options:

  • Several workspaces: -Workspace 'app=C:\src\app','docs=C:\src\docs'.

  • Other settings: -Mode yolo, -Port 8790.

  • To apply new arguments or a code update, run the script again; it replaces the running server.

  • If PowerShell refuses to run scripts, allow local scripts once with Set-ExecutionPolicy -Scope CurrentUser RemoteSigned.

6. Browser extension: side panel and browser_use

The extension/ folder is a Chrome extension; Edge works too. It does two things:

  • It shows the status page in the browser's side panel, next to your chat. On a ChatGPT, Gemini or Claude tab, the panel shows only that assistant's calls.

  • It lets the assistants work in your browser through the browser_use tool.

To install it:

  1. Open chrome://extensions and turn on Developer mode.

  2. Choose Load unpacked and pick the extension folder.

  3. Pin it, then click its toolbar button to open the side panel.

The first time, it asks to be paired. The status page shows the request with a four-digit code, and the side panel shows the same code. Nothing happens until you press Allow. You can remove a pairing later in the status page's connection details.

How browser_use behaves:

  • Its own tabs. Each assistant works in background tabs that it opens, grouped as WebCoding · ChatGPT (or Gemini, Claude), so your own tab stays in front. It works in a tab of yours only after it claims that tab, which it is told to do only when you asked. It can give your tab back, but never close it.

  • Pages as text. Pages come back as compact text with numbered elements, for example [12] button "Save" or [3] textbox "Email" = "a@b.c". The assistant acts on those numbers. It takes screenshots only when asked.

  • Real input. Clicks and keys go through the browser's debugger, so pages receive them as real input. While it is attached, Chrome shows a bar saying the extension is debugging the browser. Press Cancel on that bar to take your tabs back.

  • Never passwords. Password fields are never typed into.

7. Optional: Admin YOLO (Windows)

Admin YOLO lets an assistant run commands as administrator, for at most 30 minutes at a time, after you approve. Install it once from an administrator PowerShell:

.\scripts\windows\install-admin-yolo.ps1

It shows a QR code. Scan it with an authenticator app such as Google Authenticator or Microsoft Authenticator. The QR code is drawn by the elevated installer and is never saved anywhere your account (or an assistant) could read it.

How it works:

  • Asking. When an assistant needs it, it calls admin_mode with its reason. A small window opens in the corner of your screen, and a card appears on the status page. You type the current code from your authenticator app there, or refuse.

  • The code stays with you. The code goes straight to a helper that runs as SYSTEM; it never passes through the assistant or the chat service. You can also open Admin YOLO yourself from the tray menu, which asks through UAC.

  • While open, exec_admin_command runs PowerShell as SYSTEM. The status page shows when it closes, with a button to close it now.

  • Closing. It closes after the time asked for (30 minutes at most), when you close it, and every time the server starts.

  • Wrong codes. Each code works once. Five wrong codes lock it for 15 minutes, and the lock doubles each time.

  • Audit log. Everything it runs is listed in C:\ProgramData\WebCodingHarness\Admin\public\audit.log.

Your normal account can start the helper's scheduled task but cannot change it, and cannot read the secret. Other options:

  • -ShowQr shows the QR code again.

  • -NewSecret replaces the key.

  • -Uninstall removes Admin YOLO.

Tools

Tool

What it does

server_info

Version, workspaces, mode, the caller's working folder, and the workspace's AGENTS.md / CLAUDE.md

get_default_cwd / set_default_cwd

Where relative paths start; enter a folder or switch workspace

list_dir

A folder's files and subfolders, one level or a few

list_files

Find files by glob, skipping hidden, dependency and git-ignored paths

read_file

Read a text file or a range of lines

search_text

Find text or a regular expression, with context lines. Stops after 10 seconds and says how far it got

apply_patch

Add, change, move and delete files in one all-or-nothing patch. When a hunk does not match, it says which hunk, where the file comes closest, and what differs

exec_command

Run a command in PowerShell (Windows) or sh. Long commands keep running and return a session

write_stdin / read_output / kill_session

Talk to a running command, page through long output, stop it and everything it started

request_permissions

Ask you to approve a command that was held back

check_exec_environment

Mode, shell, running commands and which programs are installed

git_status / git_diff / git_log

Branch and changes, diffs, history

browser_use

Work in your Chrome or Edge through the extension

view_image

Look at a PNG, JPEG, GIF or WebP file

human_help_me

Ask you for one small step, such as a click in an app, plugging in a device, or a decision. A window appears on your desktop and a card on the status page. Without either, the assistant asks you in the chat

admin_mode / exec_admin_command

Admin YOLO, once it is installed

Security

Read this before you connect anything.

  • Who can call it. With a public address, every client must log in with your password first. Any app may register itself, but it gets a token only after the password has been typed on the login page.

    • Tokens are random and stored only as hashes. They last a day and renew automatically for up to a year.

    • Five wrong passwords lock the login for a growing time.

    • The server accepts only localhost and the public addresses you gave it.

  • What it can reach. Only the workspaces you list, and nothing outside them, not even through symlinks. Commands, however, run as your account. A command can do anything you can do, including things outside the workspace.

  • Modes.

    • Trusted (the default): everyday commands run freely. Commands that cannot be undone wait for a Yes/No dialog on your desktop. The dialog is a Windows feature; on other systems those commands are refused.

    • YOLO: runs anything your account can do, without asking.

    • The check reads the text of the command. It catches mistakes, not a command written to hide what it does.

  • Administrator rights exist only through Admin YOLO: your code, for at most 30 minutes, and closed at every start. An assistant can ask for it, but it can never switch a mode on its own.

  • The status page listens only on 127.0.0.1, on its own port. Its write actions accept only JSON and refuse cross-site requests, so web pages cannot use it. Of browser extensions, only one you paired can connect. Never put its port behind a tunnel.

  • Logs stay on your machine. Tool calls are kept for 7 days; request logs and the tray log rotate at a fixed size. Passwords, tokens and Admin YOLO codes are never written to them.

  • What leaves your machine. Everything a tool returns, such as file contents, command output and page text, goes to the chat service you connected and is handled under its terms. Do not point a workspace at secrets you would not paste into that chat.

  • Prompt injection. Text an assistant reads, such as a web page, an issue or a file, can try to steer it. Trusted mode and the status page are there so that you notice; they are not a sandbox.

Configuration

npm start -- --help lists everything. The main options:

Option

Default

--workspace <path> or name=path

current folder

Repeat for several. The first is where a new caller starts

--public-url <https://host>

none

Your tunnel's address. Repeatable. Needs a password

--mode trusted|yolo

trusted

See Security

--port / --host

8790 / 127.0.0.1

The MCP endpoint

--console-port

port + 1

The status page, always on 127.0.0.1; 0 turns it off

--data-dir

~/.webcoding-harness

State and logs

--stdio

Serve one local client over stdin/stdout

Most options also have an environment variable: WEBCODING_WORKSPACES, WEBCODING_PUBLIC_URLS, WEBCODING_MODE and so on. Secrets never come from the command line:

  • Login password: WEBCODING_OAUTH_PASSWORD or oauth-password.txt.

  • Fixed bearer token, for scripts that cannot log in through a browser: WEBCODING_AUTH_TOKEN or auth-token.txt, at least 24 characters.

What is in the data folder:

File

oauth-password.txt

Your login password, if you use the file

oauth-state.json

Registered chat apps and token hashes

owner-state.json

Each app's workspace and working folder

browser-pairings.json

Paired extensions (hashes only)

activity/

Every tool call, one file per day, kept 7 days

logs/

requests.jsonl (one line per request, no token values) and server.log from the tray

bin/, tray.json

The tray program and its settings

Known limitations

  • Images. ChatGPT and Gemini do not show the assistant images returned by tools, such as view_image and screenshots. The assistant is told so and works from text instead.

  • Approval needs you at the PC. The Admin YOLO window and the approval dialog are on your desktop.

  • Platforms. The tray icon, the approval dialog, Admin YOLO and image shrinking in view_image are Windows features.

  • Big folders. In a very large workspace, search_text may stop at its 10-second limit. Search inside one project instead.

  • Killed server. If the server process is killed outright, commands it started may keep running.

Troubleshooting

Symptom

What to check

The connector cannot connect

https://<your-address>/healthz should answer. If not, the tunnel is down or points to the wrong port

Requests are refused, or the login page never appears

--public-url must match the tunnel's address exactly: https://, the host name, no port, no /mcp

The password is not accepted, then nothing works for a while

Five wrong passwords lock the login for a growing time. Wait, then try again

Every git call takes about 20 seconds

Look for a network path (//server/share) in your git config, for example in safe.directory. Git waits for it to time out

The extension does not pair

The server and its status page must be running. Open the side panel, then press Allow on the status page

"… is debugging this browser" bar

Normal while browser_use works. It goes away two minutes after the last action

PowerShell says running scripts is disabled

Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

Uninstall

  1. Run .\scripts\windows\uninstall-autostart.ps1. It stops the server and the tray icon and removes the sign-in task.

  2. Run .\scripts\windows\install-admin-yolo.ps1 -Uninstall from an administrator PowerShell, if you installed Admin YOLO.

  3. Remove the extension in chrome://extensions, and the connector in your chat app.

  4. Delete ~/.webcoding-harness to remove logins, history and logs.

Development

npm test
npm run typecheck
node test/e2e/browser-use.e2e.ts   # every browser_use action against the real extension, in headless Edge
src/main.ts      entry: configuration, HTTP listener, request log
src/app.ts       the HTTP surface as one fetch(request) function
src/mcp.ts       builds the MCP server for each request (stateless: no session ids)
src/tools/       one file per tool: arguments, description, the text the model reads
src/core/        the actual work: paths, files, patches, git, commands. Knows nothing about MCP
src/oauth/       the login: client registration, the password page, tokens
src/console/     the status page and its API, on its own port on 127.0.0.1
src/platform/    things only one OS can do: the approval dialog, Admin YOLO bridge
scripts/windows/ sign-in autostart, the tray program, Admin YOLO helper (C#)
extension/       the Chrome extension: side panel, pairing, browser_use

The server is stateless at the protocol level. It never issues an Mcp-Session-Id, so a restart is invisible to clients. Anything that must persist is stored on disk, keyed by who the caller is. One endpoint serves both the 2026-07-28 protocol (ChatGPT) and the 2025 protocol (Gemini).

test/golden/ holds answers recorded from coding-tools-mcp (see Credits), and the tests replay the same calls to check that its behaviour carried over.

Credits

I started WebCoding Harness from coding-tools-mcp by xyTom (Apache-2.0). Its tool interface (names, arguments, descriptions) and much of its behaviour are carried over. I rewrote it from scratch in TypeScript on the official MCP SDK, which keeps the protocol code small. My focus is making that toolset work well from the web chat apps: ChatGPT, Gemini and Claude connectors with a built-in login, both MCP protocol versions, a live status page and side panel, browser automation through its own extension, and Windows integration (tray icon, approvals, Admin YOLO).

License

Apache License 2.0. See NOTICE for attribution.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      C
      maintenance
      Enables 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.
      28
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      Turns ChatGPT web into a local coding agent, enabling file edits, shell commands, Git operations, patches, and process management through 40+ MCP tools.
      MIT
    • A
      license
      Not graded
      quality
      A
      maintenance
      Enables ChatGPT to inspect and edit local projects, run bounded commands and Git operations, control Chrome or Edge, manage connected Excel workbooks, and explicitly call Codex when model work is actually needed.
      MIT