Skip to content
Proyek

herdodp/snapgent-connector

Lihat di GitHub

Tentang

Free, open-source connector agent chatbot AI browser to many App via MCP.

AI dan pembelajaran mesin

Cara angka ini diukur

374 bintang78 Fork +2 dalam 24 jam

Pertumbuhan bintang terukur

dalam 24 jam
+2
dalam 7 hari
+20
dalam 15 hari
+61
dalam 1 bulan
+294

Perubahan bersih pada periode yang tumpang tindih, bukan total harian. Pengukuran yang belum tersedia dibiarkan kosong. Bintang menunjukkan perhatian, bukan kualitas.

README.md

Asli
snapgentV3: Connector agent for VS Code

Connecting AI chatbot browser to many app via MCP

💬 Join Discord to report problem

License Manifest Release MCP


  ███████╗███╗   ██╗ █████╗ ██████╗  ██████╗ ███████╗███╗   ██╗████████╗
  ██╔════╝████╗  ██║██╔══██╗██╔══██╗██╔════╝ ██╔════╝████╗  ██║╚══██╔══╝
  ███████╗██╔██╗ ██║███████║██████╔╝██║  ███╗█████╗  ██╔██╗ ██║   ██║
  ╚════██║██║╚██╗██║██╔══██║██╔═══╝ ██║   ██║██╔══╝  ██║╚██╗██║   ██║
  ███████║██║ ╚████║██║  ██║██║     ╚██████╔╝███████╗██║ ╚████║   ██║
  ╚══════╝╚═╝  ╚═══╝╚═╝  ╚═╝╚═╝      ╚═════╝ ╚══════╝╚═╝  ╚═══╝   ╚═╝

  > browser extension + local bridge for VS Code and MCP
  > no API key · no terminal · no copy-paste

snapgentV3 is a browser extension plus a local bridge that connects a normal AI chat to VS Code. It automatically uses the currently open workspace. Describe what you want in plain language — the extension forwards commands to the selected server through the local bridge, and returns the results to chat.

Free and open source — no API key, subscription, or sign-in required. snapgentV3 automatically uses the currently open VS Code workspace.


💻 VS Code / VSCodium

Supports VS Code, VSCodium, or Code - OSS. Choose a target in the snapgentV3 bar before starting; until then, Snapgent will not send commands to an MCP server.


01   How it works

┌─────────────┐     plain-text      ┌──────────────────┐    WebSocket    ┌────────────┐    MCP    ┌────────────────┐
│  AI chat    │ ───  commands  ───▶ │ snapgentV3       │ ──────────────▶ │  Bridge    │ ────────▶ │ Selected MCP   │
│  (browser)  │ ◀──  results   ───  │ browser extension│ ◀────────────── │ (local)    │ ◀──────── │ target         │
└─────────────┘                     └──────────────────┘                 └────────────┘           └────────────────┘
  1. You describe a task in a supported AI chat.
  2. The AI replies with a snapgentV3 command.
  3. The extension detects the command and forwards it to the local bridge.
  4. The bridge routes it to the VS Code MCP server.
  5. The result is sent back into chat, and the AI continues working.

VS Code's MCP server is configured locally by start.bat; it detects the open VS Code workspace automatically.


Snapgent App (standalone, Windows)

Prefer not to load an extension or run the bridge yourself? Snapgent App is a standalone desktop app (Electron) with a built-in AI browser, a toolbar, and the bridge built in. It needs no Chrome/Edge, no start.bat, no Python and no Node.js.

Download (app-v0.1.1): Releases > app-v0.1.1

File Use
Snapgent.Setup.0.1.1.exe Installer (recommended)
Snapgent.Setup.0.1.1.exe.blockmap Update metadata, not needed for a normal install

How to use

  1. Install and open Snapgent. It opens claude.ai inside the app and keeps your login in its own profile.
  2. Click the workspace button in the toolbar and choose your project folder.
  3. Chat as usual. The agent bar appears on the page and runs the commands in the selected folder.

