Token导航 LogoToken导航

MCP Server · 运维云端

Linux Desktop MCP Server

一个为Linux桌面应用提供Chrome扩展级别语义元素定位的MCP服务器,支持AT-SPI2接口,适用于跨平台输入和自动化任务。

stdio官方级别未说明来源级核验工具 6
PythonClaude云端部署VS Code

快速开始

作者 / 组织
BeckhamLabsLLC
提供方
BeckhamLabsLLC

工具数量

6

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

6

仓库热度

收录来源

2 个

MCP World

选型结论

Linux Desktop MCP Server 属于运维云端类 MCP Server,公开资料标注 6 个工具,通过stdio 本地进程接入,适配 Claude、VS Code,有可以直接复制的安装命令;接入前先确认权限范围。

分类

运维云端

传输方式

stdio

认证方式

无需认证

部署方式

仅本地运行

安装与配置

安装命令

pip install linux-desktop-mcp

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 对应的运行时,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 6 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

Linux桌面MCP服务器

建于 克劳德代码 -整个MCP服务器是使用Anthropic的人工智能编码助手Claude Code开发的。我们很自豪能够展示人工智能辅助开发的可能性!

一个MCP服务器,使用AT-SPI2(辅助技术服务提供商接口)为本地Linux桌面应用程序提供Chrome扩展级语义元素。

特性

  • 语义元素引用:就像Chrome扩展程序一样 ref_1, ref_2 系统
  • 角色检测:标识按钮、文本字段、链接、菜单等。
  • 状态检测:跟踪聚焦、启用、选中、可编辑状态
  • 自然语言搜索:按描述查找元素(“保存按钮”、“搜索字段”)
  • 跨平台输入:适用于X11、Wayland和XWayland
  • GTK/Qt/Electron支持:适用于任何公开可访问性的应用程序

安装

系统相关性

# Ubuntu/Debian
sudo apt install python3-pyatspi gir1.2-atspi-2.0 at-spi2-core

# For X11 input simulation
sudo apt install xdotool

# For Wayland input simulation (recommended)
# Install ydotool from source or your package manager
# Then start the daemon:
sudo ydotoold &

Python包

# From PyPI
pip install linux-desktop-mcp

# Or from source
git clone https://github.com/BeckhamLabsLLC/linux-desktop-mcp.git
cd linux-desktop-mcp
pip install -e .

启用辅助功能

确保在桌面环境中启用了可访问性:

  • GNOME:设置→ 无障碍→ 启用辅助功能
  • KDE:系统设置→ 无障碍
  • 大多数现代台式机默认启用了此功能

配置

增添 ~/.claude/settings.json:

{
  "mcpServers": {
    "linux-desktop": {
      "command": "linux-desktop-mcp"
    }
  }
}

或者,如果从源代码安装:

{
  "mcpServers": {
    "linux-desktop": {
      "command": "python",
      "args": ["-m", "linux_desktop_mcp"]
    }
  }
}

可用工具

desktop_snapshot

使用语义元素引用捕获可访问性树。

Parameters:
  app_name: str (optional) - Filter to specific application
  max_depth: int (default: 15) - Tree traversal depth

Returns:
  Tree of elements with ref_ids:
  - ref_1: [application] Firefox
    - ref_2: [frame] "GitHub - Mozilla Firefox"
      - ref_3: [button] "Back" (clickable)
      - ref_4: [entry] "Search or enter address" (editable, focused)

desktop_find

通过自然语言查询查找元素。

Parameters:
  query: str - "save button", "search field", "menu containing File"
  app_name: str (optional)

Returns:
  Matching elements with refs, states, and actions

desktop_click

按参照或坐标单击图元。

Parameters:
  ref: str - Element reference (e.g., "ref_5")
  element: str - Human description for logging
  coordinate: [x, y] - Fallback if no ref
  button: left|right|middle
  click_type: single|double
  modifiers: [ctrl, shift, alt, super]

desktop_type

在元素中键入文本。

Parameters:
  text: str - Text to type
  ref: str - Element to focus first (optional)
  element: str - Human description
  clear_first: bool - Ctrl+A, Delete before typing
  submit: bool - Press Enter after

desktop_key

按键盘键/快捷键。

Parameters:
  key: str - Key name (Return, Tab, Escape, a, etc.)
  modifiers: [ctrl, shift, alt, super]

desktop_capabilities

检查可用的自动化功能。

示例用法

示例1:在Firefox中导航到网站

User: "Open GitHub in Firefox"

Claude uses:
1. desktop_snapshot(app_name="Firefox")
   → Returns UI tree with elements like:
     - ref_5: [entry] "Search or enter address" (editable, focused)
     - ref_12: [button] "Go" (clickable)

2. desktop_click(ref="ref_5", element="URL bar")
   → Clicks to focus the address bar

3. desktop_type(text="https://github.com", ref="ref_5", clear_first=True, submit=True)
   → Types the URL and presses Enter

Result: Firefox navigates to GitHub

示例2:在LibreOffice中保存文件

User: "Save this document as 'report.odt'"

Claude uses:
1. desktop_key(key="s", modifiers=["ctrl"])
   → Opens the Save dialog

