ManulMcpServerBridge between GitHub Copilot and deterministic browser automation. ManulMcpServer is a VS Code extension that exposes ManulEngine as a native MCP server — giving Copilot Chat (and any MCP-compatible agent) the ability to drive real browsers, run
Why ManulMcpServer
Quick Demo1. Write a
|
| Setting | Default | Description |
|---|---|---|
manul.pythonPath |
python3 |
Python interpreter. Auto-discovers workspace .venv when left as default. |
manul.executablePath |
'' |
Path to a custom browser or Electron app. Use with OPEN APP for desktop automation. |
manul.headless |
false |
Run the browser without a visible window. |
manul.apiBaseUrl |
http://127.0.0.1:8000 |
ManulEngine HTTP API URL for editor Run commands. |
manul.requestTimeoutMs |
60000 |
Timeout for engine calls (ms). |
manul.logNormalizedDsl |
true |
Log auto-corrected DSL in the output panel. |
manul.mcpServerLabel |
ManulMcpServer |
Label in the MCP Servers view. |
Example settings.json:
{
"manul.pythonPath": "/home/user/project/.venv/bin/python",
"manul.headless": true,
"manul.executablePath": "/opt/my-electron-app/app"
}
Two execution paths: MCP tools (
manul_run_step,manul_run_goal, etc.) use the bundled Python runner directly — no server needed. Editor title bar Run commands use the ManulEngine HTTP API atmanul.apiBaseUrl(start it withmanul serve).
MCP Tools Reference
| Tool | Description |
|---|---|
manul_run_step |
Run a single DSL step or natural-language action in the live browser |
manul_run_goal |
Convert a goal into DSL steps, execute them, return a .hunt proposal |
manul_run_hunt |
Validate and execute a .hunt document passed as text |
manul_run_hunt_file |
Run a .hunt file from disk |
manul_validate_hunt |
Validate .hunt syntax and return diagnostics — no execution |
manul_normalize_step |
Preview how natural language maps to canonical DSL |
manul_preview_goal |
Preview goal-to-DSL conversion without execution |
manul_scan_page |
List all interactive elements on the current page |
manul_read_page_text |
Read all visible text content from the current page |
manul_get_state |
Query browser status, engine version, and session state |
manul_save_hunt |
Save a .hunt file to disk (workspace-jailed) |
All tools use synchronous request/response. The browser session is persistent — it opens on first use and stays alive across tool calls for inspect/retry.
Troubleshooting
| Problem | Fix |
|---|---|
No module named 'manul_engine' |
Install manul-engine into the interpreter selected by manul.pythonPath, or open the workspace so .venv is discovered. |
node: command not found |
The MCP bridge requires Node.js on PATH. Install Node.js and reload VS Code. |
MCP server ignores workspace .venv |
Open the project folder in VS Code, or set manul.pythonPath explicitly. |
| Editor Run commands fail, but MCP tools work | Editor commands need manul serve running. MCP tools use the bundled runner directly. |
| Browser does not open | Check manul.headless is false. Ensure playwright install has been run. |
Ecosystem
ManulMcpServer is one layer of the Manul automation stack:
| Component | Role | Link |
|---|---|---|
| ManulEngine | Deterministic automation runtime (Python). Heuristic element resolver, .hunt DSL, CLI runner. |
PyPI · GitHub |
| Manul Engine Extension | VS Code extension for ManulEngine with debug panel, explain mode, and Test Explorer integration. | Marketplace · Open VSX · GitHub |
| ManulMcpServer (this) | MCP bridge that gives Copilot Chat and other agents access to ManulEngine. | Marketplace · Open VSX · GitHub |
| ManulAI Local Agent | Autonomous AI agent for browser automation, powered by ManulEngine. | Marketplace · Open VSX · GitHub |
Keyboard Shortcuts
| Shortcut | Mac | Command |
|---|---|---|
Ctrl+Shift+R |
Cmd+Shift+R |
Run Hunt File |
Ctrl+Shift+Enter |
Cmd+Shift+Enter |
Run Step |
Active when a .hunt file is focused in the editor.
What's New
0.0.8
- Compatibility: Synced embedded DSL contract metadata to ManulEngine
0.0.9.29. - DSL: Added
REPEAT N TIMES:,FOR EACH {var} IN {collection}:, andWHILE condition:loop commands — validation, syntax highlighting, completion, snippets, and agent contract. - Docs: Updated
contracts/MANUL_MCP_AGENT_CONTRACT.mdand.github/copilot-instructions.mdwith loops reference. - Release: Updated extension/package versioning to
0.0.8.
0.0.7
- Compatibility: Synced embedded DSL contract metadata to ManulEngine
0.0.9.28. - DSL: Added
IF/ELIF/ELSEconditional branching — validation, syntax highlighting, completion, snippets, and agent contract. - DSL: Updated canonical command labels to ALL UPPERCASE per engine
casePolicy(CLICK,FILL,TYPE,SELECT,CHECK,UNCHECK,DRAG). - Docs: Updated
contracts/MANUL_MCP_AGENT_CONTRACT.mdand.github/copilot-instructions.mdwith conditional branching reference. - Release: Updated extension/package versioning to
0.0.7.
0.0.6
- Compatibility: Synced embedded DSL contract metadata to ManulEngine
0.0.9.27. - Docs: Added
contracts/MANUL_MCP_AGENT_CONTRACT.md— machine-readable contract for AI agents consuming ManulEngine via MCP (tool schemas, DSL reference, workflow guidelines, response shapes, security constraints). - Docs: Updated
.github/copilot-instructions.mdwith complete v0.0.9.27 DSL reference includingOPEN APP,UPLOAD,MOCK,VERIFY VISUAL, strict placeholder/value assertions,CALL PYTHON,SCAN PAGE,DEBUG VARS, metadata headers (@import:,@export:,@data:,@schedule:), and hook blocks ([SETUP]/[TEARDOWN]). - Release: Updated extension/package versioning to
0.0.6.
0.0.5
- Compatibility: Synced embedded DSL contract metadata to ManulEngine
0.0.9.26. - DSL: Added support for
@import:,@export:, andUSEin validation, completion, hover docs, snippets, and syntax highlighting. - Desktop automation: Added
manul.executablePathand propagatedMANUL_EXECUTABLE_PATHthrough the MCP bridge into the bundled Python runner forOPEN APPflows. - Release: Updated extension/package versioning to
0.0.5.
0.0.4
- Stability: Fixed PythonRunner
ensureProcess()race condition — concurrent callers no longer spawn duplicate processes. - Stability: Browser now stays alive on step failure for inspect/retry instead of closing the session.
- Security: Workspace-jail path validation added to Python
save_hunthandler and extracted into sharedpathValidator.ts. - Performance: Page scan now runs only on the last step or on failure, not after every step.
- Performance: Shadow-root traversal uses targeted selector instead of
querySelectorAll('*'). - Maintainability: Centralized config defaults into
src/config/defaults.ts— no more duplicated normalizers. - Maintainability: Shared DSL line iterator (
src/dsl/parser.ts) eliminates duplicated hook-block state machines. - DX: Hover provider rewritten as data-driven loop from contract — no more hardcoded if-branches.
- DX: Qualifier suggestion regex derived from contract
interactionModeinstead of hardcoded list. - DX: Keyboard shortcuts for Run Hunt File (
Ctrl+Shift+R) and Run Step (Ctrl+Shift+Enter). - DX: Added
manul_read_page_textMCP tool for reading visible page text. - Testing: Added vitest with 67 unit tests covering validator, builder, parser, and config defaults.
- Updated DSL contract to v0.0.9.21.
0.0.3
- Managed user-scope
mcp.jsonsync on install, activation, settings change, and uninstall. - User-scope MCP bootstrap now resolves the latest installed extension directory via
node -einstead of a stale versioned script path. - Documentation updated to reflect external runtime requirements and workspace
.venvbehavior.
License
Apache-2.0