mcpField
P
Paint Drawing Agent

Paint Drawing Agent

Local
github.com/shivmanAI & Agents3Updated 79w ago

About Paint Drawing Agent

Paint Drawing Agent is a Python agent that turns English instructions into actions in Microsoft Paint on Windows. It combines Gemini with GUI automation for drawing and text placement.

Key features

  1. 01Natural-language Paint control
  2. 02Shape drawing
  3. 03Positioned text insertion
  4. 04Color selection
  5. 05Window and canvas positioning
  6. 06Position calibration and logs

Use cases

  1. 01Draw shapes from a written instruction
  2. 02Add text at a chosen canvas position
  3. 03Set colors while composing a Paint image

MCP support

It uses a Gemini-powered MCP server to interpret commands and expose Paint automation tools to the agent.

Configuration

Local server config is the same for every client. Copy it into your client’s MCP config file.

No install method listed yet

We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.

Repository

Tools

No tool list yet

Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.

Details

From the project README

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-agent
  1. Install required dependencies:
pip install -r requirements.txt
  1. 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

  1. Start the Paint Drawing Agent:
python talk2mcp.py
  1. 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"
  1. 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:

  1. Run the calibration script:
python enhanced_calibrate.py
  1. 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

    • Ensure MS Paint is installed
    • Try running Paint manually first
  2. Drawing Position Issues

    • Run calibration again
    • Check screen resolution matches calibration
  3. 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

Comments

Markdown supported

New to MCP?

From what the protocol is to installing your first server, these answers cover most first questions.

An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.