Token导航 LogoToken导航

MCP Server · 运维云端

Mspaint MCP Server V2

一个结合AI数学计算与MSPaint绘图的自动化工具,通过结构化提示解决复杂数学问题并可视化结果。

stdio官方级别未说明来源级核验工具 0
数学计算PythonAI自动化

快速开始

作者 / 组织
shettysaish20
提供方
shettysaish20

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

1

仓库热度

收录来源

1 个

MCP World

选型结论

Mspaint MCP Server V2 属于运维云端类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,客户端适配情况以官方文档为准,有可以直接复制的安装命令;接入前要先准备 API Key。

分类

运维云端

传输方式

stdio

认证方式

API Key

部署方式

公开资料未说明

安装与配置

安装命令

pip install -r requirements.txt

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 对应的运行时,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

基于AI规划算法的MSPaint MCP服务器

该项目演示了如何使用Advanced AI Prompting使LLM能够稳健地处理多个步骤的复杂数学问题。它使用模型上下文协议(MCP)允许由谷歌Gemini模型支持的AI代理与传统的Windows应用程序(MSPaint)进行交互。AI代理利用以下定义的工具 fastmcp 并通过以下方式实施 pywinauto 解决数学问题,然后在Paint画布上绘制解决方案。

目录

引言

该项目展示了高级人工智能提示的使用,使LLM能够稳健地处理多个步骤的复杂数学问题。

此问题陈述的结构化提示

You are a math agent with painting skills, solving complex math expressions step-by-step.
You have access to various mathematical tools for calculations and verifications, as well as an MSPaint application to draw and present your solution on a canvas.

Available Tools:
{tools_description}

MSPaint Application Information:
- Rectangle coordinates: x1 = 763, y1 = 595, x2 = 1788, y2 = 1123

You must respond with EXACTLY ONE LINE in one of these formats (no additional text):

1. For function calls:
FUNCTION_CALL: {{"name": function_name, "arguments": {{"param1": value1, "param2": value2}}}}

2. For final answers:
FINAL_ANSWER: 

3. For completing the task:
COMPLETE_RUN

Instructions:
- Start by calling the show_reasoning tool ONLY ONCE with a list of all step-by-step reasoning steps explaining how you will solve the problem. Once called, NEVER CALL IT AGAIN UNDER ANY CIRCUMSTANCES.
- When reasoning, tag each step with the reasoning type (e.g., [Arithmetic], [Logical Check]).
- Use all available math tools to solve the problem step-by-step.
- When a function returns multiple values, process all of them.
- Apply BODMAS rules: start with the innermost parentheses and work outward.
- Do not skip steps — perform all calculations sequentially.
- Respond only with one line at a time.
- Call only one tool per response.
- After calculating a number, verify it by calling:
FUNCTION_CALL: {{"name": "verify_calculation", "arguments": {{"expression": , "expected": }}}}
- If verify_calculation returns False, re-evaluate your previous steps.
- Once you reach a final answer, check for consistency of all steps and calculations by calling:
FUNCTION_CALL: {{"name": "verify_consistency", "arguments": {{"steps": [[, ], [, ], ...]}}}} 
- If verify_consistency returns False, re-evaluate your previous steps.
- Once verify_consistency return True, submit your final result as:
FINAL_ANSWER: 

Paint Instructions:
- To draw in Paint, follow this sequence strictly:
1. Call open_paint to start the Paint application.
2. Verify Paint is open using verify_paint_open.
3. If verify_paint_open returns False, retry opening Paint until it succeeds.
4. After Paint is open, draw a rectangle using draw_rectangle with correct parameters.
5. Add text using add_text_in_paint, inserting your FINAL_ANSWER: .

Final Step:
- After completing all calculations, verifications, and drawings, call:
COMPLETE_RUN

Strictly follow the above guidelines.
Your entire response should always be a single line starting with either FUNCTION_CALL:, FINAL_ANSWER: or COMPLETE_RUN.

ChatGPT结构化提示评估结果

{
  "explicit_reasoning": true,
  "structured_output": true,
  "tool_separation": true,
  "conversation_loop": true,
  "instructional_framing": true,
  "internal_self_checks": true,
  "reasoning_type_awareness": true,
  "fallbacks": true,
  "overall_clarity": "Extremely strong prompt — it carefully enforces step-by-step reasoning, structured outputs, error handling, and tool use separation. Very minor improvements could be to give a short worked-out example, but even without it, the robustness is excellent."
}

项目结构

├── MSPaint-MCP-Server/
│ ├── mcp_server.py # Defines the MCP server with tools for Paint automation 
│ ├── mcp_client.py # Defines the MCP client that interacts with the server and AI model 
│ ├── requirements.txt # Lists the project dependencies 
│ └── .env # Stores the Gemini API key 
├── README.md # This file

