PC Controller MCP Server
Control a Windows PC through MCP using shell, file, system, process, clipboard, UI automation, and notification tools.
Execute shell commands (PowerShell, Git Bash, WSL) and long-running commands.
Read, write, list, search, zip, and extract files/folders.
Capture screenshots and retrieve system information.
List and kill running processes.
Open files/folders/URLs and get/set clipboard text.
Focus windows, type text/keystrokes, and show notifications.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@PC Controller MCP Server take a screenshot of the current screen"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
PC Controller MCP Server

Universal MCP Server for Windows PC Control
π Overview
PC Controller MCP Server is a powerful Model Context Protocol (MCP) server that enables AI assistants to control Windows PCs through a comprehensive set of tools. Built with TypeScript and Node.js, it provides seamless integration with AI clients like Claude Desktop, Cursor, Windsurf, and OpenClaude.
π― What It Does
This server bridges the gap between AI assistants and your Windows PC, allowing AI to:
Execute shell commands and scripts
Read, write, and search files
Capture screenshots and view them
Monitor system information and processes
Manage clipboard content
Open files, folders, and URLs
And much more...
π Compatibility
Works with any MCP-compatible AI client:
β Claude Desktop
β Cursor IDE
β Windsurf
β OpenClaude CLI
β ChatGPT (with appropriate configuration)
β Any MCP-compliant client
Related MCP server: Windows-MCP
β¨ Features
π οΈ 41 Powerful Tools
Tool | Description |
run_command | Execute shell commands in one-shot mode or in a persistent streaming terminal (CMD default; PowerShell, Git Bash, and WSL also supported) |
run_command_long | Run long-running commands with extended timeout (2 minutes) |
file_read | Read file contents with encoding support |
file_write | Write files with automatic directory creation |
dir_list | List directory contents with recursive option |
file_search | Search files by glob pattern recursively |
screen_capture | Capture screenshots as base64 images |
sys_info | Get comprehensive system information |
process_list | List running processes with filtering and sorting |
process_kill | Force-terminate processes by name or PID |
open_path | Open files, folders, or URLs with default applications |
clipboard_get | Read the current text content of the system clipboard |
clipboard_set | Copy text to the system clipboard |
zip_create | Compress files/folders into a .zip archive |
zip_extract | Extract a .zip archive to a folder |
window_focus | Bring a window to the foreground (by title/process name) |
key_type | Type text or send keystrokes to the focused window |
notify | Show a Windows notification balloon with a title and message |
file_edit | Surgical search & replace β edit specific text without overwriting the entire file |
file_move | Move or rename files and directories (auto-creates destination folders) |
file_info | Get file metadata β size, created/modified dates, read-only status |
file_tail | Read last N lines or bytes of a file (Unix tail equivalent) |
content_search | Search text inside files recursively (grep-like, with line numbers) |
read_multiple_files | Read contents of multiple files simultaneously |
create_directory | Create directories recursively (mkdir -p equivalent) |
copy_file | Copy files or directories to a new location |
delete_file | Delete files or directories permanently |
execute_code | Run Python/Node.js/R code in memory without saving files |
list_sessions | List active terminal sessions |
read_process_output | Read output from sessions with offset/length pagination |
interact_with_process | Send input to running interactive processes |
config_get | Get server configuration |
config_set | Update configuration values |
get_usage_stats | Get tool usage statistics |
get_recent_tool_calls | Get recent tool call history |
read_url | Fetch content from URLs (HTML, JSON, raw text) |
preview_file | Preview files with inline images (base64), markdown, and code syntax |
read_skill_docs | Read skill documentation (tool reference, workflows, examples) |
π¨ Key Capabilities
Persistent Streaming Terminals: Open a visible CMD/PTY session once, reuse it across commands, stream output in real time, and run multiple independent sessions by ID
Non-Intrusive Windows: Controller-managed terminal monitors and file/folder/URL launches remain visible without taking focus from your active application
Interactive CLI Support: PTY/ConPTY support for OpenClaude, database CLIs, prompts, full-screen terminal interfaces, and other interactive processes
Universal Compatibility: Works with any MCP-compatible AI client
Comprehensive Control: From file operations to process management
Visual Feedback: Screenshot capture with base64 encoding for AI viewing
Safe by Design: Detailed tool descriptions help AI make informed decisions
Production Ready: Fully tested (40/40 tests passing) and documented
Developer Friendly: TypeScript source code with full type safety
π Quick Start
Prerequisites
Node.js 18+ (recommended: 20+)
Windows 10/11
PowerShell 5.1+
An MCP-compatible AI client (Claude Desktop, Cursor, etc.)
Installation
# Clone or download this repository
cd pc-controller-mcp-server
# Install dependencies
npm install
# Build the project
npm run buildRunning the Server
# Production mode
npm start
# Development mode (with hot reload)
npm run dev
# Watch mode (auto-rebuild on changes)
npm run watchβοΈ Configuration
Claude Desktop
Edit: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"pc-controller": {
"command": "node",
"args": ["<path-to-repo>\\dist\\index.js"]
}
}
}Cursor IDE
Edit: ~/.cursor/mcp.json
{
"mcpServers": {
"pc-controller": {
"command": "node",
"args": ["<path-to-repo>\\dist\\index.js"]
}
}
}Windsurf
Edit: ~/.codeium/windsurf/mcp_config.json
{
"mcpServers": {
"pc-controller": {
"command": "node",
"args": ["<path-to-repo>\\dist\\index.js"]
}
}
}OpenClaude CLI
Edit: ~/.openclaude/config.json
{
"mcpServers": {
"pc-controller": {
"command": "node",
"args": ["<path-to-repo>\\dist\\index.js"]
}
}
}ChatGPT Web
For ChatGPT web access, you'll need to set up an HTTP bridge server (future enhancement). Currently, ChatGPT Desktop app may support MCP with similar configuration to Claude Desktop.
π Usage Examples
Persistent Terminal Streaming
Use terminal_open once, wait for its ready confirmation, and then reuse the same session_id with run_command. The shell process, working directory, environment, and interactive state remain alive between calls. CMD is the default shell; PowerShell, Git Bash, and WSL are also supported.
terminal_open(session_id="dev", title="OpenAI", cwd="C:\\Users\\<username>\\Projects\\app")
run_command(session_id="dev", command="npm run dev")
run_command(session_id="dev", command="status")Use a different session ID to open another independent terminal. Sessions automatically close after 10 minutes without input or output. The PTY/ConPTY backend supports interactive applications such as OpenClaude, database CLIs, prompts, and full-screen terminal interfaces. Controller-created monitor windows remain visible without taking focus from the application you are using.
Shell Commands
"Run npm install in D:\Projects\myapp"
"Execute git status"
"Check disk space with PowerShell"File Operations
"Read the contents of C:\config.json"
"Create a new file at D:\output.txt with 'Hello World'"
"List all files on my Desktop"
"Search for all .log files in D:\logs"System Information
"Show me my system information"
"What processes are using the most memory?"
"List all running Chrome processes"Screenshots
"Take a screenshot of my screen"
"Capture the screen and save it to D:\screenshots\screen.png"Process Management
"Kill the notepad process"
"Terminate process with PID 1234"Utilities
"Open https://github.com in my browser"
"Copy 'Hello World' to clipboard"
"What's currently in my clipboard?"ποΈ Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI Client (Claude, Cursor, etc.) β
β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
β β MCP Protocol (JSON-RPC 2.0) β β
β ββββββββββββββββββββββββββββββββββββββββββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ stdio transport
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β PC Controller MCP Server (Node.js) β
β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β tools/ β β tools/ β β tools/ β β
β β shell.ts β β files.ts β β system.ts β β
β β run_command β β file_read β β screen_ β β
β β run_command_ β β file_write β β capture β β
β β long β β file_edit β β sys_info β β
β β execute_code β β file_move β β process_list β β
β β β β file_info β β process_kill β β
β β β β file_tail β β open_path β β
β β β β file_search β β clipboard_* β β
β β β β content_ β β window_focus β β
β β β β search β β key_type β β
β β β β read_multi β β notify β β
β β β β dir_list β β zip_* β β
β β β β create_dir β β β β
β β β β copy_file β β β β
β β β β delete_file β β β β
β β β β preview_file β β β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
β β tools/ β β tools/ β β state.ts β β
β β sessions.ts β β admin.ts β β helpers.ts β β
β β list_sessionsβ β config_get β β (shared) β β
β β read_process_β β config_set β β β β
β β output β β get_usage_ β β β β
β β interact_ β β stats β β β β
β β with_process β β get_recent_ β β β β
β β β β tool_calls β β β β
β β β β read_url β β β β
β ββββββββββββββββ ββββββββββββββββ ββββββββββββββββ β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ PowerShell / Windows API
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Windows Operating System β
β β
β File System β Processes β Registry β Network β Clipboard β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββπ§ͺ Testing
The project includes a comprehensive test suite with 25 tests covering all tools and error handling.
# Run all tests
npm test
# Run specific test file
node test/test.jsTest Coverage
β Protocol handshake (initialize, tools/list)
β All 38 tools functionality
β Error handling (invalid commands, non-existent files, unknown tools)
β Edge cases and boundary conditions
Test Results: 40/40 passing β
π Documentation
Skill Documentation
For AI assistants, detailed skill documentation is available in:
skill/SKILL.md- Main skill file with tool overviewskill/reference/tools.md- Detailed parameter reference
API Reference
Each tool is fully documented with:
Purpose and use cases
Parameter descriptions
Return value specifications
Usage examples
Error handling
See the source code in src/index.ts for complete tool definitions.
π οΈ Development
Project Structure
pc_controller/
βββ src/
β βββ index.ts # Entry point β server bootstrap & tool registration
β βββ state.ts # Shared state (sessions, usage stats, config)
β βββ helpers.ts # Shared utilities (execAsync, formatBytes, shell builder)
β βββ tools/
β βββ shell.ts # run_command, run_command_long, execute_code
β βββ files.ts # 14 file tools (read, write, edit, search, preview, ...)
β βββ system.ts # 12 system tools (screenshot, sys_info, processes, UI, ...)
β βββ sessions.ts # list_sessions, read_process_output, interact_with_process
β βββ admin.ts # config_get/set, usage stats, recent calls, read_url
βββ dist/ # Compiled JavaScript
βββ test/
β βββ test.js # Test suite (25 tests)
βββ skill/
β βββ SKILL.md # AI skill documentation
β βββ reference/
β βββ tools.md # Detailed tool reference
βββ config/ # Configuration examples
β βββ claude-desktop.json
β βββ cursor.json
β βββ windsurf.json
β βββ openclaude.json
β βββ chatgpt-setup.md
βββ images/
β βββ banner.png # Project banner image
βββ README.md # This file
βββ package.json
βββ tsconfig.json
βββ .gitignoreBuild Commands
# Install dependencies
npm install
# Build TypeScript to JavaScript
npm run build
# Development mode with hot reload
npm run dev
# Watch mode (auto-rebuild on changes)
npm run watch
# Run tests
npm test
# Start production server
npm startTech Stack
Runtime: Node.js 18+
Language: TypeScript 5.0
MCP SDK: @modelcontextprotocol/sdk ^1.30.0
Validation: Zod ^4.4.3
Transport: stdio (universal MCP)
π Security Considerations
Current Implementation
Commands execute with user privileges
No built-in sandbox or command whitelisting
File operations can overwrite existing files
Process kill is forceful without confirmation
Best Practices
Review commands before executing destructive operations
Use absolute paths to avoid ambiguity
Backup important files before modifications
Verify process names/PIDs before killing
Test in development before production use
Future Enhancements
Command whitelisting/blacklisting
Sandbox mode for restricted operations
Confirmation prompts for dangerous actions
Audit logging for all operations
π Troubleshooting
Server Not Starting
# Check Node.js version
node --version # Should be 18+
# Rebuild the project
npm run build
# Check for errors
npm run dev # Shows detailed error messagesAI Client Not Detecting Server
Verify the path to
dist/index.jsis correct in your configRestart the AI client after config changes
Check JSON syntax in config file
Ensure Node.js is in your system PATH
Commands Failing
Verify PowerShell is available:
powershell.exe -Command "echo test"Check file permissions
Use absolute paths for all operations
Increase timeout for long-running commands
Screenshots Not Working
Ensure display/monitor is active
Check display permissions
Verify .NET Framework is available
Try running as Administrator if needed
π€ Contributing
Contributions are welcome! Areas for improvement:
Mouse and keyboard control
Window management
Security/sandbox features
HTTP/SSE transport for web clients
Additional system monitoring tools
Cross-platform support (Linux, macOS)
Development Workflow
Fork the repository
Create a feature branch
Make your changes
Run tests:
npm testSubmit a pull request
π License
MIT License - see LICENSE file for details
π Acknowledgments
Model Context Protocol - MCP specification
Anthropic - Claude and MCP development
Node.js - JavaScript runtime
TypeScript - Type-safe JavaScript
π Support
Issues: Open an issue on GitHub
Questions: Check the documentation in
skill/directoryDiscussions: Join the MCP community
πΊοΈ Roadmap
Version 2.7 (Current)
41 tools with detailed MCP descriptions
Persistent streaming terminals with independent session IDs
Windows ConPTY support for interactive CLI applications
Visible terminal monitors with ANSI/UTF-8 rendering
Non-intrusive window opening that preserves the active foreground window
Automatic session cleanup after 10 minutes of inactivity
Version 2.6
Runtime configuration management
Usage statistics and audit logging
File Preview UI with inline base64 images
Version 2.2 (Planned)
Mouse control (click, drag, scroll)
Window management (minimize, maximize, resize)
Volume control
HTTP/SSE transport for web clients
Version 3.0 (Future)
Cross-platform support (Linux, macOS)
Plugin system for custom tools
Remote PC control via SSH
Advanced automation workflows
Made with β€οΈ for the AI community
Empowering AI assistants to control Windows PCs safely and effectively
Available Tools
18 toolsclipboard_getA
Read the current text content of the Windows system clipboard (the last copied item). The clipboard is the temporary storage area for copy/paste operations. With this tool, the AI can read what's currently in the clipboard β useful to grab data copied from other applications or verify what was last copied. Returns "(clipboard is empty)" when nothing is copied.
Inputs: no named parameters.
clipboard_setA
Copy text to the Windows system clipboard so the user can immediately paste it (Ctrl+V) in any application. The clipboard is the temporary storage area for copy/paste operations. Use cases: copy command output to the clipboard, transfer text between applications, or automate copy-paste workflows. Requires the 'text' parameter with the content to copy.
Inputs: text (required).
dir_listA
List the contents of a folder/directory on this Windows PC. Shows file/folder names, type (π folder or π file), file size (in KB/MB/GB), and last modified date. Supports recursive mode to display contents of sub-folders up to 3 levels deep. Use this to explore folder structures, locate files, check file sizes, or inspect directory contents. If no path is provided, lists the user's home directory (C:\Users<username>).
Inputs: path, recursive.
file_readA
Read and return the full text contents of a file on this Windows PC. Supports all text-based files: .txt, .json, .js, .ts, .py, .md, .csv, .xml, .yaml, .html, .css, .log, .env, .ini, .bat, .ps1, .toml, and other text files. Use this to view configuration files, read source code, inspect log files, or extract data from files. Files are read in text mode with UTF-8 encoding by default. For binary files (images, videos, etc.), use a different approach. Path must be absolute (e.g., C:\Users\rayss\Documents\config.json).
Inputs: path (required), encoding.
file_searchA
Search for files on this Windows PC by name pattern (glob/wildcard). Search is performed recursively through all sub-folders. Supports wildcards like *.txt, .jpg, .json, config, report_.xlsx, and other patterns. Use this to find misplaced files, locate all files with a specific extension, discover configuration files, or audit files in a directory. Uses PowerShell Get-ChildItem for fast search performance. Results show the absolute path of each matching file found.
Inputs: pattern (required), directory, max_results.
file_writeA
Write text content to a file on this Windows PC. If the file does not exist, it will be created automatically along with any missing parent directories (auto-create directory). If the file already exists, its entire content will be overwritten (full replacement). Use this to create new configuration files, save processed data output, write source code, generate scripts, or update files by rewriting their full content. Path must be absolute. Content is written in UTF-8 encoding.
Inputs: path (required), content (required).
key_typeA
Type text or send keystrokes to the currently focused window using PowerShell SendKeys. Call window_focus first to make sure the target window is active. For literal text, pass 'text' (special characters are escaped automatically). For shortcuts and special keys, pass 'keys' as a raw SendKeys string: ^c (Ctrl+C), ^v (Ctrl+V), {ENTER}, {TAB}, {ESC}, {BACKSPACE}, {DEL}, {UP}, {DOWN}, {LEFT}, {RIGHT}, {F1}..{F12}, %{F4} (Alt+F4). Example: keys="^s" saves the focused file.
Inputs: keys, text, delay_ms.
notifyA
Show a Windows notification balloon with the given title and message. Use this tool to notify the user when a long task finishes, when something needs their attention, or to display information without opening a window. The notification stays visible for ~6 seconds.
Inputs: title (required), message (required).
open_pathA
Open a file, folder, or URL using the default application on this Windows PC. For files: opens with the registered application (e.g., .pdf in PDF reader, .jpg in image viewer, .docx in Word). For folders: opens in Windows Explorer. For URLs: opens in the default web browser. Use this to open documents, launch applications via file shortcuts, browse folders in Explorer, or open websites in the browser. Uses Windows Start-Process under the hood.
Inputs: target (required).
process_killA
Force-terminate a running process on this Windows PC. Can target by process name (kills ALL instances with that name) or by Process ID/PID (kills a specific process). The process is force-killed without confirmation. Use this to stop hung/frozen applications, close unwanted programs, or free up blocked resources. WARNING: Use with caution β killed processes cannot be recovered and any unsaved data will be lost.
Inputs: pid, name.
process_listA
Display a list of processes/applications currently running on this Windows PC. Shows process name, Process ID (PID), memory usage (in MB), and CPU time (in seconds). Can be filtered by process name (partial match) to find specific processes. Can be sorted by name, memory usage (find RAM hogs), or CPU usage (find CPU hogs). Shows the top 30 processes. Useful for monitoring, debugging, finding resource-consuming processes, or identifying processes before killing them.
Inputs: filter, sort_by.
run_commandA
Execute a shell command on this Windows PC and return its output. Use this tool to run any CLI command: package installation (npm, pip, cargo), code compilation, file management via CLI, registry queries, network diagnostics (ping, tracert, ipconfig), git operations, build scripts, or anything that can run in a terminal. Default shell is PowerShell with a timeout of 30 seconds. Returns both STDOUT and STDERR. The 'shell' parameter switches to Git Bash or WSL for Unix-style commands (ls, grep, bash scripts). WARNING: Dangerous commands will still execute β make sure the command is correct before running.
Inputs: command (required), cwd, shell, timeout.
run_command_longA
Execute a long-running shell command on this Windows PC and return all output after completion. Unlike run_command, this tool has a default timeout of 2 minutes (120 seconds) and is designed for commands that take a long time: npm install, pip install, compiling large projects, downloading big files, building projects, git clone large repositories, running test suites, or backup processes. Command runs through PowerShell.exe with a larger output buffer. Returns STDOUT, STDERR, and exit code.
Inputs: command (required), cwd, timeout.
screen_captureA
Capture a screenshot (screen grab) of the primary monitor on this Windows PC. Returns the screenshot image in PNG format as base64 data that the AI can directly view and analyze. Use cases: see what's currently displayed on screen, debug UI issues in applications, verify visual changes, create visual documentation, or monitor what's showing on the display. Screenshot is captured using .NET System.Drawing from the primary monitor at full resolution. Optionally save the screenshot to a specific file path on disk.
Inputs: output_path.
sys_infoA
Retrieve detailed and comprehensive system information about this Windows PC. Includes: hostname/computer name, OS version and architecture, uptime (how long the PC has been running), CPU model and core count, CPU clock speed, total RAM and free/used RAM (in human-readable format), disk/storage information (drive letters, used space, free space per partition), and network information (IP address per interface). Useful for diagnostics, resource monitoring, checking PC specifications, or troubleshooting system issues.
Inputs: no named parameters.
window_focusA
Bring a window to the foreground by matching its title or process name (case-insensitive). Use this tool to switch focus to a specific application window before sending keys or interacting with it. Example: "Notepad", "Visual Studio Code", "chrome" β matches any open window whose title contains the text. Returns an error if no matching window is found.
Inputs: title (required).
zip_createA
Create a ZIP archive from files or folders using PowerShell Compress-Archive. Use this tool to compress files/folders into a .zip file for backup, sharing, or archiving. Supports wildcards in source (e.g. "D:\logs*.log"). The destination path should end in .zip.
Inputs: source (required), destination (required).
zip_extractA
Extract a ZIP archive to a destination folder using PowerShell Expand-Archive. Use this tool to unzip archives. The destination folder is created automatically if it doesn't exist.
Inputs: archive (required), destination (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
TDQS
Scored across 18 tools
Most tools have clearly distinct purposes. The only notable overlap is run_command vs run_command_long, which differ primarily by timeout and use case, potentially causing misselection.
Tool names mostly follow a consistent verb_noun snake_case pattern (e.g., file_read, process_kill, zip_extract). Minor deviations like 'notify' (verb only) and 'sys_info' (abbreviated) are present but not confusing.
18 tools is a reasonable number for a PC controller server covering command execution, file operations, process management, UI automation, and clipboard. The count is well-scoped, though the two run_command variants could be consolidated.
The tool set covers many core PC control tasks, but lacks dedicated file delete/move/copy operations and direct process start. These gaps can be worked around via run_command, but would be missed in common workflows.
Maintenance
Related MCP Connectors
Connect ChatGPT, Claude, Cursor or VS Code to your Windows PC: files, terminal, browser, apps.
- DNS-DATA RemoteDeprecatedcom.dns-data
Connect AI assistants to authorized Windows and macOS devices for files, commands, and management.
Remote Desktop Commander: use files, terminal and processes on your own computers from any AI app.
Connect AI assistants to your approved computer for files, commands, browser and desktop tasks.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables AI agents to perform extensive Windows system administration, file operations, process management, network configuration, registry editing, GUI automation, and more through a comprehensive set of MCP tools.1MIT
- FlicenseNot gradedqualityDmaintenanceEnables AI agents to seamlessly integrate with the Windows operating system, performing tasks such as file navigation, application control, UI interaction, and QA testing via the MCP protocol.-
- AlicenseNot gradedqualityBmaintenanceEnables AI clients to securely control and interact with a local Windows machine through 218 configurable tools for files, Git, processes, Windows UI, browser automation, WSL, Office, recovery, skills, and child MCP servers.MIT
- FlicenseNot gradedqualityBmaintenanceEnables AI agents to control and interact with a local Windows computer through authenticated MCP tools, including file operations, shell commands, process management, HTTP requests, and system/media inspection.-