Known limitations (0.1.1)

  • The exe is not code-signed, so Windows SmartScreen may warn. Click More info, then Run anyway.
  • Google sign-in has not been fully tested. If it fails, log in with email and password on the Claude page.
  • Windows only. The default Electron icon is still used.

Build from source

The source is in snapgent-app/. It carries its own copy of the extension code (snapgent-app/extension), separate from snapgent-extension/.

cd snapgent-app
npm install
npm start        # run in development
npm run dist     # build the Windows installer into dist/

snapgent-app/bin/vscode_mcp.exe is not stored in Git. Build it from snapgent-app/mcp/vscode_mcp.py with PyInstaller (see vscode_mcp.spec) and place it in snapgent-app/bin/ before running npm run dist.


02   Supported AI providers

Provider URL Status Notes
ChatGPT chatgpt.com ✅ Supported Image input and screenshots are disabled
Claude claude.ai ✅ Supported Image input and screenshots are disabled
Google Gemini gemini.google.com ✅ Supported May stop using tools in long sessions
Kimi kimi.ai ✅ Supported May use its native tools in some sessions
Grok grok.com ✅ Supported Requires signing in to xAI
Mistral (Vibe Code) chat.mistral.ai 🧪 Experimental Requires signing in to Mistral; selectors need testing on the live site
GLM (Z.ai) chat.z.ai ✅ Supported
Qwen chat.qwen.ai ✅ Supported
Qwen Coder coder.qwen.ai ✅ Supported
Arena arena.ai ✅ Supported Use Direct mode
Meta AI meta.ai ✅ Supported
Ptero ptero.pro ✅ Supported

Provider activation is configured in manifest.json (content_scripts and host_permissions) and PROVIDER_URLS in background.js.


03   Requirements

  • Chromium Browsers (Google Chrome, Microsoft Edge, Brave, Opera, etc.) or Mozilla Firefox (v128.0+ with Manifest V3).
  • VS Code, VSCodium, or Code - OSS for the default target. Keep the workspace you want to use open in your editor.
  • Windows, macOS, or Linux for the bridge.
  • Python 3.9+ on macOS and Linux. Windows includes the bridge executable. The start scripts install websockets (required) and aiohttp (optional live view).
  • The bridge running while you use the agent.

04   Installation

① Load the extension

  1. Download and extract the latest SnapgentV3 release (or clone this repository).
  • For Chrome / Edge / Brave / Chromium:

    1. Open chrome://extensions (Chrome/Brave) or edge://extensions (Edge).
    2. Enable Developer mode (toggle in top right).
    3. Click Load unpacked and select the snapgent-extension folder.
    4. The snapgentV3 icon appears in your browser toolbar.
  • For Mozilla Firefox:

    1. Open a new tab and go to about:debugging#/runtime/this-firefox.
    2. Under Temporary Extensions, click Load Temporary Add-on...
    3. Navigate into the snapgent-extension folder and select the manifest.json file (unlike Chromium browsers which select the folder, Firefox requires choosing a file inside the extension).
    4. The snapgentV3 icon appears in your toolbar and connects to the bridge automatically.

② Set up the MCP target

The MCP target starts as None. Choose the target in the chat bar before clicking Start. For VS Code, open the project folder you want to work on; the bridge can be started before VS Code, and the agent waits for a workspace instead of falling back to the Snapgent release folder.

③ Start the bridge

  • Windows — double-click start.bat. It configures VS Code MCP and detects installed FigCraft and EffectCraft targets automatically. You can start the bridge before VS Code. Machine-specific settings are written to the ignored local config.json.
  • macOS — double-click MacOS_Start.command. It detects the bundled VS Code MCP server, Roblox Studio's MCP executable, and installed FigCraft and EffectCraft tools, then writes their machine-specific paths to the ignored local config.json. This launcher uses bridge.py; it does not run the Windows-only bridge.exe.
  • Linux — open a terminal in the extracted release folder and run bash Linux_Start.sh. It detects the bundled VS Code MCP server and installed FigCraft and EffectCraft tools, then writes machine-specific paths to the ignored local config.json. It uses bridge.py; the first launch installs websockets for your user, or creates a local Python environment if your distribution blocks user installs.

