macos-screen-mcp

macos-screen-mcp

An MCP server that lets AI assistants see your macOS desktop, capture screenshots, read browser tabs, and preview files via local macOS tools.

Category
访问服务器

README

macos-screen-mcp

npm version License: MIT macOS Node

Give AI eyes on your macOS desktop — an MCP server that lets AI assistants see your screen, read browser tabs, and capture screenshots.

Features

  • Desktop awareness — frontmost app, visible apps, window positions, screen resolution
  • Screenshot capture — full screen, specific region, or frontmost window (with configurable scale)
  • Browser tab inspection — Chrome, Safari, and Arc support (active tab or all tabs)
  • File preview — open files in default app, Chrome, or Quick Look

Requirements

  • macOS 12 (Monterey) or later
  • Node.js 18+
  • Screen Recording permission (for screenshot features only)

Installation

Quick start (recommended)

claude mcp add --transport stdio macos-screen -- npx -y macos-screen-mcp

That's it. No global install needed.

Global install

npm install -g macos-screen-mcp
claude mcp add --transport stdio macos-screen -- macos-screen-mcp

From source

git clone https://github.com/dla-kirito/macos-screen-mcp.git
cd macos-screen-mcp
npm install && npm run build
claude mcp add --transport stdio macos-screen -- node /path/to/macos-screen-mcp/dist/index.js

Cursor / Other MCP Clients

Add to your MCP config:

{
  "mcpServers": {
    "macos-screen": {
      "command": "npx",
      "args": ["-y", "macos-screen-mcp"]
    }
  }
}

Permissions Setup

Screen Recording (required for screenshots)

The first time you use capture_screen, macOS will prompt for Screen Recording permission.

  1. Open System Settings > Privacy & Security > Screen Recording
  2. Enable the toggle for your terminal app (e.g., Ghostty, iTerm2, Terminal)
  3. Restart your terminal if prompted

Automation (for browser tools)

The first time get_desktop_state or get_browser_content reads a browser's tabs, macOS will show a dialog like "<Terminal> wants to control "Google Chrome"". This is the standard macOS Automation prompt — click OK. macOS only asks once per app pair, and you can review/revoke it later under System Settings > Privacy & Security > Automation.

Note: preview_file doesn't require any special permissions — it uses the standard open command.

Available Tools

Tool Description Permissions
get_desktop_state Quick overview: frontmost app, visible apps, Chrome tabs, screen size None
capture_screen Screenshot (full / region / frontmost window), returns as image Screen Recording
get_browser_content Detailed browser tabs for Chrome, Safari, or Arc None
preview_file Open a file in default app, Chrome, or Quick Look None

Tool Details

capture_screen supports a scale parameter (0–1, default 0.5) to reduce image size before sending to the LLM, saving tokens while preserving enough detail for most tasks.

get_browser_content can return just the active tab per window (default) or all tabs with include_all_tabs: true.

How It Works

The server communicates with AI clients over stdio using the Model Context Protocol. Under the hood it uses:

  • AppleScript (osascript) to query desktop state, window bounds, and browser tabs
  • screencapture (macOS built-in) to take screenshots
  • sips to downscale images before returning them as base64 PNG

All operations are read-only — the server never modifies your files, settings, or browser state.

┌─────────────┐   stdio/MCP   ┌──────────────────┐   AppleScript   ┌─────────┐
│  AI Client   │◄────────────►│  macos-screen-mcp │◄──────────────►│  macOS   │
│ (Claude etc) │              └──────────────────┘   screencapture  │ Desktop  │
└─────────────┘                                                     └─────────┘

Security

  • All tool inputs are validated via Zod schemas
  • Application names are restricted to safe characters (no shell/AppleScript injection)
  • File operations use execFile with argument arrays (no shell interpolation)

Privacy

This server runs locally and does not send data to any remote service of its own. However, by design it lets your AI assistant see parts of your desktop, and whatever the AI sees is sent to the LLM provider you've configured (Anthropic, your Cursor backend, etc.) as part of normal MCP tool responses.

What each tool exposes:

  • get_desktop_state — frontmost app, list of visible apps, Chrome window URLs and titles, window positions, screen resolution
  • get_browser_content — for the chosen browser: every window's active tab URL and title (and all tabs if include_all_tabs=true)
  • capture_screen — raw pixels of your screen / a region / the frontmost window, sent as a base64 PNG
  • preview_file — only opens the file locally; no file contents are read or transmitted by this server

Treat anything visible on screen or in a browser tab as something the AI may receive. Avoid calling these tools while password managers, private chats, banking sites, or other sensitive content are visible. Most MCP clients let you disable individual tools per session if you want a temporary lockdown.

Known Limitations

  • macOS only — relies on AppleScript and macOS-specific commands
  • Browser inspection requires the target browser to be running
  • capture_screen requires explicit Screen Recording permission
  • Arc browser only supports active tab queries (no include_all_tabs)

Contributing

git clone https://github.com/dla-kirito/macos-screen-mcp.git
cd macos-screen-mcp
npm install
npm run build    # TypeScript → dist/
npm run lint     # Type-check without emitting

License

MIT

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选