2. desktop_snapshot(app_name="LibreOffice")
   → Returns dialog elements including:
     - ref_8: [entry] "File name:" (editable)
     - ref_15: [button] "Save" (clickable)

3. desktop_type(text="report.odt", ref="ref_8", clear_first=True)
   → Types the filename

4. desktop_click(ref="ref_15", element="Save button")
   → Clicks Save

Result: Document saved as report.odt

示例3:在代码编辑器中搜索

User: "Search for 'TODO' comments in VS Code"

Claude uses:
1. desktop_find(query="search", app_name="Code")
   → Finds search-related elements

2. desktop_key(key="f", modifiers=["ctrl", "shift"])
   → Opens global search panel

3. desktop_snapshot(app_name="Code")
   → Returns search panel elements:
     - ref_22: [entry] "Search" (editable, focused)
     - ref_25: [checkbox] "Match Case"

4. desktop_type(text="TODO", ref="ref_22", submit=True)
   → Types search query and executes search

Result: VS Code shows all TODO comments across the project

示例4:多窗口自动化的窗口定位

User: "Help me copy data from the spreadsheet to the email"

Claude uses:
1. desktop_context(list_available=True)
   → Lists all available windows

2. desktop_target_window(app_name="LibreOffice Calc", color="green")
   → Targets spreadsheet with green border

3. desktop_target_window(app_name="Thunderbird", color="blue")
   → Targets email client with blue border

4. desktop_snapshot()
   → Only shows elements from targeted windows (reduced context)

5. [Proceeds with copy/paste operations between windows]

Result: Claude can efficiently work across multiple applications

平台支持

特征X11WaylandXWayland
AT-SPI发现已满已满
点击参照完整完整完全
键入文本完整完整完全
ydotool输入满满全
xdotool输入满否是

故障排除

“AT-SPI2不可用”

sudo apt install python3-pyatspi gir1.2-atspi-2.0 at-spi2-core

“AT-SPI2注册表未运行”

确保在桌面设置中启用了可访问性。您可能需要注销并重新登录。

“没有可用的输入后端”(Wayland)

# Install and start ydotool daemon
sudo ydotoold &

元素未显示

某些应用程序可能不会公开可访问性信息。现代的GTK3/4、Qt5/6和Electron应用程序通常运行良好。

建筑

┌─────────────────────────────────────────────────────────────┐
│                     MCP Protocol Layer                       │
│              (JSON-RPC over stdio, tool defs)                │
└─────────────────────────────────────────────────────────────┘
                              │
┌─────────────────────────────────────────────────────────────┐
│                  Reference Manager                           │
│          (ref_1, ref_2 mapping, lifecycle, GC)              │
└─────────────────────────────────────────────────────────────┘
                              │
          ┌───────────────────┴───────────────────┐
          │                                       │
┌─────────────────────┐             ┌─────────────────────────┐
│   AT-SPI2 Backend   │             │   Input Backends        │
│     (pyatspi)       │             │ (ydotool/xdotool/wtype) │
└─────────────────────┘             └─────────────────────────┘

贡献

这个项目是用Claude Code创建的,我们热烈欢迎您的贡献!您是否愿意:

  • 报告错误或请求功能
  • 提交拉取请求
  • 分叉并构建自己的版本
  • 改进文档

我们非常愿意提供帮助和合作。看 贡献.md 作为指导方针。

隐私政策

看 隐私政策.md 了解我们的完整隐私政策。简而言之:Linux Desktop MCP完全在您的本地计算机上运行,不收集任何数据,也不需要网络连接。

许可证

麻省理工学院-参见 许可证 了解详情。

工具与能力

工具数量

6

资源数量

0

提示词数量

0

能力标签

Linux桌面自动化Python本地部署语义元素定位AT-SPI2接口跨平台输入GTK/Qt/Electron支持

支持客户端

ClaudeVS Code

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

看服务状态

查询容器、日志和监控指标,定位异常。

执行部署变更

在权限范围内触发发布、回滚和环境切换。

核对资源用量

汇总用量,找出闲置和超额的部分。

选择建议

值得选的地方

  • 只提供 6 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 已经适配 Claude、VS Code,换客户端不用重新研究配置。

先想清楚的地方

  • stdio 方式要求本地装好 运行环境,换机器要重新装一遍。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 已经在用 Claude 的用户,接入路径最短。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Linux Desktop MCP Server

MCP World · 本页

6stdio有2 个2026-05-17
Ui Tars Desktop 8a825770

MCP World

0stdio有1 个2026-05-17
Elie222 MCP

MCP World

0未说明未标注1 个2026-05-17
Arizeai Phoenix MCP

MCP World

0stdio有3 个2026-05-17
Unity MCP 87ee506e

MCP World

42HTTP有2 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Linux Desktop MCP Server 怎么安装?

公开资料给出的安装命令是 pip install linux-desktop-mcp,运行环境为 未标注。装完后按客户端要求写进 MCP 配置,重启客户端生效。

Linux Desktop MCP Server 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Linux Desktop MCP Server 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Linux Desktop MCP Server 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

Linux Desktop MCP Server 支持哪些客户端?

公开资料标注支持 Claude、VS Code;其他客户端只要能配置 MCP Server,也能用同样的命令或地址接入。

来源信息

继续浏览同类 MCP