Grasp MCP Server

Grasp MCP Server

A Windows desktop control MCP server that gives Claude eyes and handsβ€”screen capture with coordinate-grid overlays, pixel-perfect DPI-correct mouse/keyboard input via a Rust backend, and direct PowerShell command execution, enabling full local desktop automation through natural language.

Category
Visit Server

README

<div align="center">

πŸ–οΈ Grasp

Give Claude eyes and hands β€” full desktop control over MCP.

Grasp is a Model Context Protocol server that lets Claude see your screen and drive your mouse, keyboard and shell. Install it once and Claude Code β€” or any MCP host β€” can operate your Windows PC the way a person would: look, point, click, type, run commands.

MCP Node Platform License

</div>


What "eyes and hands" means. Eyes β€” Grasp captures the screen, resizes it to a vision-friendly resolution and draws a coordinate grid on top, so Claude can read exact positions instead of guessing. Hands β€” Grasp injects real, DPI-correct mouse and keyboard input at the OS level (a Rust backend), and runs shell commands directly. Together they close the loop: Claude looks, decides, acts, looks again.

Why Grasp

Most "computer use" setups are either a cloud VM you don't control, or a browser-only automation that can't touch the rest of your machine. Grasp runs locally, drives the real desktop, and plugs into the tools you already use through a single mcp add command.

  • Pixel-perfect on scaled displays. The Rust input backend respects Windows display scaling (125% / 150% / 200%) β€” clicks land exactly where Claude looked, not two centimetres off.
  • Vision tuned for accuracy. Screenshots are cropped/resized to ~1280 px with a 100-px coordinate grid overlay, the single biggest lever on click precision.
  • Shell without the screenshot tax. run_command returns real text output β€” no opening a terminal, typing into it, and screenshotting the result.
  • Safe by construction. Input is released on startup/shutdown so a stuck modifier can never freeze your keyboard; failing and elevated commands are reported honestly, never as silent successes.

Tools

Tool What it does
πŸ‘οΈ screenshot Capture the screen (full or active window) as an image with a coordinate grid.
πŸ‘οΈ get_active_window Title, process and bounds of the focused window.
πŸ‘οΈ list_windows All open top-level windows.
πŸ‘οΈ get_screen_info Monitor geometry, resolution and DPI scale.
βœ‹ click Glide the cursor to a point and click (left / right / middle).
βœ‹ double_click Double-click at a point.
βœ‹ move_mouse Move the cursor (to reveal hover-only menus).
βœ‹ drag Press, glide with the button held, release β€” selections, sliders, drag-and-drop.
βœ‹ type_text Type literal text at the current focus.
βœ‹ press_key Keys and combos: enter, ctrl+c, alt+f4, win+r, ctrl+shift+esc…
βœ‹ scroll Scroll up/down at a point.
βš™οΈ run_command Run a shell command (PowerShell), optionally elevated via UAC; returns text output.
βš™οΈ wait Pause N ms to let an app settle before the next screenshot.

How the coordinate model works

  1. Claude calls screenshot. Grasp captures the screen, resizes the longest edge to 1280 px, and overlays a grid labelled every 100 px.
  2. Claude reads a coordinate straight off the grid (e.g. "the button is near xβ‰ˆ540, yβ‰ˆ300").
  3. Claude calls click with those numbers. Grasp maps them back through the resize + crop + DPI transform to the exact physical pixel and clicks there.

You never do the math β€” pass coordinates in the same space you see them. (Advanced: pass coord_space: "screen" to use raw physical pixels instead.)

Requirements

  • Windows 10/11, x64. The mouse/keyboard backend ships as a prebuilt native binary for win32-x64. Screen capture, window enumeration and image processing are cross-platform, but Grasp is Windows-first today.
  • Node.js β‰₯ 18.
  • An MCP host β€” Claude Code, Claude Desktop, or anything that speaks MCP over stdio.

Install

git clone https://github.com/Jamshed7470/grasp-mcp.git
cd grasp-mcp
npm install
npm run doctor   # verify Grasp can see and control this machine

npm run doctor should end with βœ… Grasp is ready β€” Claude has eyes and hands.

