Skip to main content
Glama

Pult Agent

Pult Agent is a local Windows MCP server for guarded desktop control. It combines PyAutoGUI for mouse input, OpenCV for screen-template matching, and an Esc kill-switch. A host agent connects over stdio; no control port is opened on the network.

Quick start

  1. Install 64-bit Python 3.11+ and Git. Python 3.14 was verified during this build. Keep the target application open.

  2. Open PowerShell in this repository:

    py -m venv .venv
    .\.venv\Scripts\python.exe -m pip install --upgrade pip
    .\.venv\Scripts\python.exe -m pip install -e .
  3. Register the server with Codex. Replace Roblox Studio with a distinctive fragment of the target application's window title:

    codex mcp add pult-agent --env "PULT_ALLOWED_WINDOW_TITLE=Roblox Studio" -- "C:\Users\HP\Documents\Pult-Agent\.venv\Scripts\python.exe" -m pult_agent.server
    codex mcp list

    If the repository is in another folder, update the Python executable path. Restart Codex after registering the server.

  4. Focus the target application, then ask the agent:

    Use Pult Agent. Call pult_status, then capture_screen. Do not click until I approve the target and you have a fresh screen_id. After each UI action, capture again and verify the resulting state.
  5. Press Esc at any time to disarm all input. Restart the MCP server to re-arm it. pult_stop also disarms it.

Related MCP server: Windows Computer Bridge MCP

What the agent gets

MCP tool

Purpose

Guard

pult_status

Screen size, cursor, foreground window, safety state

Read only

capture_screen

Fresh screen ID, metadata, and image in one response

Allowed foreground app only

move_mouse

Move to (x, y)

Latest screen ID, age ≤ 10 s, bounds check

click_at

Send one left/right/middle click

Same fresh-screen and foreground checks; no retry

drag_exact

Bounded drag between two points

Latest screen ID, bounds checks, ≤ 2 s, releases button in finally

match_template

OpenCV match against templates/

Safe filename, image type and size limits

click_template

Fresh match, then one click

Confidence threshold and foreground recheck

pult_metrics

Recent step IDs, durations, outcomes

Read only

pult_stop

Set the process-wide stop flag

One-way until server restart

Safety contract

  • The foreground-window title must contain PULT_ALLOWED_WINDOW_TITLE; otherwise input fails closed. The server never focuses, launches, or switches applications.

  • pyautogui.FAILSAFE = True and pyautogui.PAUSE = 0.02 are set at controller initialization.

  • The global Esc listener is started before the stdio MCP loop. It blocks subsequent actions once observed. PyAutoGUI/Windows calls already in progress cannot be guaranteed to abort in the middle; movement durations are bounded and drag is intentionally not exposed.

  • A click is sent once and is never automatically retried. The caller must capture a new screen and verify the result before deciding what to do next.

  • Coordinates must be within the current desktop bounds and derived from the latest capture_screen result. A new capture invalidates the prior screen ID. Screen IDs expire after 10 seconds.

  • OpenCV templates must be placed under templates/. The tool accepts only a filename, not a path. Use a close crop of a stable UI element; avoid text, animated areas, and overlapping controls.

  • MCP stdio uses stdout as the protocol stream. Logs go to stderr. Do not add print() calls to startup code.

  • Screen captures and template images may contain private data. They remain local unless the MCP host sends tool results to a remote service.

Documentation

Requirements and limits

  • Windows 10/11 desktop session, Python 3.11+ (64-bit), visible interactive desktop, and a local MCP host that supports stdio.

  • The screen must not be locked. UAC secure-desktop prompts, elevated-vs-non-elevated process isolation, remote sessions, and multi-monitor DPI scaling can prevent input or shift coordinates. Keep the host and target app at the same privilege level and verify the reported screen dimensions.

  • This project is an execution bridge, not a guarantee that a click caused the intended application state. The agent must inspect a fresh screenshot or app-specific state after each mutation.

  • There is no bundled HUD/GUI. The agent calls MCP tools; this repository is the controller service.

Development

py -m venv .venv
.\.venv\Scripts\python.exe -m pip install -e .
.\.venv\Scripts\python.exe -m pult_agent.server

The final command waits for an MCP host on stdin/stdout. It appears idle when launched by itself; that is normal for stdio transport. Do not run the controller against a live desktop unless the intended app is focused and the window-title guard is configured.

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
      Not graded
      quality
      B
      maintenance
      Enables AI agents to control remote desktops through screen capture, mouse movement, and keyboard input.
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI clients to inspect and control allowlisted Windows applications using screenshots, mouse actions, Unicode keyboard input, UI Automation, and an Esc/F12 emergency stop.
      1
      Apache 2.0
    • A
      license
      A
      quality
      B
      maintenance
      Enables agents to perceive and control a Windows desktop, a connected local Chromium browser, or a cloud Playwright browser through human-like mouse moves, clicks, drags, scrolling, and screenshots, forming an observe-locate-act computer-use loop. Includes safety guards such as random pauses, emergency stop, and approval prompts for destructive actions.
      11
      MIT
    • A
      license
      Not graded
      quality
      B
      maintenance
      Enables AI agents to perform human-authorized, fully auditable GUI actions — clicking, typing, and window operations — on a local Windows desktop, gated by time- and count-limited leases that are denied by default until a person signs off in a popup. Every action is bound to a fresh screen capture, leaves screenshot-based evidence and decision logs on the local machine, and can be halted instantly via a panel button, hotkey, or kill-switch file.
      2
      Apache 2.0