Keep the terminal window open while the bridge runs. On macOS, the first launch may show a Gatekeeper warning; select Done, then allow the script under System Settings → Privacy & Security.

Optional: connect EffectCraft

Starting the Snapgent bridge does not open EffectCraft. When you want to use it, run Open-EffectCraft-for-Snapgent.bat on Windows or bash open-effectcraft-for-snapgent.sh on macOS/Linux. The helper detects the EffectCraft CLI and app, then starts the app with its control channel on port 9877. Run or restart the normal Snapgent bridge launcher afterward so the MCP server connects. When connected, choose EffectCraft in the MCP target selector on the chat bar.

On macOS, install the separate EffectCraft CLI release and put effectcraft-cli on your PATH. On Linux, install the CLI and put it on PATH, or install the app in a supported common location. If EffectCraft is already open without the control channel, Snapgent will not close or restart it; save your work, close it, run the helper, then restart the bridge launcher.

Optional: connect FigCraft

Starting the Snapgent bridge does not open FigCraft. When you want to use it, run Open-FigCraft-for-Snapgent.bat on Windows or bash open-figcraft-for-snapgent.sh on macOS/Linux. This helper detects the FigCraft CLI, selects an available loopback port, and opens FigCraft with its control channel. Then run or restart the normal Snapgent bridge launcher so the MCP server attaches to the app. When connected, choose FigCraft in the MCP target selector on the chat bar.

If FigCraft is already running with a --control port, the helper detects and reuses it. If it is open without a control channel, Snapgent will not close or restart it; the MCP entry remains headless. Save your work, close FigCraft, run the helper, then restart the bridge launcher. Opening FigCraft normally from its desktop icon does not enable the control channel.

On macOS, Roblox Studio MCP is detected at /Applications/RobloxStudio.app/Contents/MacOS/StudioMCP; set ZS_STUDIO_MCP_PATH before launching if it is installed elsewhere. Linux does not auto-detect Roblox Studio MCP. If you have a compatible Linux MCP executable, set ZS_STUDIO_MCP_PATH to its path before running the launcher; Roblox Studio itself may not be available on your Linux distribution.

Optional: use the Word target (.docx)

The Word target works differently from VS Code. It does not follow the open VS Code workspace, and it does not need Microsoft Word to be installed. It runs the office-word-mcp-server package, which creates, reads and edits .docx files directly on disk.

Requirements

  • uv installed, so that uvx is available. Get it from docs.astral.sh/uv.
  • Internet access on the first run, because uvx downloads office-word-mcp-server when it is first used. This first download can take a while, so wait for it to finish and watch its progress in the bridge console window.
  • The bridge started with the normal launcher (start.bat, MacOS_Start.command or Linux_Start.sh) after uv is installed.

How it is set up

setup-config.ps1 (Windows) and setup-config.py (macOS/Linux) look for uvx and, when found, register a word server in the local config.json. When uv is missing, the launcher prints uv not found; Word MCP not configured and the other targets keep working. If you install uv later, close the launcher and start it again.

How to use

  1. Install uv, then start the launcher. Look for Word MCP detected (uvx) in its output.
  2. Open a supported AI chat site, start a new chat and click Start.
  3. In the MCP target selector on the chat bar, choose Word. If it is not listed, open MCP servers from the three-dots (...) menu on the snapgent bar and tick word, then reload the extension and refresh the chat tab.
  4. Describe the document you want, for example: "Create a report in D:\Documents\report.docx with a title, three headings and a table." If you give only a file name (for example report.docx), the file is created inside the main Snapgent folder, the same folder that contains start.bat, bridge.exe and config.json, because this target does not use the VS Code workspace folder. To save it somewhere else, give the full path of the .docx file.
  5. To work on code again, switch the target back to VS Code.