需求

  • Python 3.11+
  • Conda(推荐用于环境管理)
  • Google Gemini API密钥
  • pywin32
  • pywinauto
  • fastmcp
  • python dotenv
  • 谷歌genai
  • 富有的

设置

  1. 创建Conda环境:
   conda create -n eagenv python=3.11
   conda activate eagenv
  1. 安装依赖项:
   pip install -r requirements.txt
  1. 设置Gemini API密钥:

- 创建一个 .env 目录中的文件。

- 将Gemini API密钥添加到 .env 文件:

     GEMINI_API_KEY=YOUR_API_KEY

用法

  1. 运行MCP客户端:
   python mcp_paint_app/mcp_client.py

这将启动连接到MCP服务器的MCP客户端,初始化AI代理,并开始自动化过程。

运作原理

  1. MCP服务器(mcp_server.py):

- 定义用于与MSPaint交互的工具(例如。, open_paint, draw_rectangle, add_text_in_paint)以及各种数学运算(例如。, add, subtract, multiply, divide, verify_calculation, verify_consistency). - 用途 pywinauto 以控制MSPaint应用程序。 - 通过以下方式显示这些工具 fastmcp 图书馆。

  1. MCP客户端(mcp_client.py):

- 连接到MCP服务器。 - 使用Google Gemini模型生成指令并求解给定的数学表达式。 - 分析模型的输出以确定调用哪个工具。 - 使用所需参数调用MCP服务器上的相应工具。 - 处理来自工具的响应,并将其反馈给模型以进行下一步。 - 在MSPaint中编排最终答案的绘制。

  1. 人工智能代理(谷歌双子座):

- 接收复杂的数学表达式(例如。, ((3000 - (400+552)) / 2 + 1024). - 使用可用工具(在系统提示中定义)逐步解决问题。 - 生成函数调用(例如。, FUNCTION_CALL: {"name": "add", "arguments" {"a": 400, "b": 552}})使用工具。 - 使用验证每个计算 verify_calculation 工具。 - 使用 verify_consistency 工具。 - 一旦获得并验证了最终答案,它就会使用Paint通过打开Paint、绘制矩形并将最终答案添加为文本来显示结果。 - 通过调用 COMPLETE_RUN 命令。

关键组件

  • mcp_server.py: 包含自动化MSPaint的核心逻辑。这 open_paint, draw_rectangle,以及 add_text_in_paint 函数是AI代理使用的关键工具。
  • mcp_client.py: 管理AI代理和MCP服务器之间的交互。它设置系统提示、调用工具并处理响应。
  • requirements.txt: 列出项目所需的所有Python包。
  • .env: 存储Google Gemini API密钥。

故障排除

  • 权限问题: 如果遇到权限问题,请尝试以管理员身份运行脚本。
  • 协调问题: 用于在MSPaint中单击的坐标可能需要根据您的屏幕分辨率和窗口大小进行调整。使用代码中的调试打印语句来标识正确的坐标。
  • 工具选择问题: 如果AI代理没有选择正确的工具,请查看系统提示并确保工具描述准确。
  • API关键问题: 确保Gemini API密钥在 .env 文件。

贡献

欢迎投稿!请提交一个包含您的更改的拉取请求。

许可证

MIT许可证

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

数学计算Python本地部署AI自动化绘图工具结构化提示

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

看服务状态

查询容器、日志和监控指标,定位异常。

执行部署变更

在权限范围内触发发布、回滚和环境切换。

核对资源用量

汇总用量,找出闲置和超额的部分。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • stdio 方式要求本地装好 运行环境,换机器要重新装一遍。
  • 需要自备API Key,没有凭据没法直接试。
  • 公开摘要偏短,具体能力和限制要回到仓库确认。

更适合

  • 需要在运维云端场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 暂时拿不到API Key的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
Mspaint MCP Server V2

MCP World · 本页

0stdio有1 个2026-05-17
Ui Tars Desktop 8a825770

MCP World

0stdio有1 个2026-05-17
Elie222 MCP

MCP World

0未说明未标注1 个2026-05-17
Arizeai Phoenix MCP

MCP World

0stdio有3 个2026-05-17
Unity MCP 87ee506e

MCP World

42HTTP有2 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

Mspaint MCP Server V2 怎么安装?

公开资料给出的安装命令是 pip install -r requirements.txt,运行环境为 未标注。装完后按客户端要求写进 MCP 配置,重启客户端生效。

Mspaint MCP Server V2 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

Mspaint MCP Server V2 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

Mspaint MCP Server V2 需要 API Key 吗?

公开资料标注的认证方式是API Key,也就是要先拿到凭据才能连上;凭据只填在自己本地的配置里,不要写进公开仓库。

Mspaint MCP Server V2 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP