Skip to main content
Glama

MCP Feedback Collector

by keizman
demo.py2.46 kB
#!/usr/bin/env python3 """ MCP反馈收集器演示脚本 展示改进后的GUI界面和功能 """ import sys import os # Add the src directory to the path sys.path.insert(0, os.path.join(os.path.dirname(__file__), 'src')) from mcp_feedforward.server import show_feedback_dialog def main(): print("=" * 60) print(" MCP反馈收集器 - 界面演示") print("=" * 60) print() print("改进内容:") print("✓ 调整了窗口大小 (650x750)") print("✓ 优化了按钮尺寸") print("✓ 改进了文本区域大小") print("✓ 精简了按钮文字") print("✓ 调整了间距和字体") print("✓ 解决了Unicode编码问题") print() print("现在启动GUI演示...") print("请测试各项功能并查看界面改进效果!") print() work_summary = """已完成的工作内容: ✓ 修复Python版本兼容性问题 - 更新requires-python到>=3.10 - 解决了fastmcp依赖冲突 ✓ 替换GUI框架 - 从PyQt5改为tkinter - 解决Windows兼容性问题 - 保持美观界面设计 ✓ 优化用户界面 - 调整窗口和按钮大小 - 改进文本区域布局 - 精简按钮标签 - 优化间距设计 ✓ 创建状态检查工具 - 验证MCP服务器启动 - 检查依赖项状态 - 提供连接信息说明 现在您可以: • 输入文字反馈 • 选择图片文件 • 查看改进后的界面""" try: result = show_feedback_dialog(work_summary, timeout_seconds=300) print("\n" + "=" * 60) print("演示完成!") print("=" * 60) if result is None: print("演示超时或窗口被关闭") elif not result: print("用户取消了反馈") else: print(f"收到了 {len(result)} 项反馈:") for i, item in enumerate(result, 1): if item['type'] == 'text': content = item['content'][:50] + "..." if len(item['content']) > 50 else item['content'] print(f" {i}. 文字反馈: {content}") elif item['type'] == 'image': print(f" {i}. 图片反馈: {len(item['data'])} 字符") print("\n界面改进完成!✨") except Exception as e: print(f"演示出错: {e}") import traceback traceback.print_exc() if __name__ == "__main__": main()

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/keizman/mcp-feedforward'

If you have feedback or need assistance with the MCP directory API, please join our Discord server