trackmcp
Back to directory
kblood

MCPComputerUse

View on GitHub

MCPComputerUse

2 stars C#Others Updated Apr 5, 2026

Documentation

MCPComputerUse - C# Computer Use MCP Server

A native C# implementation of a Computer Use MCP Server for Windows, providing superior automation capabilities through direct Windows API integration.

๐Ÿš€ Features

  • Screenshot Capture: Multi-monitor support with flexible targeting
  • Window Management: Complete window enumeration and control
  • Mouse Automation: Precise clicking, moving, and scrolling
  • Keyboard Automation: Text typing and key combinations
  • Macro System: Complex automation sequences
  • MCP Protocol: Full compliance with MCP specification
  • High Performance: Native Windows API integration
  • Zero Dependencies: Self-contained executable

๐Ÿ› ๏ธ Tools Available

Screenshot Tools

  • `computer-use:take_screenshot` - Take screenshots with flexible targeting
  • Support for multi-monitor setups
  • Window-specific captures
  • Configurable output formats

Window Management

  • `computer-use:list_windows` - List all visible windows
  • `computer-use:get_active_window` - Get currently active window info
  • `computer-use:focus_window` - Focus a window by ID or name
  • `computer-use:manage_window` - Minimize, maximize, restore windows

Input Automation

  • `computer-use:mouse_click` - Click at coordinates with button options
  • `computer-use:mouse_move` - Move mouse to coordinates
  • `computer-use:type_text` - Type text with Unicode support
  • `computer-use:press_key` - Press keys with modifier support
  • `computer-use:scroll` - Scroll at specific coordinates

Macro System

  • `computer-use:run_macro` - Execute complex automation sequences
  • Support for all automation actions
  • Error handling and reporting
  • Configurable timing

System Info

  • `computer-use:get_server_capabilities` - Get server capabilities and status

๐Ÿ—๏ธ Architecture

Core Components

  • MCPComputerUse.exe - Main console application with MCP protocol
  • WindowsAutomation.dll - Native Windows API automation library
  • MCPProtocol.dll - MCP specification implementation

Technology Stack

  • .NET 8.0 - Latest LTS framework
  • Windows Forms - For screen capture support
  • System.Drawing - Image manipulation
  • Newtonsoft.Json - JSON serialization
  • Native Windows APIs - Direct P/Invoke integration

๐Ÿ“ฆ Installation

Prerequisites

  • Windows 10 or Windows 11
  • No additional runtime required (self-contained)

Download

1. Download the latest release from GitHub

2. Extract `MCPComputerUse.exe` to your desired location

3. No installation required - single executable file

Claude Desktop Integration

Add to your Claude Desktop configuration:

json
{
  "mcpServers": {
    "computer-use": {
      "command": "c:/path/to/MCPComputerUse.exe",
      "args": []
    }
  }
}

๐Ÿ”ง Building from Source

Requirements

  • Visual Studio 2022 or VS Code with C# extension
  • .NET 8.0 SDK
  • Windows 10/11 development machine

Build Steps

bash
# Clone the repository
git clone 
cd MCPComputerUse

# Restore dependencies
dotnet restore

# Build solution
dotnet build --configuration Release

# Publish self-contained executable
dotnet publish src/MCPComputerUse -c Release -r win-x64 --self-contained -o ./publish

The resulting executable will be in the `./publish` folder.

๐Ÿ“– Usage Examples

Taking Screenshots

json
{
  "method": "tools/call",
  "params": {
    "name": "computer-use:take_screenshot",
    "arguments": {
      "target": "screen",
      "filename": "desktop_capture"
    }
  }
}

Automating Mouse Clicks

json
{
  "method": "tools/call", 
  "params": {
    "name": "computer-use:mouse_click",
    "arguments": {
      "x": 500,
      "y": 300,
      "button": "left",
      "clicks": 2
    }
  }
}

Running Macros

json
{
  "method": "tools/call",
  "params": {
    "name": "computer-use:run_macro",
    "arguments": {
      "commands": [
        {
          "action": "click",
          "x": 100,
          "y": 100
        },
        {
          "action": "type",
          "text": "Hello World"
        },
        {
          "action": "key",
          "key": "enter"
        }
      ]
    }
  }
}

๐Ÿ” Troubleshooting

Common Issues

Permission Errors

  • Ensure the executable has permission to capture screens
  • Some applications may require running as administrator

Window Focus Issues

  • UAC-protected applications may not respond to focus commands
  • Try using window IDs instead of window titles for better reliability

Screenshot Capture Problems

  • Check display index for multi-monitor setups
  • Verify target window exists and is visible

Logging

The application logs to console output. Use the following log levels:

  • Information: General operation status
  • Debug: Detailed execution information
  • Error: Error conditions and failures

๐Ÿš€ Performance

Benchmarks

  • Screenshot capture:

cd MCPComputerUse

Install dependencies

dotnet restore

Run tests

dotnet test

Start development

code .

code
## ๐Ÿ“‹ Roadmap

### Upcoming Features
- **OCR Integration** - Text recognition from screenshots
- **Image Matching** - Find UI elements by template
- **Macro Recording** - Record user actions automatically
- **Plugin System** - Extensible architecture
- **UI Automation** - Windows accessibility API integration

### Performance Improvements
- **Async Operations** - Better responsiveness
- **Caching** - Reduced API calls
- **Optimization** - Faster screenshot capture

## ๐Ÿ“„ License

This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.

## ๐Ÿ™ Acknowledgments

- Microsoft for the .NET platform
- Anthropic for the MCP specification
- The open-source community for inspiration and libraries

## ๐Ÿ“ž Support

For support and questions:
- Create an issue on GitHub
- Check the troubleshooting guide
- Review existing issues and discussions

---

**Built with โค๏ธ for the Windows automation community**

Frequently asked questions

What is MCPComputerUse?

MCPComputerUse is MCPComputerUse

How do I install MCPComputerUse?

Open the GitHub repository and follow its README. Most MCP servers are added to your client's MCP config, then called by your agent.

Is MCPComputerUse open source?

Yes โ€” it is hosted on GitHub at https://github.com/kblood/MCPComputerUse and has 2 stars.

Related MCP tools

Run your own MCP server? See who uses it and what to fix.

Measure it with TrackMCP