Interactive MCP Popup
An MCP server that enables interactive Qt popups and continuous conversation within IDEs, facilitating user feedback and multi-turn dialogues.
README
Interactive MCP Popup
一个现代化的 MCP (Model Context Protocol) 交互服务,支持 Qt 弹窗和持续对话功能。
特性
- 🎨 现代化 Qt 弹窗 - 直接在 IDE 内显示,无需切换浏览器
- 💬 持续对话 - 支持多轮对话直到用户选择结束
- 🌍 跨平台支持 - 支持 Windows 和 macOS
- 🎯 简洁设计 - 统一的现代化界面风格
- ⚡ 易于集成 - 简单的 MCP 配置
安装
前置要求
- Python 3.11+
- uv (Python 包管理器)
安装步骤
- 克隆项目
git clone https://github.com/wangdefaf/interactive-mcp-popup.git
cd interactive-mcp-popup
- 安装依赖
uv sync
- 配置 MCP
在你的 MCP 配置文件中添加:
{
"mcpServers": {
"interactive-mcp-popup": {
"command": "uv",
"args": [
"--directory",
"/path/to/interactive-mcp-popup",
"run",
"src/interactive_mcp_popup/server.py"
],
"timeout": 600,
"autoApprove": [
"ask_user_popup",
"start_conversation",
"continue_conversation",
"end_conversation",
"get_conversation_history",
"test_popup",
"check_dependencies"
]
}
}
}
使用方法
配置规则
- 在任何流程、任务、对话进行时,无论是询问、回复、或完成阶段性任务,皆必须调用 MCP interactive-mcp-popup。
- 每当收到用户反馈,若反馈内容非空,必须再次调用 MCP interactive-mcp-popup,并根据反馈内容调整行为。
- 仅当用户明确表示「结束」或「不再需要交互」时,才可停止调用 MCP interactive-mcp-popup,流程才算结束。
- 除非收到结束指令,否则所有步骤都必须重复调用 MCP interactive-mcp-popup。
- 完成任务前,必须使用 MCP interactive-mcp-popup 工具向用户询问反馈。
基础弹窗提问
from interactive_mcp_popup import ask_user_popup
result = ask_user_popup(
question="你觉得这个功能怎么样?",
context="这是一个测试问题"
)
持续对话
from interactive_mcp_popup import (
start_conversation,
continue_conversation,
end_conversation
)
# 开始对话
conv_id = start_conversation("项目规划讨论")
# 继续对话
response = continue_conversation(conv_id, "你觉得这个设计怎么样?")
# 结束对话
end_conversation(conv_id, "讨论完成")
项目结构
interactive-mcp-popup/
├── src/
│ └── interactive_mcp_popup/
│ ├── __init__.py
│ ├── server.py # 主 MCP 服务器
│ ├── popup.py # Qt 弹窗实现
│ ├── conversation.py # 持续对话管理
│ └── utils.py # 工具函数
├── docs/
│ ├── api.md # API 文档
│ ├── configuration.md # 配置说明
│ └── examples.md # 使用示例
├── examples/
│ ├── basic_usage.py # 基础使用示例
│ └── advanced_usage.py # 高级使用示例
├── tests/
│ ├── test_popup.py # 弹窗测试
│ └── test_conversation.py # 对话测试
├── pyproject.toml # 项目配置
├── README.md # 项目说明
├── LICENSE # MIT 许可证
└── .gitignore # Git 忽略文件
API 参考
弹窗工具
ask_user_popup(question, context)- 弹窗提问test_popup()- 测试弹窗功能check_dependencies()- 检查依赖
对话工具
start_conversation(topic, context)- 开始对话continue_conversation(conv_id, message)- 继续对话end_conversation(conv_id, summary)- 结束对话get_conversation_history(conv_id)- 获取历史
开发
本地开发
# 安装开发依赖
uv sync --dev
# 运行测试
uv run pytest
# 代码格式化
uv run black src/
uv run isort src/
贡献
欢迎提交 Issue 和 Pull Request!
许可证
MIT License - 详见 LICENSE 文件
致谢
本项目思想借鉴了 interactive-feedback-mcp 项目,但代码完全独立实现。
支持
如果你遇到问题或有建议,请:
让 MCP 交互更简单、更直观! 🚀
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。