windows-context-mcp

windows-context-mcp

Enables AI agents to access real-time Windows PC context including active window, system performance, screen time, productivity analytics, and historical usage through MCP tools.

Category
访问服务器

README

Windows Context MCP 🪟⚡

Windows Context MCP is a high-performance, native backend service and Model Context Protocol (MCP) server for Windows. It exposes real-time PC activity, focused foreground application telemetry, system resource stats, and historical productivity analytics to AI agents like Google Gemini, OpenAI ChatGPT, and Claude.


🌟 Backend Features & Architecture

  • 🗄️ Zero-Dependency SQLite Time-Series Engine (src/db.ts): Built on native node:sqlite for high-throughput persistence, indexed minute-by-minute focus session recording, and fast historical aggregations.
  • 🔄 Dual Transport Support:
    • Streamable HTTP / JSON-RPC 2.0 (src/server.ts): REST + JSON-RPC on port 3001 for remote AI assistants (Gemini remote MCP & ChatGPT Actions).
    • Native STDIO Transport (src/stdio.ts): Fast standard I/O stream for Claude Desktop, Cursor, and local CLI agents (node dist/index.js --stdio).
  • 🪟 Win32 Native Interop (src/collector.ts): Direct User32 / CIM queries for active window titles, process binaries, CPU delta utilization, RAM usage, user idle detection, and battery telemetry.
  • 📈 Advanced Productivity & Transition Tracking (src/tracker.ts): Hourly breakdown curves, 24-hour timelines, transition chains, and multi-day date range analytics.
  • 🧪 Automated Test Suite: 17 unit and integration tests across storage, telemetry, and tools (npm test).

🛠️ MCP Tools Reference (12 Tools)

Tool Name Type Description
get_current_windows_context Real-time Full real-time snapshot: active window, screen time, CPU/RAM telemetry, battery.
get_active_window Real-time Focused foreground window title, process name, and category.
get_pc_screen_time Aggregation Today's screen time categorized by Productive, Entertainment, Communication, Browsing.
get_pc_performance Telemetry CPU load %, RAM total/free/used %, battery charge %, and AC state.
get_productivity_score Analytics Automated productivity score (0-100), balance ratio, and top distraction apps.
search_window_history Search Search application usage history today by process or window title query.
get_idle_status Presence User presence & idle duration (detects if user is actively typing or away).
get_recent_transitions Chain Chronological sequence of recent window and application switches.
get_system_health Diagnostics System resource health check, memory pressure level, and uptime.
get_top_distractions Analytics Identifies entertainment and distraction apps consuming the most time today.
get_hourly_breakdown Historical 24-hour timeline of productive vs entertainment minutes per hour for any date.
get_historical_usage Historical Multi-day productivity scores, duration trends, and top apps across a date range.

🚀 Quick Start

1. Build

npm install
npm run build

2. Run Tests

npm test

3. Run Backend in HTTP Mode (for Gemini & ChatGPT)

npm start

HTTP server starts on port 3001 with endpoint http://localhost:3001/mcp.

4. Run Backend in STDIO Mode (for Claude Desktop & Local MCP Clients)

node dist/index.js --stdio

🔗 Claude Desktop Configuration (claude_desktop_config.json)

{
  "mcpServers": {
    "windowsContext": {
      "command": "node",
      "args": ["C:/Users/smnk2/.gemini/antigravity/scratch/windows-context-mcp/dist/index.js", "--stdio"]
    }
  }
}

🔗 Google Gemini Configuration

{
  "mcpServers": {
    "windowsContext": {
      "url": "http://localhost:3001/mcp",
      "transport": "http"
    }
  }
}

📄 License

MIT License.

推荐服务器

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 模型以安全和受控的方式获取实时的网络信息。

官方
精选