paint-ai-agent
This project demonstrates an Agentic AI system that uses a Gemini-powered MCP server to interpret natural language instructions and automate Microsoft Paint using GUI simulation tools on Windows.
Documentation
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
1. Clone the repository:
git clone [repository-url]
cd paint-drawing-agent2. Install required dependencies:
pip install -r requirements.txt3. Create a `.env` file in the project root and add your Google API key:
GOOGLE_API_KEY=your_api_key_hereProject 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 dependenciesUsage
1. Start the Paint Drawing Agent:
python talk2mcp.py2. 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"
3. 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 bottomCalibration
The system uses a calibration system to accurately locate Paint interface elements. To recalibrate:
1. Run the calibration script:
python enhanced_calibrate.py2. 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
1. Fork the repository
2. Create a feature branch
3. Commit your changes
4. Push to the branch
5. Create a Pull Request
Troubleshooting
Common issues and solutions:
1. Paint Window Not Found
2. Drawing Position Issues
3. AI Communication Errors
License
[Your License Here]
Acknowledgments
- Google Gemini AI for natural language processing
- PyAutoGUI for GUI automation
- Win32GUI for Windows interaction
Frequently asked questions
What is paint-ai-agent?
paint-ai-agent is This project demonstrates an Agentic AI system that uses a Gemini-powered MCP server to interpret natural language instructions and automate Microsoft Paint using GUI simulation tools on Windows.
How do I install paint-ai-agent?
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 paint-ai-agent open source?
Yes — it is hosted on GitHub at https://github.com/shivman/paint-ai-agent and has 2 stars.
Related MCP tools
🙌 OpenHands: Code Less, Make More for the Model Context Protocol. Enhance AI assistants with powerful integrations. Python-based implementation.
Universal memory layer for AI Agents; Announcing OpenMemory MCP - local and secure memory management. Python-based implementation.
基于大模型搭建的聊天机器人,同时支持 微信公众号、企业微信应用、飞书、钉钉 等接入,可选择ChatGPT/Claude/DeepSeek/文心一言/讯飞星火/通义千问/ Gemini/GLM-4/Kimi/LinkAI,能处理文本、语音和图片,访问操作系统和互联网,支持基于自有知识库进行定制企业智能客服。
An LLM agent that conducts deep research (local and web) on any given topic and generates a long report with citations. Built for the Model Context Protocol to
🚀 The fast, Pythonic way to build MCP servers and clients Trusted by 19900+ developers. Trusted by 19900+ developers. Trusted by 19900+ developers.
🔥 MaxKB is an open-source platform for building enterprise-grade agents. MaxKB 是强大易用的开源企业级智能体平台。 for the Model Context Protocol. Enhance AI assistants with po
Run your own MCP server? See who uses it and what to fix.
Measure it with TrackMCP