MSPaint-MCP-Server
by shettysaish20
This project automates interactions with MSPaint using the Model Context Protocol (MCP). It enables an AI agent to control the Paint application and perform tasks like drawing and adding text.
Last updated: N/A
What is MSPaint-MCP-Server?
This server implements an MCP server that allows an AI agent, powered by Google's Gemini model, to automate tasks within the MSPaint application. It defines tools for opening Paint, drawing rectangles, and adding text, which the AI agent can call through the MCP.
How to use MSPaint-MCP-Server?
- Set up a Conda environment with Python 3.11+.
- Install the required dependencies using
pip install -r requirements.txt
. - Configure your Gemini API key in a
.env
file. - Run the MCP client using
python mcp_paint_app/mcp_client.py
.
Key features of MSPaint-MCP-Server
Automates MSPaint using AI
Uses Model Context Protocol (MCP)
Leverages pywinauto for application control
Integrates with Google's Gemini model
Defines tools for drawing and text manipulation
Use cases of MSPaint-MCP-Server
Automated image creation
Scripted UI testing
AI-driven art generation
Accessibility automation
Demonstration of AI agent interaction with legacy applications
FAQ from MSPaint-MCP-Server
What is MCP?
What is MCP?
Model Context Protocol (MCP) is a framework that enables AI models to interact with external tools and resources in a standardized way.
What is pywinauto?
What is pywinauto?
pywinauto is a Python library that automates Microsoft Windows GUI. It allows you to control windows and dialogs programmatically.
How do I get a Gemini API key?
How do I get a Gemini API key?
You need to sign up for access to the Google Gemini API and obtain an API key from the Google AI Studio.
What if the AI agent isn't selecting the right tools?
What if the AI agent isn't selecting the right tools?
Review the system prompt in mcp_client.py
and ensure that the tool descriptions are accurate and clear for the AI agent.
What if I encounter permission issues?
What if I encounter permission issues?
Try running the scripts as an administrator to resolve potential permission problems.