Desktop MCP
The VS Code extension registers two Language Model Tools (getScreenSize and captureScreenshot) that GitHub Copilot Chat in agent mode can call directly, letting agents query multi-monitor screen geometry (virtual screen bounds, per-display bounds, scale factor, rotation) and capture PNG/JPEG screenshots of the whole screen, a specific display, or an arbitrary pixel region, optionally saving them to a file. Each tool can be individually enabled or disabled in the extension settings, and the tools can also be invoked explicitly in chat via #getScreenSize / #captureScreenshot.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Desktop MCPscreenshot my primary display and save it to C:/tmp/screen.png"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Desktop MCP
Screen size and screenshots for AI agents. Works two ways:
VS Code extension — registers two Language Model Tools, so GitHub Copilot Chat (agent mode) can call them directly.
MCP server — the same two tools over stdio, so Claude Code, Grok, Cursor, Windsurf, Cline or any other MCP client can use them.
No PowerShell, no external binaries: capture is done by the native node-screenshots addon, encoding by sharp.
Tools
get_screen_size
Returns the screen geometry in pixels:
{
"platform": "win32",
"virtualScreen": { "x": 0, "y": 0, "width": 3200, "height": 2000 },
"displays": [
{
"index": 0,
"id": 65537,
"name": "Unknown Monitor 65537",
"primary": true,
"scaleFactor": 2,
"rotation": 0,
"bounds": { "x": 0, "y": 0, "width": 3200, "height": 2000 }
}
]
}virtualScreen is the bounding box of all displays; its origin can be negative on multi-monitor setups.
capture_screenshot
Argument | Type | Description |
|
| Rectangle in pixels, relative to the virtual screen origin. Omit for the whole screen. |
|
| Display index from |
|
| Default |
|
| JPEG quality 1–100, default 90. |
|
| Absolute path to also save the image to. |
Returns the image plus a JSON metadata block (actual region, size, byte count, saved path). Regions that span several monitors are stitched together; regions are clipped to the screen.
Enabling and disabling tools
Each tool can be turned off in Settings → Desktop MCP → Tools:
Setting | Default | Effect when |
|
|
|
|
|
|
A disabled tool is removed from the tool list (tools/list for MCP, the Copilot tool picker for VS Code). If an agent calls it anyway, it gets a normal result explaining that the user disabled it, e.g.:
Tool "get_screen_size" is disabled by the user in the Desktop MCP settings. Do not retry it; ask the user to enable it in Settings → Desktop MCP → Tools if it is needed.
For the standalone server the same filter is available through the DESKTOP_MCP_DISABLED_TOOLS environment variable (comma-separated tool names).
Related MCP server: Shotik
Use with GitHub Copilot in VS Code
Install the extension (see below).
Open Copilot Chat in Agent mode and ask, e.g. "take a screenshot of the top-left 800x600 of my screen".
The tools appear as
getScreenSize/captureScreenshotand can also be referenced with#getScreenSize/#captureScreenshot.
Use with Claude Code, Grok, Cursor, Cline, ...
There are two transports. stdio is the default and needs no port — the client starts the process itself. HTTP mode is there if you prefer a long-running local server on a port (like other desktop MCP bridges).
Option A — stdio (recommended)
{
"mcpServers": {
"desktop": {
"command": "node",
"args": ["C:/shared-data/reps/mcp-screenshot/bin/desktop-mcp.js"]
}
}
}Claude Code:
claude mcp add desktop -- node C:/shared-data/reps/mcp-screenshot/bin/desktop-mcp.jsGrok / Cursor / Windsurf / Cline: add the same
mcpServersentry to the client's MCP config file.VS Code itself: set
desktopMcp.registerMcpServertotrueto expose the server through the extension, or add the JSON above to.vscode/mcp.json.
Option B — HTTP on a local port
The extension starts the HTTP server automatically when VS Code activates it (desktopMcp.httpServer, default true), so after installing the extension you only need to point the client at the URL:
{
"mcpServers": {
"desktop": {
"type": "http",
"url": "http://127.0.0.1:7841/mcp"
}
}
}Claude Code:
claude mcp add --transport http desktop http://127.0.0.1:7841/mcpHealth check:
curl http://127.0.0.1:7841/health→{"ok":true,"name":"desktop-mcp"}Change the port with
desktopMcp.httpPort, or turn autostart off withdesktopMcp.httpServer: false.
Commands (Ctrl+Shift+P)
Command | What it does |
| Pick MCP clients (Claude Code, Codex, Grok, Copilot, Cursor, Cline, Roo, Windsurf, Antigravity) and write/refresh the |
| Starts the HTTP server on the configured port |
| Stops it |
| Shows the URL and health check result |
| Asks for a port (1–65535), saves it to settings and restarts the server |
Changing desktopMcp.httpPort in Settings also restarts the server automatically.
Install MCP
Desktop MCP: Install MCP shows a multi-select list of clients. Already-configured clients are pre-selected and marked already configured — will be updated, so running it again after a port change rewrites the URL everywhere.
Client | Config file | Entry |
Claude Code |
|
|
Codex |
|
|
Grok |
|
|
GitHub Copilot (VS Code) |
|
|
GitHub Copilot CLI |
|
|
Cursor |
|
|
Cline |
|
|
Roo Code |
|
|
Windsurf |
|
|
Antigravity |
|
|
Existing keys in those files are preserved; only the desktop-mcp entry is added or overwritten.
If you don't want to keep VS Code open, run the server standalone instead:
node bin/desktop-mcp.js --http # http://127.0.0.1:7841/mcp
node bin/desktop-mcp.js --http --port 7841 # explicit port
node bin/desktop-mcp.js --http --host 0.0.0.0 # expose on the network (not recommended)The HTTP transport is stateless: every request gets its own server instance, so several agents can connect at once. It binds to 127.0.0.1 by default — anyone who can reach the port can take screenshots of your desktop, so do not expose it publicly.
Run by hand
node bin/desktop-mcp.js # MCP over stdio
node bin/desktop-mcp.js --help # usageInstall the extension
npm install
npx @vscode/vsce package
code --install-extension desktop-mcp-0.1.0.vsixOr press F5 in VS Code with this folder open to run it from source.
Platform notes
Windows / macOS / Linux (X11) — supported by
node-screenshots.Wayland — screen capture may be restricted by the compositor; X11 sessions work.
Coordinates are physical pixels. On high-DPI displays
scaleFactoris reported so you can convert from logical coordinates.
Tests
npm test # stdio + HTTP MCP servers, extension wiring against a stubbed vscode API
npm run test:e2e # real VS Code instance: registers tools, captures a screenshotThis server cannot be deployed
Maintenance
Related MCP Connectors
MCP server for visual regression testing: triage a PR's UI diffs from your coding agent.
SnapRender gives AI agents eyes on the web through a hosted MCP server. Send a public URL and get the page back as an image, a PDF or clean markdown, with no browser to run or maintain. Capture the viewport or the full page as PNG, JPEG, WebP or PDF, at desktop size or with a phone, tablet or laptop preset, in light or dark mode. Ads and cookie banners are removed by default, and you can hide elements or click one before the capture. extract_content reads the same page as markdown, text, article, links or metadata, so an agent can see a page and read it in one session. Made for monitoring and client work: batch up to 50 URLs in one job, check the cache for free before spending a capture, share signed links that render without an API key, and get webhooks when a batch finishes or a scheduled capture spots a change. Track competitors' pricing and landing pages, or send clients current screenshots of their sites. Connect with OAuth (Google, GitHub or email) or an API key. Works with Claude, ChatGPT, Cursor, VS Code and any MCP client. Free plan: 200 screenshots a month, no credit card. Paid plans from $9 a month for 2,000 up to $199 a month for 200,000. Home: https://snap-render.com Docs: https://snap-render.com/ai-agents
Grabbit gives AI agents eyes on the web through a hosted MCP server. Send a public URL and get a pixel-perfect hosted image back, without maintaining Chromium, Playwright, or a browser fleet. Capture a full page, exact viewport, or single CSS selector as PNG, JPEG, or WebP. Grabbit handles cookie and consent banners, waits for JavaScript-heavy pages, blocks private and internal URLs, supports safe retries with idempotency keys, and delivers async results through signed webhooks. Completed captures include a CDN URL. Connect with OAuth 2.1 or an API key. Grabbit works with Claude, Cursor, Codex, and any MCP client. Live captures cost $0.002 each. The $50 annual plan includes 25,000 prepaid credits that never reset or expire. Free test keys return placeholder images, so you can wire up the integration before paying. Home: https://grabbit.live Docs: https://grabbit.live/screenshot-api Built by BrainGrid.
Official Browserless MCP server: browser automation, scraping, screenshots and PDFs for AI agents.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceAn MCP server for capturing screen regions directly into Claude Code conversations via hotkeys or tool calls. It provides Windows-specific screen snipping with multi-monitor support, persistent storage, and automatic management of captured images.MIT
- AlicenseNot gradedqualityBmaintenanceOpen-source screenshot tool for Windows with a built-in MCP server that allows AI assistants like Claude to capture and view screen content through tools like take_screenshot, ask_user_to_select_region, and more.3MIT
- AlicenseNot gradedqualityDmaintenanceA Windows MCP server that enables AI agents to capture screenshots of open windows or the full desktop via stdio or HTTP.MIT
- AlicenseNot gradedqualityDmaintenanceAn MCP server that enables AI coding agents to capture screenshots of macOS windows and displays on demand, providing tools for window discovery and screen capture.9 npm2MIT