mcp-screenshot-server
MCP Screenshot Server is a microservice designed for capturing screenshots on Windows systems, integrating seamlessly with AI tools and automation workflows. It's MCP-compatible and built on FastAPI, supporting full-screen, region-specific, and window-based screenshot captures.
๐ผ๏ธ MCP Screenshot Server
A lightweight, MCP-compatible screenshot microservice built with FastAPI for Windows.
It allows AI agents and automation tools to capture full-screen, region-based, or window-specific screenshots via simple HTTP calls.
๐ง Features
- ๐ธ Capture full-screen screenshots
- ๐ช Capture specific window by title
- ๐ฒ Capture custom regions
[x, y, width, height]
- ๐ง MCP-compliant REST API
- ๐ผ๏ธ Returns images as PNG or base64
- ๐ Built with FastAPI, ready for production or LLM use
๐ง Use Cases
- Integrating with LLMs using Model Context Protocol (MCP)
- QA test automation pipelines
- Monitoring and remote capture tools
- Visual logging/debugging tools for agents
๐ฆ Installation
git clone https://github.com/yourusername/mcp-screenshot-server.git
cd mcp-screenshot-server
python -m venv .venv
source .venv/bin/activate # or .venv\Scripts\activate on Windows
pip install -r requirements.txt
uvicorn main:app --reload
๐ API Usage
POST /screenshot
Request JSON body:
{
"region": [0, 0, 1280, 720], // optional
"window_title": "Untitled - Notepad", // optional
"base64": true // optional (default: false)
}
Response (base64 mode):
{
"status": "ok",
"mode": "region",
"image_format": "base64",
"image": "<base64-encoded-image>"
}
๐ ๏ธ Tech Stack
- Python 3.11+
- FastAPI
mss
orpyautogui
for screenshotpillow
for image processingpygetwindow
for window matching (optional)
๐ License
MIT License.
Feel free to use, fork, and integrate โ commercial or personal.
See for details.
๐ฌ Contributing
Pull requests and issues welcome!
Open a PR to add features or improve compatibility across platforms (e.g., Mac/Linux support).
๐ FAQ
-
Does it work on Linux/macOS?
Not yet. This version is Windows-focused, but youโre welcome to extend it. -
Is it MCP-certified?
This project aims to follow the MCP spec as closely as possible for maximum compatibility with LLM agents.
๐ง Inspired By
- Anthropicโs Model Context Protocol
- Real-world automation use cases powered by LLMs and Python
Would you like me to tailor a specific section to emphasize AI agent use (e.g., โhow to use with o1 or GPT-4o via pluginโ)?