Skip to main content
Glama

Windows Seek-n-Control

License: MIT Python 3.10+ MCP

A powerful Windows automation MCP (Model Context Protocol) server that enables AI agents to control Windows applications. Provides tools for capturing screenshots with OCR, clicking, and typing in any window.

🤖 Built for AI Agents - Seamlessly integrates with Claude Desktop, LM Studio, and any MCP-compatible LLM client.

🚀 Features

Tool

Description

list_windows

List all visible windows with titles and dimensions

get_window_info

Get detailed info about a specific window

snap_window

Capture screenshot + OCR text extraction

click_window

Click at window-relative coordinates

type_in_window

Type text or send keystrokes (supports combos like Ctrl+S)

get_available_keys

List all available key names

Related MCP server: pov

📦 Prerequisites

  1. Python 3.10+

  2. Tesseract OCR (Required for text extraction)

  3. Install dependencies:

    pip install -r requirements.txt

    Or with uv:

    uv sync

🤖 MCP Server Configuration

Claude Desktop

Add to your Claude Desktop config file:

Windows: %APPDATA%\Claude\claude_desktop_config.json
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "windows-control": {
      "command": "python",
      "args": ["c:/Users/izzat/Desktop/tmpp/windows-seek-n-control/server.py"]
    }
  }
}
{
  "mcpServers": {
    "windows-control": {
      "command": "uv",
      "args": ["run", "--directory", "c:/Users/izzat/Desktop/tmpp/windows-seek-n-control", "python", "server.py"]
    }
  }
}

Generic MCP Client

{
  "mcpServers": {
    "windows-control": {
      "type": "stdio",
      "command": "python",
      "args": ["/path/to/server.py"],
      "env": {}
    }
  }
}

LM Studio / Other Agents

For agents that support MCP, configure the stdio transport:

  • Command: python

  • Arguments: ["path/to/server.py"]

  • Transport: stdio


🛠️ Development & Testing

Run with MCP Inspector

# Start the development server with inspector UI
uv run mcp dev server.py

# Or without uv
npx -y @modelcontextprotocol/inspector python server.py

Direct Execution

# Run the server directly (will wait for JSON-RPC input on stdin)
python server.py

Install in Claude Desktop

uv run mcp install server.py --name "Windows Control"

📖 Tool Usage Examples

List Windows

{
  "tool": "list_windows",
  "arguments": {}
}

Capture Screenshot with OCR

{
  "tool": "snap_window",
  "arguments": {
    "window_title": "Notepad",
    "extract_text": true,
    "output_path": "C:/screenshots/notepad.png"
  }
}

Click in Window

{
  "tool": "click_window",
  "arguments": {
    "window_title": "Chrome",
    "x": 100,
    "y": 200,
    "button": "left",
    "double_click": false
  }
}

Type Text

{
  "tool": "type_in_window",
  "arguments": {
    "window_title": "Notepad",
    "text": "Hello, World!"
  }
}

Send Keyboard Shortcut

{
  "tool": "type_in_window",
  "arguments": {
    "window_title": "Notepad",
    "keys": ["ctrl+s"]
  }
}

🔧 CLI Tools (Legacy)

The original command-line tools are still available:

📸 Snap Tool (snap.py)

python snap.py "notepad"                    # Capture & OCR
python snap.py "report.pdf" -o evidence.png # Custom output

🖱️ Click Tool (click_tool.py)

python click_tool.py "notepad" --x 100 --y 200           # Left click
python click_tool.py "explorer" --x 50 --y 50 --double   # Double click
python click_tool.py "chrome" --x 300 --y 150 --right    # Right click
python click_tool.py --list                               # List windows

⌨️ Type Tool (type.py)

python type.py "notepad" --text "Hello World"  # Type text
python type.py "word" --key ctrl+s             # Save shortcut
python type.py "chrome" --text "search" --key enter
python type.py --keys                          # List available keys

❓ Troubleshooting

Issue

Solution

"Window not found"

Use partial titles. Run list_windows to see available windows

OCR not working

Install Tesseract OCR from the link above

Clicks missing

Ensure window is not covered by admin-level apps

MCP connection failed

Check the path in your config is correct and absolute

"MCP SDK not installed"

Run pip install 'mcp[cli]'


🤝 Contributing

Contributions are welcome! Here's how you can help:

  1. Fork the repository

  2. Create a feature branch (git checkout -b feature/amazing-feature)

  3. Commit your changes (git commit -m 'Add amazing feature')

  4. Push to the branch (git push origin feature/amazing-feature)

  5. Open a Pull Request

Ideas for Contributions

  • Additional MCP tools (drag & drop, scroll, etc.)

  • Better error handling and recovery

  • Support for multi-monitor setups

  • Performance optimizations


📄 License

This project is licensed under the MIT License - see the LICENSE file for details.


🙏 Acknowledgments

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      A
      quality
      D
      maintenance
      Enables LLM agents to capture screenshots, control mouse/keyboard, and manage windows on desktop platforms, primarily Windows, via an MCP server.
      16
      1
      MIT
    • A
      license
      Not graded
      quality
      C
      maintenance
      Enables AI clients on Windows to control the local mouse, keyboard, and screen understanding via MCP stdio, allowing automated workflows like viewing the screen, locating elements, clicking, typing, and verifying results.
      1
      Apache 2.0