First run: the first time you use the Word target, uvx downloads office-word-mcp-server and its dependencies. Wait until the download finishes before sending more requests, and follow the progress in the bridge console (the terminal window running start.bat, MacOS_Start.command or Linux_Start.sh). If the Word target seems stuck or does not respond right after you select it, check that console first. Later runs are usually faster because uvx caches the package.

Tip: close the .docx file in Word (or any other viewer) before asking the AI to edit it, so the file is not locked.

④ Start a session

  1. Open a supported AI chat site and start a new chat.
  2. Open a project folder in VS Code before clicking Start.
  3. Click Start and describe what you want to make.

⑤ Updating to a new release

The extension and the bridge are two separate parts, and each one has to be updated. Reloading only the extension does not update the bridge, and the Restart button in the extension popup only restarts the MCP servers, it does not load new bridge code.

  1. Get the new version: run git pull in the project folder, or download and extract the latest release.
  2. Stop the old bridge: close the terminal window that is running start.bat, MacOS_Start.command or Linux_Start.sh.
  3. Start the bridge again with the same launcher. The launcher replaces an old bridge still holding port 17613. On Linux it first checks that the process on the port is a Snapgent bridge, and stops with an error if it belongs to another program.
  4. Reload the extension at chrome://extensions (or edge://extensions), then refresh open chat tabs (F5).
  5. Check the versions: click the snapgentV3 icon. The popup header shows ext vX · bridge vY, and both numbers should match the release you installed. The bridge also writes snapgent bridge vY to its startup log.

If the popup shows bridge old, the bridge is still running old code: repeat steps 2 and 3. On macOS and Linux, also make sure there is no old executable file named bridge in the folder, because the launcher runs it instead of bridge.py.

Windows note (V3.9.4): start.bat runs the bundled bridge.exe, which was rebuilt for V3.9.4 and includes the large-response fix, the version display and parallel server startup. If the popup still shows bridge old, close start.bat and start it again so the new bridge.exe is used. To run the bridge from source instead, install Python 3.9+ and py -3 -m pip install websockets, then run py -3 bridge.py in the project folder.


05   Usage

Once a session is running, just talk to the AI normally:

"Inspect the files in my project and explain how the login flow works."

"Add a search bar to the books page and wire it to the existing API."

The AI sends commands, snapgentV3 runs them in the selected target, and the results appear in chat. No MCP target is selected until you choose one in the bar. You can give the AI another instruction at any time.

Tips

  • Keep the bridge window open — closing it disconnects the agent.
  • Keep your intended project open in VS Code when VS Code is selected as the MCP target.
  • On Arena, use Direct mode.
  • If Gemini or Kimi stops using tools in a long session, remind it to use the snapgentV3 commands or start a new chat.

Live view and status

The bridge also opens a small read-only HTTP channel on the port next to the bridge (17614 by default, override with ZS_BRIDGE_STREAM_PORT):

URL What it shows
http://127.0.0.1:17614/ One-page live view of the turn that is running
/events The same frames as Server-Sent Events (/stream is an alias)
/status One-shot JSON snapshot: bridge version, queue, recent frames

It is advisory only: a dead reader can never fail a tool call, and no route accepts a pushed frame, so a page open in the same browser cannot inject into the view. The channel needs the aiohttp package; the start scripts install it. Without it the bridge logs progress channel disabled and every tool call keeps working.

WebSocket origin (local security)

