DeskSense
DeskSense
DeskSense 是一个轻量级、只读的 Windows MCP 服务器,让 AI 助手能够感知当前 PC 的状态。
它通过本地服务器暴露 MCP Streamable HTTP,并由 Bearer Token 保护。CORS 可配置,支持基于浏览器的客户端。当节点需要受控的公共访问时,可选择使用 Cloudflare Tunnel。
DeskSense 是什么
在你想要观察的每台 Windows PC 上运行一个独立的 DeskSense 节点。节点读取桌面和系统状态;它不执行命令或修改计算机。
Related MCP server: procmon-mcp
特性
仅限 Windows,只读的 PC 感知
MCP Streamable HTTP 端点位于
/mcpBearer Token 认证
可配置的 CORS 来源
可选的 Cloudflare Named 或 Quick Tunnel 访问
通过任务计划程序实现交互式 AtLogOn 自动启动
通过
wscript.exe实现隐藏的服务器启动本地健康端点位于
/healthz
MCP 工具
服务器正好提供以下七个只读工具:
pc_get_contextpc_get_focuspc_list_open_appspc_get_idle_statuspc_get_pc_statuspc_get_top_processespc_get_recent_focus
架构
AI assistant / MCP client
|
| HTTPS + Bearer Token (optional public tunnel)
v
Cloudflare Tunnel (optional)
|
v
127.0.0.1:8765 -> python -m desksense.server
|
+--> Windows APIs, psutil, and local focus history每台计算机都有自己的令牌、配置、运行时数据和可选的隧道。SullyOS 是一个经过测试的示例客户端,并非必需或独占的客户端。
要求
Windows 10 或更新版本
Python 3.11 或更新版本
仅在使用隧道时需要
cloudflared兼容的 MCP 客户端
快速开始
在 PowerShell 中从仓库根目录执行:
python -m venv .venv
.\.venv\Scripts\python.exe -m pip install -r requirements.txt
$env:PYTHONPATH = "src"
.\.venv\Scripts\python.exe -m desksense.server如需完整的节点安装,包括令牌生成、CORS、隧道配置和自动启动任务:
.\scripts\install.ps1 `
-Hostname desksense.example.com `
-TunnelName desksense当浏览器客户端需要额外的来源时,使用 -AllowedOrigin https://example-client.app。安装程序会打印 MCP URL 和令牌文件路径,但不会打印令牌。
Cloudflare Tunnel
Cloudflare 是可选的。使用 Quick Tunnel 进行临时测试:
.\scripts\start-quick-tunnel.ps1如需稳定的主机名,请认证 cloudflared,创建或选择 Named Tunnel,并在安装后使用 start-named-tunnel.ps1。将隧道指向 http://127.0.0.1:8765,仅暴露预期的 hostname。
连接 MCP 客户端
使用以下配置客户端:
MCP URL:
https://desksense.example.com/mcp(本地使用http://127.0.0.1:8765/mcp)认证:
Bearer <token>
令牌本地存储在 .secrets\API_KEY.txt 中。SullyOS 可作为示例客户端;任何支持 Streamable HTTP 和 bearer 认证的 MCP 客户端都可以连接。
多台 PC / 节点
每台 Windows PC 安装一个 DeskSense 节点。为每个节点分配不同的 hostname、隧道名称和令牌,然后在客户端中分别配置每个 MCP 端点。除非使用文档记录的迁移工作流,否则不要在不同计算机之间复制节点的运行时数据库或凭据。
安全与隐私
DeskSense 是只读的,但其响应可能包含应用程序名称、窗口标题、进程信息和系统指标。请保持 Bearer Token 的私密性,将 AllowedOrigin 限制为受信任的客户端,并将公共访问放在正确配置的隧道背后。令牌不会写入源代码或日志。焦点历史记录本地存储在 data\pc_sense.db 中;日志写入 logs\ 目录下。
自动启动
安装程序会注册一个名为 DeskSense MCP 的交互式 AtLogOn 任务。它启动 wscript.exe,进而运行 run-desksense-hidden.vbs;VBS 脚本调用 python.exe -m desksense.server,且不显示控制台窗口。
.\scripts\install-autostart.ps1
.\scripts\status.ps1
.\scripts\uninstall-autostart.ps1交互式登录是故意的,因为桌面感知需要用户的 Windows 会话。
故障排除
检查本地健康状态:
Invoke-WebRequest http://127.0.0.1:8765/healthz检查端口 8765 的监听器和本地健康端点:
.\.scripts\status.ps1查看
logs\下的文件(切勿分享.secrets\)直接从仓库运行时确认
PYTHONPATH=src确认客户端发送
Authorization: Bearer <token>并使用/mcp对于隧道问题,请验证
cloudflared登录、hostname 路由,并且确保只有一个节点运行 Named Tunnel
开发
.\.venv\Scripts\python.exe -m pytest -q源代码位于 src/desksense;测试位于 tests。服务器可以在本地使用 PYTHONPATH=src 运行,如上所示。
许可证
DeskSense 根据 MIT 许可证发布。请参阅 LICENSE。
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceA comprehensive MCP server that gives AI assistants full control over your desktop — monitor system resources, manage windows, capture screenshots, control the clipboard, launch applications, and more.MIT
- AlicenseBqualityDmaintenanceAn MCP server that provides AI assistants with real-time access to Windows internals including processes, kernel traces, event logs, services, drivers, and PE analysis.1879MIT
- Flicense-qualityDmaintenanceA lightweight MCP HTTP server giving AI assistants real tools to interact with your Windows machine, including running commands, file access, system info, web search, and browser automation.1
- Alicense-qualityCmaintenanceAn open-source MCP server for Windows that provides traceable system operations (file, screenshot, clipboard, process, power management) to AI assistants via HTTP/SSE.11GPL 3.0
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.
Pocket Agent (aipocketagent.com) MCP server — read tools for personas, apps, and product info.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChituQAQ/desksense-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server