Cover image
Try Now
2025-04-04

3 years

Works with Finder

1

Github Watches

2

Github Forks

5

Github Stars

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.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Alexandru Strujac
  • Efficient thumbnail creator for YouTube videos

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Beniyam Berhanu
  • Therapist adept at identifying core issues and offering practical advice with images.

  • Khalid kalib
  • Write professional emails

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

  • ravitemer
  • 一个功能强大的Neovim插件,用于管理MCP(模型上下文协议)服务器

  • jae-jae
  • MCP服务器使用剧作《无头浏览器》获取网页内容。

    Reviews

    1 (1)
    Avatar
    user_Vw7y56Ph
    2025-04-16

    As a devoted user of mcp-server-microsoft-paint, I am thoroughly impressed by its seamless integration and functionality. Ghuntley's creation revolutionizes the way we manipulate graphics, offering a robust and user-friendly server solution. The well-documented code and comprehensive welcome information make it an absolute pleasure to use. Kudos for an exceptional tool!