A Rust implementation of a Model Context Protocol (MCP) server that allows programmatic interaction with Microsoft Paint on Windows systems.
Paint MCP provides a HTTP API that allows applications to interact with Microsoft Paint through a series of endpoints. It uses undocumented Windows APIs to find, control, and manipulate the Paint interface programmatically.
# Clone the repository
git clone https://github.com/ghuntley/mcp-server-microsoft-paint.git
cd mcp-server-microsoft-paint
# Build the project
cargo build --release
cargo run --release
The server will start on http://localhost:3000
.
See the API documentation for detailed information about the available endpoints.
curl -X POST http://localhost:3000/draw/line \
-H "Content-Type: application/json" \
-d '{
"start_x": 100,
"start_y": 100,
"end_x": 300,
"end_y": 200,
"color": "#FF0000",
"thickness": 2
}'
This project uses undocumented Windows APIs to interact with Microsoft Paint. It simulates mouse and keyboard events to operate the Paint interface, which means:
For more technical details, see the Windows Integration Specification.
src/
- Rust source codemain.rs
- API server implementationmodels.rs
- Data structures for API requests/responsespaint_integration.rs
- Windows API integrationspecs/
- Protocol and technical specificationsAs this project uses undocumented APIs and simulates user inputs, it has several limitations:
MIT
This project uses undocumented and unsupported APIs. It is provided for educational purposes only and should not be used in production environments. Microsoft Paint's UI and behavior may change with Windows updates, potentially breaking this integration.