- Explore MCP Servers
- paint-ai-agent
Paint Ai Agent
What is Paint Ai Agent
Paint-ai-agent is an automation tool that leverages Google’s Gemini AI to control Microsoft Paint through natural language commands, allowing users to create drawings and manipulate the application without manual input.
Use cases
Use cases include creating illustrations based on verbal instructions, automating the drawing of shapes for presentations, and assisting users with disabilities in using MS Paint more effectively.
How to use
To use paint-ai-agent, start the application by running ‘python talk2mcp.py’ and enter natural language commands to perform actions in MS Paint, such as drawing shapes or inserting text.
Key features
Key features include natural language control of MS Paint, automated drawing of various shapes, text insertion with positional control, color management, window management, detailed logging, and an accurate position calibration system.
Where to use
Paint-ai-agent can be used in educational settings for teaching drawing concepts, in creative industries for quick prototyping, or by individuals who want to automate repetitive drawing tasks in Microsoft Paint.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Overview
What is Paint Ai Agent
Paint-ai-agent is an automation tool that leverages Google’s Gemini AI to control Microsoft Paint through natural language commands, allowing users to create drawings and manipulate the application without manual input.
Use cases
Use cases include creating illustrations based on verbal instructions, automating the drawing of shapes for presentations, and assisting users with disabilities in using MS Paint more effectively.
How to use
To use paint-ai-agent, start the application by running ‘python talk2mcp.py’ and enter natural language commands to perform actions in MS Paint, such as drawing shapes or inserting text.
Key features
Key features include natural language control of MS Paint, automated drawing of various shapes, text insertion with positional control, color management, window management, detailed logging, and an accurate position calibration system.
Where to use
Paint-ai-agent can be used in educational settings for teaching drawing concepts, in creative industries for quick prototyping, or by individuals who want to automate repetitive drawing tasks in Microsoft Paint.
Clients Supporting MCP
The following are the main client software that supports the Model Context Protocol. Click the link to visit the official website for more information.
Content
Paint Drawing Agent
A Python-based automation tool that uses Google’s Gemini AI to control Microsoft Paint through natural language commands. This project enables users to draw shapes, write text, and manipulate colors in MS Paint using simple English instructions.
Features
- Natural language control of MS Paint
- Automated drawing of shapes (circles, rectangles, lines)
- Text insertion with position control
- Color selection and management
- Window management and canvas positioning
- Detailed logging and error handling
- Position calibration system
Prerequisites
- Windows 10 or later
- Python 3.8+
- Microsoft Paint (mspaint.exe)
- Google Cloud API key for Gemini AI
Installation
- Clone the repository:
git clone [repository-url]
cd paint-drawing-agent
- Install required dependencies:
pip install -r requirements.txt
- Create a
.env
file in the project root and add your Google API key:
GOOGLE_API_KEY=your_api_key_here
Project Structure
paint-drawing-agent/ ├── talk2mcp.py # Main application file ├── tools/ # Core automation tools │ ├── __init__.py │ └── paint_commands.py # Paint automation commands ├── calibration_profiles/ # Stored calibration data ├── LLM_LOGS/ # AI interaction logs ├── logs/ # Application logs └── requirements.txt # Project dependencies
Usage
- Start the Paint Drawing Agent:
python talk2mcp.py
- Enter natural language commands, for example:
- “Draw a red circle in the center”
- “Write ‘Hello World’ in black at the top”
- “Draw a blue rectangle on the right side”
- To exit the program, type ‘quit’
Command Examples
> Draw a red circle in the center > Write 'Hello World' in black at the top > Draw a blue rectangle at coordinates 400,300 > Draw a green line from top to bottom
Calibration
The system uses a calibration system to accurately locate Paint interface elements. To recalibrate:
- Run the calibration script:
python enhanced_calibrate.py
- Follow the on-screen instructions to calibrate tool positions
Logging
The system maintains several types of logs:
- Application logs:
/logs/paint_agent_[timestamp].log
- LLM interaction logs:
/LLM_LOGS/session_log.json
- Calibration logs:
/calibration_profiles/
Error Handling
The system includes comprehensive error handling for:
- Window management issues
- Drawing operation failures
- AI communication errors
- Position calibration problems
Contributing
- Fork the repository
- Create a feature branch
- Commit your changes
- Push to the branch
- Create a Pull Request
Troubleshooting
Common issues and solutions:
-
Paint Window Not Found
- Ensure MS Paint is installed
- Try running Paint manually first
-
Drawing Position Issues
- Run calibration again
- Check screen resolution matches calibration
-
AI Communication Errors
- Verify API key in .env file
- Check internet connection
License
[Your License Here]
Acknowledgments
- Google Gemini AI for natural language processing
- PyAutoGUI for GUI automation
- Win32GUI for Windows interaction
Dev Tools Supporting MCP
The following are the main code editors that support the Model Context Protocol. Click the link to visit the official website for more information.