The bridge only accepts the extension. The WebSocket handshake rejects any Origin that is not a browser-extension URL (chrome-extension://, moz-extension://, safari-web-extension://) with HTTP 403 and a rejected websocket origin=... log line, so a page on any website cannot open ws://127.0.0.1:17613 and run tools such as run_command or write_file. handle_client repeats the check as a second layer and closes the socket (code 1008) if a server was started without the handshake gate.

Clients that send no Origin at all — command-line tools, tests, native apps — are still accepted, because a browser page cannot omit that header. If you drive the bridge from your own front end, list its exact origin in ZS_BRIDGE_EXTRA_ORIGINS (comma separated) before starting the bridge.

Remote commands (opt-in, off by default)

MCP servers → Remote commands lets the extension continue a session whose assistant reply was written somewhere else — for example a reply typed in the ChatGPT mobile app, or one that arrived through conversation sync.

  • What it does: while a Snapgent session is running, the extension watches the newest assistant reply in the chat. If that reply carries snapgentV3 tool calls this session has not executed yet, it adopts and runs them.
  • Why it is off by default: it runs commands that arrive through the chat content, not from the click you just made. Anyone who can write into that conversation — another device signed in to your account, a shared or synced chat, or someone with access to the page — can run commands with the bridge's privileges: file reads and writes and, with the VS Code server, terminals.
  • When to turn it on: only while you are deliberately moving between devices. Turn it off again afterwards; the setting is remembered per browser profile.

Windows and bridge.exe

Windows runs the prebuilt bridge.exe. The bridge-side fixes (per-websocket replay cache with force, the live view and /status, the removed /push endpoint and the WebSocket origin check) live in bridge.py, which is what macOS, Linux, and Windows-from-source run; the bundled bridge.exe is only rebuilt when a release says so. When running bridge.py on Windows, install the dependencies once:

python -m pip install --user websockets aiohttp

06   Architecture

The extension is split into a provider-agnostic core and per-site providers. The core talks to each AI site through the ZSProvider interface.

core/config.js              system prompt, feedback, tool categories
core/parser.js              snapgentV3 command parsing
core/main.js                agent loop, UI, session state
providers/<site>.js         site-specific selectors and chat integration
background.js               WebSocket connection to the local bridge
manifest.json               browser permissions and content scripts

The bridge routes commands to the configured MCP servers. Windows uses the bundled bridge.exe; macOS and Linux run the cross-platform bridge.py with Python.


07   Project structure

snapgent-full/
├── snapgent-extension/        # Load this folder as an unpacked extension
│   ├── core/                  # Shared prompt, parser, agent loop, and UI
│   ├── providers/             # Per-AI-site integrations
│   ├── background.js          # Local bridge connection
│   ├── manifest.json          # Manifest V3 configuration
│   └── test-*.js              # Smoke tests
├── assets/                    # Project images
├── setup-config.ps1           # Configures Windows MCP servers
├── setup-config.py            # Detects MCP servers on macOS and Linux
├── config.json                # Generated locally by launchers (not tracked)
├── start.bat                  # Windows bridge launcher
├── MacOS_Start.command        # macOS bridge launcher
├── Linux_Start.sh             # Linux bridge launcher
├── bridge.exe                 # Windows local bridge
├── bridge.py                  # Cross-platform Python MCP bridge
├── vscode_mcp.exe             # Default VS Code MCP server (28 workspace tools)
├── vscode_mcp.py              # VS Code MCP server source
├── test_bridge.py             # MCP bridge protocol tests
├── test_setup_config.py       # MCP setup helper tests
└── vscode_mcp.spec            # PyInstaller build recipe

08   Troubleshooting

Symptom Likely cause Fix
snapgentV3 bar is missing Extension is disabled or site access is blocked Check the extension is enabled and allowed on the current AI chat site, then reload the tab
Firefox: Stale extension / reload loop Extension was reloaded or background refreshed Click Close on banner or refresh tab (F5) once bridge connects
Bridge is offline Bridge is not running Start start.bat (Windows), MacOS_Start.command (macOS), or run bash Linux_Start.sh (Linux)
AI replies without using tools Provider/model stopped following commands Remind it to use snapgentV3 commands or start a new chat
VS Code / VSCodium target is unavailable The bridge is offline or no workspace folder open Run launcher from release folder and open a project folder in VS Code / VSCodium
A configured MCP server is missing from the target dropdown The server was switched off in the MCP servers panel, or the extension is outdated Open MCP servers from the ⋯ menu on the snapgent bar and tick the server, then reload the extension in chrome://extensions and refresh the chat tab
Target dropdown closes or the click does nothing Older extension versions redrew the menu during status updates Update to the latest release and reload the extension

Built for creators who want to spend more time making.

Latest release V3.9.17 · Issues · License

Jelajahi proyek terkait

Memuat…