Fire in da houseTop Tip:Paying $100+ per month for Perplexity, MidJourney, Runway, ChatGPT and other tools is crazy - get all your AI tools in one site starting at $15 per month with Galaxy AI Fire in da houseCheck it out free

mcp-server-microsoft-paint

MCP.Pizza Chef: ghuntley

The mcp-server-microsoft-paint is a JSON-RPC 2.0 compatible MCP server that enables programmatic control of Microsoft Paint on Windows 10/11. It allows launching, connecting, and manipulating Paint through commands to draw lines, shapes, pixels, set colors, and control the Paint window. Built in Rust, it communicates via stdin/stdout and supports integration with Python clients for testing. This server facilitates automated graphic operations and Paint window management through a standardized protocol.

Use This MCP server To

Launch and control Microsoft Paint programmatically Draw lines, shapes, and pixels in Paint via JSON-RPC Set colors and tool properties in Paint remotely Connect to an existing Paint window for manipulation Automate graphic tasks using Paint in Windows environments Integrate Paint drawing capabilities into AI workflows Test Paint control commands using Python client examples

README

MCP Server for Microsoft Paint

A JSON-RPC 2.0 compatible server for controlling Microsoft Paint through the Microsoft Commandline Protocol (MCP).

Features

  • Launch and connect to Microsoft Paint
  • Draw lines, shapes, and pixels
  • Set colors and tool properties
  • Control the Paint window

Requirements

  • Windows 10/11 with Microsoft Paint installed
  • Rust (for building the server)
  • Python (for the test client examples)

Building and Running

To build the server:

cargo build --release

To run the server:

cargo run --release

The server accepts JSON-RPC 2.0 requests via stdin and responds via stdout.

JSON-RPC Methods

initialize

Finds or launches Microsoft Paint.

Request:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "initialize",
  "params": {}
}

connect

Connects to an already running Paint window.

Request:

{
  "jsonrpc": "2.0",
  "id": 2,
  "method": "connect",
  "params": {
    "client_id": "your-client-id",
    "client_name": "Your Client Name"
  }
}

draw_line

Draws a line from one point to another.

Request:

{
  "jsonrpc": "2.0",
  "id": 3,
  "method": "draw_line",
  "params": {
    "start_x": 100,
    "start_y": 100,
    "end_x": 300,
    "end_y": 100,
    "color": "#FF0000",
    "thickness": 3
  }
}

Other Methods

  • activate_window - Brings the Paint window to the foreground
  • get_canvas_dimensions - Returns the current canvas size
  • draw_pixel - Draws a single pixel
  • draw_shape - Draws a shape (rectangle, ellipse, etc.)
  • select_tool - Selects a drawing tool
  • set_color - Sets the current color
  • And more...

Example Test Client

A simple test client is provided in final_test.py to demonstrate how to use the server:

python final_test.py

Troubleshooting

If you encounter issues with the server connecting to Paint:

  1. Make sure Microsoft Paint is installed and accessible
  2. Try manually launching Paint before starting the server
  3. Check the server logs for detailed error messages

License

This project is available under the MIT License.

mcp-server-microsoft-paint FAQ

How do I start the mcp-server-microsoft-paint?
Build with 'cargo build --release' and run with 'cargo run --release' on Windows 10/11 with Paint installed.
What communication protocol does this server use?
It uses JSON-RPC 2.0 over stdin and stdout for requests and responses.
Can I connect to an already running Paint instance?
Yes, the 'connect' method allows attaching to an existing Paint window.
What programming languages are involved in using this server?
The server is built in Rust, and Python is used for test client examples.
What operations can I perform on Paint through this server?
You can draw lines, shapes, pixels, set colors, and control the Paint window.
Is this server compatible with Windows versions other than 10/11?
It is designed specifically for Windows 10 and 11 with Microsoft Paint installed.
How does this server integrate with MCP workflows?
It exposes Paint functionality as JSON-RPC methods, enabling AI agents to control Paint programmatically.