A MCP server for AI code editors to communicate with users through dialog boxes
Project description
CodingConverse MCP Server
一个为AI代码编辑器提供用户对话能力的MCP (Model Context Protocol) 服务。当AI编辑器需要与用户交互时,可以通过此服务显示对话框获取用户输入。
特性
- 🤖 MCP协议支持: 完全兼容MCP 2024-11-05协议
- 💬 用户对话: 为AI编辑器提供与用户交互的能力
- 🎨 现代UI: 基于PyQt6的专业对话框界面
- 🚀 易于集成: 支持Cursor、Windsurf、Trae等AI编辑器
- 📡 stdio通信: 通过标准输入输出与AI编辑器通信
安装
方法1: 从源码安装(推荐)
# 克隆项目
git clone https://github.com/yourusername/coding-converse.git
cd coding-converse
# 安装依赖
pip install -r requirements.txt
# 安装为可编辑包
pip install -e .
方法2: 直接安装
# 直接从源码安装
pip install .
验证安装
# 测试模块导入
python -c "import coding_converse; print('安装成功')"
# 运行测试
python test_module.py
在AI编辑器中配置
Cursor / Windsurf / Trae AI
在编辑器的MCP配置文件中添加:
{
"mcpServers": {
"CodingConverse": {
"command": "python",
"args": [
"-m",
"coding_converse"
],
"env": {}
}
}
}
或者如果已安装为包:
{
"mcpServers": {
"CodingConverse": {
"command": "coding-converse",
"args": [],
"env": {}
}
}
}
使用方法
直接运行服务器
# 方法1: 作为模块运行
python -m coding_converse
# 方法2: 直接运行服务器文件
python server.py
# 方法3: 如果已安装为包
coding-converse
在AI编辑器中使用
配置完成后,AI编辑器可以使用 ask_user 工具与用户交互:
# AI编辑器会调用这个工具
ask_user(
message="遇到了一个问题,需要您的建议:应该使用哪种数据结构?",
title="AI编辑器询问",
placeholder="请输入您的建议..."
)
MCP工具
ask_user
向用户显示对话框并获取输入。
参数:
message(string, 必需): 要向用户显示的消息内容title(string, 可选): 对话框标题,默认为"AI编辑器询问"placeholder(string, 可选): 输入框占位符,默认为"请输入您的回复..."
返回值:
- 用户输入的文本内容
使用场景
- 🤔 方案选择: AI需要用户在多个技术方案中选择
- 🐛 问题诊断: 遇到复杂问题时向用户询问更多信息
- ⚙️ 配置确认: 确认重要的配置更改
- 📝 需求澄清: 当需求不明确时获取用户澄清
- 🔧 调试协助: 请求用户提供调试信息
系统要求
- Python 3.8+
- PyQt6 6.4.0+
- 支持MCP协议的AI编辑器
开发
# 开发模式安装
pip install -e .
# 运行测试
python -c "from message_dialog import show_message_dialog; print(show_message_dialog('测试消息'))"
许可证
MIT License
贡献
欢迎提交问题和拉取请求!
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
coding_converse-0.1.0.tar.gz
(9.0 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coding_converse-0.1.0.tar.gz.
File metadata
- Download URL: coding_converse-0.1.0.tar.gz
- Upload date:
- Size: 9.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
600f84c1889332cacddc9435187bb3ceb4e615610cb3415adccef9ba20c87416
|
|
| MD5 |
93ad86990301d4aa33232360d8fdc53f
|
|
| BLAKE2b-256 |
e92befab0f5b8d102f2ad522faf311e582f9bb19f9d1822bdfffdaeb76a23099
|
File details
Details for the file coding_converse-0.1.0-py3-none-any.whl.
File metadata
- Download URL: coding_converse-0.1.0-py3-none-any.whl
- Upload date:
- Size: 10.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
dbba629c6ba73c63a530e8a6208c87d14cc4e5be6811aa0080ce9109f2e7165d
|
|
| MD5 |
e704a634d2fa4b68d507c793fb709390
|
|
| BLAKE2b-256 |
30122e002c5d7c9ccf08f592b91296a9b3b568653a24c5cd1e68ba2c7ddba4f1
|