Add to Claude Code

From the repo directory:

claude mcp add grasp -- node "%CD%\src\index.js"

…or with an absolute path from anywhere:

claude mcp add grasp -- node "C:\path\to\grasp-mcp\src\index.js"

Then just ask Claude, e.g. "take a screenshot and open Settings for me."

Add to Claude Desktop

Edit claude_desktop_config.json (%APPDATA%\Claude\claude_desktop_config.json) and add:

{
  "mcpServers": {
    "grasp": {
      "command": "node",
      "args": ["C:\\path\\to\\grasp-mcp\\src\\index.js"]
    }
  }
}

Restart Claude Desktop. Grasp's tools appear under the πŸ”¨ menu.

Usage examples

Once installed, drive it in plain language β€” Claude picks the tools:

  • "Open Notepad, type today's date, and save it to the Desktop."
  • "Find the Wi-Fi icon in the tray and tell me which network I'm on." (screenshot β†’ read)
  • "Update all my winget packages." (run_command with elevated: true)
  • "Scroll the page down and click the first search result."

Configuration

Environment variable Purpose
GRASP_ENIGO_PATH Absolute path to the node-enigo .node binary, if it isn't in the bundled native/ folder.

Per-tool options (image size, grid on/off, JPEG quality, command timeout, working directory, elevation) are passed as tool arguments β€” see each tool's description in the MCP schema.

⚠️ Security

Grasp gives an AI model real control of your computer β€” the same reach you have. Treat it accordingly.

  • You are always in the loop. MCP hosts ask before each tool call by default. Keep it that way for anything destructive.
  • Close sensitive windows (password managers, private messages) before running an agent β€” whatever is on screen is what Claude sees, and screenshots may briefly hold that content.
  • Elevated commands need your hand. elevated: true triggers a Windows UAC prompt you must approve; UAC runs on a secure desktop that cannot be automated. If you dismiss it, Grasp reports the command as not run β€” never a silent success.
  • Never commit screenshots. This repo's .gitignore blocks *.png/*.jpg for exactly this reason.
  • Run Grasp only on machines and tasks you're comfortable handing to an assistant.

Troubleshooting

Symptom Fix
enigo NOT loaded β€” hands disabled The native binary wasn't found. Confirm native/node-enigo-win32-x64.node exists, or set GRASP_ENIGO_PATH. You're likely not on Windows x64.
node-screenshots NOT loaded Run npm install (native module needs its prebuild).
Clicks land in the wrong place Take a fresh screenshot right before clicking β€” coordinates are relative to the most recent capture.
run_command can't find cmd/ping/net Grasp already restores PATH/PATHEXT for hosts that strip the environment; update to the latest version if you see this.

Run npm run doctor any time to re-check every backend.

How it's built

src/
  index.js            MCP server β€” registers the 13 tools over stdio
  native.js           screen capture + mouse/keyboard (node-enigo, node-screenshots, get-windows)
  image-processor.js  sharp pipeline: crop β†’ resize β†’ coordinate-grid overlay
  shell.js            PowerShell runner with UTF-8 output + UAC elevation
  doctor.js           standalone backend health check
native/
  node-enigo-win32-x64.node   prebuilt Rust input backend
test/
  mcp-test.js         end-to-end test over real MCP stdio (read-only + safe tools)
  live-notepad.js     opt-in live test that types into a throwaway file and reads it back

Backends: node-enigo (Rust, mouse/keyboard) Β· node-screenshots (Rust, capture) Β· get-windows Β· sharp Β· @modelcontextprotocol/sdk.

Development

npm run doctor          # health check, no server
node test/mcp-test.js   # 11 end-to-end assertions over MCP stdio
node test/live-notepad.js   # opt-in: drives the real desktop, cleans up after itself

Contributions welcome β€” especially a macOS/Linux input backend to make Grasp truly cross-platform.

License

MIT. Grasp bundles a prebuilt node-enigo binary and depends on node-screenshots, both built on the Rust enigo / xcap ecosystem.

<div align="center"> <sub>Grasp β€” <i>to grasp</i> is both to see and to hold. Built for Claude.</sub> </div>

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured