diff --git a/README.md b/README.md index de84dac..e609310 100644 --- a/README.md +++ b/README.md @@ -4,73 +4,100 @@ **Original Author:** [Fábio Ferreira](https://x.com/fabiomlferreira) | [Original Project](https://github.com/noopstudios/interactive-feedback-mcp) ⭐ **Enhanced Fork:** [Minidoracat](https://github.com/Minidoracat) -**UI Design Reference:** [sanshao85/mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) - Thanks for modern interface design inspiration -**Related Resources:** [dotcursorrules.com](https://dotcursorrules.com/) for more AI development workflow tools +**UI Design Reference:** [sanshao85/mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) -A simple [MCP server](https://modelcontextprotocol.io/) for implementing human-in-the-loop workflows in AI-assisted development tools (like [Cursor](https://www.cursor.com)). This server allows you to execute commands, view output, and provide text feedback and images directly to the AI. Also supports [Cline](https://cline.bot) and [Windsurf](https://windsurf.com). +## 🎯 Core Concept -## ✨ New Features +This is an [MCP server](https://modelcontextprotocol.io/) that implements **human-in-the-loop** workflows in AI-assisted development tools. By guiding AI to confirm with users rather than making speculative operations, it can consolidate up to 25 tool calls into a single feedback-oriented request, dramatically reducing platform costs. -### 🌐 Full SSH Remote Support -- **Automatic Environment Detection**: Intelligently detects runtime environment and selects appropriate interface -- **Local Environment**: Uses original Qt GUI interface -- **SSH Remote Environment**: Automatically switches to modern Web UI -- **Real-time Communication**: WebSocket-based real-time command output and feedback -- **Dark Theme**: Provides modern dark theme interface +**Supported Platforms:** [Cursor](https://www.cursor.com) | [Cline](https://cline.bot) | [Windsurf](https://windsurf.com) -### 🖼️ Image Upload Support -- **Multi-format Support**: PNG, JPG, JPEG, GIF, BMP, WebP -- **Drag & Drop Upload**: Support for dragging files to interface -- **Clipboard Support**: Direct paste from clipboard -- **Auto Compression**: Smart compression for large images to meet 1MB limit -- **MCP Integration**: Images automatically converted to MCP Image objects +### 🔄 Workflow +1. **AI Call** → `mcp-feedback-enhanced` +2. **Environment Detection** → Auto-select appropriate interface +3. **User Interaction** → Command execution, text feedback, image upload +4. **Feedback Delivery** → Information returns to AI +5. **Process Continuation** → Adjust or end based on feedback -### 🛡️ Stability Improvements -- **Encoding Fix**: Complete resolution of Chinese character garbled text issues -- **Debug Control**: Controllable debug output, avoiding JSON parsing errors -- **Error Handling**: Enhanced error handling ensuring stable program operation -- **Output Isolation**: Strict isolation of debug output from MCP communication +## 🌟 Key Features -### 🌏 Multi-language Support -- **Full Internationalization**: Complete multi-language support with structured JSON translation files -- **Supported Languages**: Traditional Chinese, English, Simplified Chinese -- **Smart Detection**: Automatic language detection based on system locale -- **Easy Extension**: Simple JSON-based translation system for adding new languages -- **Legacy Compatibility**: Fully backward compatible with existing code +### 🖥️ Dual Interface System +- **Qt GUI**: Native experience for local environments +- **Web UI**: Modern interface for remote SSH environments +- **Smart Switching**: Auto-detect environment and choose optimal interface + +### 🖼️ Image Support +- **Format Support**: PNG, JPG, JPEG, GIF, BMP, WebP +- **Upload Methods**: Drag & drop files + clipboard paste (Ctrl+V) +- **Auto Processing**: Smart compression to ensure 1MB limit compliance + +### 🌏 Multi-language +- **Three Languages**: Traditional Chinese, English, Simplified Chinese +- **Smart Detection**: Auto-select based on system language +- **Live Switching**: Change language directly within interface ## 🖥️ Interface Preview -### Qt GUI Interface (Local Environment) -![Qt GUI Interface - English](docs/images/gui-en.png) +![Qt GUI Interface](docs/images/gui-en.png) +*Qt GUI Interface - Local Environment* -### Web UI Interface (SSH Remote Environment) -![Web UI Interface - English](docs/images/web-en.png) +![Web UI Interface](docs/images/web-en.png) +*Web UI Interface - SSH Remote Environment* -Both interfaces support: -- 💬 Text feedback input -- 🖼️ Image upload (supports drag & drop, clipboard paste) -- ⚡ Real-time command execution -- ⌨️ **Keyboard Shortcuts**: - - Ctrl+Enter for quick feedback submission (supports main keyboard and numpad) - - Ctrl+V to paste images directly in feedback dialog -- 🎨 Modern dark theme -- 📱 Responsive design (Web UI) -- 🌐 Multi-language support (Traditional Chinese, English, Simplified Chinese) +**Keyboard Shortcuts** +- `Ctrl+Enter`: Submit feedback (supports both main keyboard and numpad) +- `Ctrl+V`: Directly paste clipboard images -## 🎯 Why Use This Tool? +## 🚀 Quick Start -By guiding AI assistants to confirm with users rather than making speculative high-cost tool calls, this module can significantly reduce the number of paid requests on platforms like Cursor. In some cases, it can consolidate up to 25 tool calls into a single feedback-oriented request, saving resources and improving performance. +### 1. Installation & Testing +```bash +# Install uv (if not already installed) +pip install uv -## 📝 Prompt Engineering Setup +# Quick test +uvx mcp-feedback-enhanced@latest test -For best results, add the following custom prompts to your AI assistant (e.g., in Cursor's rules or prompts): +# Interactive test +uvx mcp-feedback-enhanced@latest test --persistent +``` -### Basic Prompt -> Whenever you want to ask a question, be sure to call MCP `mcp-feedback-enhanced`. -> Whenever you're about to complete a user request, call MCP `mcp-feedback-enhanced` instead of ending the process directly. -> Continue calling MCP until the user's feedback is empty, then end the request. +### 2. MCP Configuration +**Basic Configuration** (suitable for most users): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +**Advanced Configuration** (custom environment needed): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "env": { + "FORCE_WEB": "true", + "MCP_DEBUG": "false" + }, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +### 3. Prompt Engineering Setup +For best results, add these rules to your AI assistant: -### Complete Rules Example ``` # MCP Interactive Feedback Rules @@ -80,444 +107,86 @@ For best results, add the following custom prompts to your AI assistant (e.g., i 4. Unless receiving end command, all steps must repeatedly call MCP mcp-feedback-enhanced. ``` -This ensures your AI assistant uses this MCP server to request user feedback before marking tasks as complete. +## ⚙️ Advanced Settings -## 🔧 Environment Detection & Configuration +### Environment Variables +| Variable | Purpose | Values | Default | +|----------|---------|--------|---------| +| `FORCE_WEB` | Force use Web UI | `true`/`false` | `false` | +| `MCP_DEBUG` | Debug mode | `true`/`false` | `false` | +| `INCLUDE_BASE64_DETAIL` | Full Base64 for images | `true`/`false` | `false` | -The system automatically detects the runtime environment and selects the appropriate interface: - -### Qt GUI (Local Environment) -- Uses Qt's `QSettings` for project-based configuration storage -- Includes command settings, auto-execution options, window geometry states, etc. -- Settings are typically stored in platform-specific locations (Windows Registry, macOS plist files, Linux config directories) - -### Web UI (SSH Remote Environment) -- Modern interface based on FastAPI and WebSocket -- Supports real-time command execution and output display -- Automatic browser launch and session management -- Dark theme and responsive design - -### Debug Mode Control -- **Production Mode**: Default off for all debug output, ensuring perfect compatibility with MCP clients -- **Debug Mode**: Set `MCP_DEBUG=true` to enable detailed debug information -- **Output Isolation**: All debug information outputs to stderr, not interfering with MCP communication - -## 🚀 Installation - -### Method 1: uvx Installation (Recommended) - -**This is the simplest method, no need to manually manage dependencies or virtual environments:** - -1. **Install uv** (if not already installed) - ```bash - # Windows - pip install uv - - # Linux/Mac - curl -LsSf https://astral.sh/uv/install.sh | sh - ``` - -2. **Test Installation** - ```bash - # View version info (recommend using @latest for latest version) - uvx mcp-feedback-enhanced@latest version - - # Run tests - uvx mcp-feedback-enhanced@latest test - - # Persistent test mode (can actually test in browser) - uvx mcp-feedback-enhanced@latest test --persistent - ``` - -### Method 2: Install from Source (Developers) - -Suitable for users who need to modify code or contribute to development: - -1. **Get the Code** - ```bash - git clone https://github.com/Minidoracat/mcp-feedback-enhanced.git - cd mcp-feedback-enhanced - ``` - -2. **Install Dependencies** - ```bash - uv sync - ``` - -3. **Test Installation** - ```bash - # Basic functionality test - uv run python -m mcp_feedback_enhanced test - - # Persistent test mode (can actually test in browser) - uv run python -m mcp_feedback_enhanced test --persistent - ``` - -4. **Run MCP Server** - ```bash - uv run python -m mcp_feedback_enhanced - ``` - -## ⚙️ AI Assistant Configuration - -### Recommended Configuration (using uvx) - -Configure custom MCP server in Cursor settings, or manually edit `mcp.json`: - -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uvx", - "args": [ - "mcp-feedback-enhanced@latest" - ], - "timeout": 600, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### Alternative Configuration (running from source) - -If you need to use source version or want to customize environment variables: - -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uv", - "args": [ - "--directory", - "/path/to/mcp-feedback-enhanced", - "run", - "python", - "-m", - "mcp_feedback_enhanced" - ], - "timeout": 600, - "env": { - "FORCE_WEB": "true", - "MCP_DEBUG": "false" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -**Remember to modify the path to your actual project directory!** - -### Cline / Windsurf Configuration - -Similar configuration principles: Configure server commands in the MCP settings of each tool, using `mcp-feedback-enhanced` as the server identifier. - -## 🧪 Testing and Development - -### Testing with uvx +### Testing Options ```bash -# Complete functionality test (recommended) -uvx mcp-feedback-enhanced@latest test +# Interface-specific testing +uvx mcp-feedback-enhanced@latest test --gui # Qt GUI only +uvx mcp-feedback-enhanced@latest test --web # Web UI only -# Qt GUI specific test -uvx mcp-feedback-enhanced@latest test --gui - -# Web UI specific test -uvx mcp-feedback-enhanced@latest test --web - -# Persistent test mode (doesn't close after test, allows interactive testing) -uvx mcp-feedback-enhanced@latest test --persistent -uvx mcp-feedback-enhanced@latest test --gui --persistent -uvx mcp-feedback-enhanced@latest test --web --persistent - -# View version -uvx mcp-feedback-enhanced@latest version - -# Enable debug mode testing +# Debug mode MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test ``` -### Testing from Source +### Developer Installation ```bash -# Complete functionality test +git clone https://github.com/Minidoracat/mcp-feedback-enhanced.git +cd mcp-feedback-enhanced +uv sync uv run python -m mcp_feedback_enhanced test - -# Qt GUI specific test -uv run python -m mcp_feedback_enhanced test --gui - -# Web UI specific test -uv run python -m mcp_feedback_enhanced test --web - -# Persistent test mode -uv run python -m mcp_feedback_enhanced test --persistent - -# Enable debug mode -MCP_DEBUG=true uv run python -m mcp_feedback_enhanced test ``` -### Development Mode -Run server with FastMCP development mode and open test interface: -```bash -# From source -uv run fastmcp dev src/mcp_feedback_enhanced/server.py -``` +## 🆕 Version Highlights -### Test Options Description -- **No parameter `test`**: Execute complete test suite (environment detection, parameter validation, MCP integration, Web UI) -- **`--gui`**: Specifically test Qt GUI functionality and interface -- **`--web`**: Specifically test Web UI functionality and WebSocket communication -- **`--persistent`**: Persistent mode, keeps running after test completion for interactive testing +### v2.0.14 (Latest) +- ⌨️ Enhanced Shortcuts: Ctrl+Enter supports numpad +- 🖼️ Smart Image Pasting: Ctrl+V directly pastes clipboard images -## 🌟 Feature Highlights +### v2.0.9 +- 🌏 Multi-language architecture refactor with dynamic loading +- 📁 Modularized language file organization -### 🖥️ Dual Interface Support -- **Qt GUI**: Suitable for local development environments, providing native experience -- **Web UI**: Suitable for SSH remote development environments, modern interface +### v2.0.3 +- 🛡️ Complete fix for Chinese character encoding issues +- 🔧 Resolved JSON parsing errors -### 🔍 Smart Environment Detection -- Auto-detect SSH connection environment variables -- Detect DISPLAY settings (Linux) -- Detect VSCode Remote development environment -- Automatically select the most suitable interface +### v2.0.0 +- ✅ Added Web UI support for remote environments +- ✅ Auto environment detection and interface selection +- ✅ WebSocket real-time communication -### 💻 Command Execution Features -- Real-time command execution and output display -- Support command interruption and process tree termination -- Automatic working directory setup -- Command history recording - -### 🎨 Modern Interface -- Dark theme design -- Responsive layout (supports mobile browsers) -- WebSocket real-time communication -- Loading animations and visual feedback - -### 🖼️ Image Processing Features -- Support multiple image formats (PNG, JPG, JPEG, GIF, BMP, WebP) -- Smart file size detection and compression -- Drag & drop upload and clipboard support -- Automatic conversion to MCP Image objects -- Base64 encoding and preview - -## 🛠️ Environment Variables - -### Core Environment Variables - -| Environment Variable | Purpose | Available Values | Default | -|---------------------|---------|------------------|---------| -| `FORCE_WEB` | Force use Web UI | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | -| `MCP_DEBUG` | Enable debug mode | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | -| `INCLUDE_BASE64_DETAIL` | Include full Base64 in image feedback | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | - -### Usage Examples - -**In MCP configuration**: -```json -"env": { - "FORCE_WEB": "true", // Force use Web UI - "MCP_DEBUG": "false", // Turn off debug output (recommended for production) - "INCLUDE_BASE64_DETAIL": "true" // Include full image Base64 data -} -``` - -**In command line**: -```bash -# Enable debug mode testing -MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test -``` - -## 📖 Usage Examples - -### 1. **Recommended MCP Configuration (uvx)** - -Simple configuration using uvx: -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uvx", - "args": [ - "mcp-feedback-enhanced@latest" - ], - "timeout": 600, - "env": { - "MCP_DEBUG": "false" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### 2. **Custom Environment Variable Configuration** - -If you need custom environment variables (e.g., force Web UI): -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uv", - "args": [ - "--directory", - "/path/to/mcp-feedback-enhanced", - "run", - "python", - "-m", - "mcp_feedback_enhanced" - ], - "timeout": 600, - "env": { - "FORCE_WEB": "true", - "MCP_DEBUG": "false", - "INCLUDE_BASE64_DETAIL": "true" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### 3. **Tool Call Example** - -AI assistant will call the `mcp-feedback-enhanced` tool like this: - -```xml - - mcp-feedback-enhanced - interactive_feedback - - { - "project_directory": "/path/to/your/project", - "summary": "I have implemented your requested changes and refactored the main module. Please review the results and provide feedback." - } - - -``` - -## 🔄 Workflow - -1. **AI Assistant Call** - AI calls `mcp-feedback-enhanced` after completing tasks -2. **Environment Detection** - System automatically detects runtime environment -3. **Interface Launch** - Launches Qt GUI or Web UI based on environment -4. **User Interaction** - Users can: - - Execute commands and view output - - Provide text feedback (supports Ctrl+Enter quick submission, compatible with main keyboard and numpad) - - Upload images (drag & drop, clipboard paste Ctrl+V) - - Use multi-language interface switching -5. **Feedback Delivery** - User feedback (including images) is sent back to AI assistant -6. **Process Continuation** - AI continues or ends task based on feedback - -## 🆕 Version Updates - -### v2.0.14 - Enhanced Keyboard Shortcuts (Latest) -- ⌨️ **Numpad Support**: Ctrl+Enter shortcut now supports both main keyboard and numpad Enter keys -- 🖼️ **Smart Image Pasting**: Ctrl+V can directly paste clipboard images in feedback dialog without additional upload steps -- 🎮 **Dual Shortcut Mechanism**: GUI uses dual QShortcut setup ensuring full compatibility -- 🌐 **Web UI Shortcut Enhancement**: Uses key/code dual detection mechanism supporting all Enter key variants -- 💡 **User Experience Improvements**: Updated trilingual hint texts clearly indicating numpad support and image pasting functionality -- 🔧 **API Simplification**: Removed `force_web_ui` parameter, simplified API design with only environment variable control -- 📝 **Documentation Updates**: Updated all related documentation, removed redundant examples - -### v2.0.9 - Multi-language Architecture Enhancement -- 🌏 **Complete Multi-language Architecture Restructuring**: Migrated from embedded translations to structured JSON-based system -- 📁 **Organized Language Files**: Separated language files into `src/mcp_feedback_enhanced/locales/` directory structure -- 🔧 **Enhanced Internationalization**: Dynamic loading with nested key structure and browser language detection -- 📚 **Comprehensive Documentation**: Added detailed README for translation contributors with examples and guidelines -- 🔄 **Backward Compatibility**: Maintained full compatibility with existing code while enabling modern features -- 🖼️ **Interface Screenshots Update**: Added comprehensive screenshots showcasing both English and Traditional Chinese interfaces -- 📝 **Documentation Enhancement**: Updated README files with multi-language screenshots and feature descriptions -- 🛡️ **Enhanced Error Handling**: Improved stability and error recovery mechanisms -- 🚀 **Performance Optimizations**: Faster startup times and improved resource management -- 🔧 **Bug Fixes**: Various minor fixes and improvements -- 📦 **Package Optimization**: Better dependency management and build process -- 🎨 **Visual Improvements**: Enhanced button visibility and color consistency -- 🖱️ **Interaction Fixes**: Improved drag-and-drop indicators and empty state hints -- 📱 **Responsive Design**: Better layout adaptation for different screen sizes -- 🌐 **Language Switching**: Fixed Qt GUI language switching with proper checkmarks - -### v2.0.3 - Encoding and Communication Fix -- 🛡️ **Complete Chinese Character Encoding Fix**: Perfect Chinese character display support -- 🔧 **JSON Parsing Error Resolution**: Fixed MCP client "Unexpected token" errors -- 🎛️ **Controllable Debug Mode**: Debug output control via `MCP_DEBUG` environment variable -- 🖼️ **Enhanced Image Support**: Improved image processing and Base64 encoding -- 🚀 **Output Isolation**: Strict separation of debug output from MCP communication -- 📦 **Package Optimization**: Improved uvx installation experience and dependency management - -### v2.0.0 - Web UI and Remote Support -- ✅ **Web UI Interface**: Added Web UI support for SSH remote development environments -- ✅ **Automatic Environment Detection**: Smart interface selection based on environment -- ✅ **WebSocket Real-time Communication**: Live command execution and feedback -- ✅ **Modern Dark Theme**: Beautiful dark theme with responsive design -- ✅ **Persistent Testing Mode**: Enhanced testing capabilities - -### v1.0.0 - Foundation (Original Author) -- ✅ **Qt GUI Interface**: Native desktop interface -- ✅ **Command Execution**: Real-time command execution and output -- ✅ **MCP Protocol Support**: Full Model Context Protocol implementation -- ✅ **Cross-platform Support**: Windows, macOS, and Linux compatibility - -## 🐛 Troubleshooting - -### Common Issues +## 🐛 Common Issues **Q: Getting "Unexpected token 'D'" error** -A: This is usually caused by debug output interference. Ensure `MCP_DEBUG=false` is set in production environment or don't set this environment variable. +A: Debug output interference. Set `MCP_DEBUG=false` or remove the environment variable. -**Q: Chinese characters display as garbled text** -A: Completely fixed in v2.0.3. If still having issues, please update to latest version: `uvx mcp-feedback-enhanced@latest` +**Q: Chinese character garbled text** +A: Fixed in v2.0.3. Update to latest version: `uvx mcp-feedback-enhanced@latest` **Q: Image upload fails** -A: Check if image size exceeds 1MB limit and ensure format is supported (PNG, JPG, JPEG, GIF, BMP, WebP). +A: Check file size (≤1MB) and format (PNG/JPG/GIF/BMP/WebP). **Q: Web UI won't start** -A: Ensure firewall allows local port access, or try setting `FORCE_WEB=true` environment variable. +A: Set `FORCE_WEB=true` or check firewall settings. -### Debug Mode +## 🙏 Acknowledgments -For detailed debug information, please enable debug mode: -```bash -# Set debug environment variable -MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test -``` - -## 🙏 Acknowledgments & Contact - -### Original Author +### 🌟 Support Original Author **Fábio Ferreira** - [X @fabiomlferreira](https://x.com/fabiomlferreira) -**Original Project:** [noopstudios/interactive-feedback-mcp](https://github.com/noopstudios/interactive-feedback-mcp) +**Original Project:** [noopstudios/interactive-feedback-mcp](https://github.com/noopstudios/interactive-feedback-mcp) -If you find Interactive Feedback MCP useful, the best ways to show support are: -- 🌟 **Star the original project**: [Click here to star the original repo](https://github.com/noopstudios/interactive-feedback-mcp) ⭐ -- 📱 **Follow the original author**: [@fabiomlferreira](https://x.com/fabiomlferreira) on X +If you find this useful, please: +- ⭐ [Star the original project](https://github.com/noopstudios/interactive-feedback-mcp) +- 📱 [Follow the original author](https://x.com/fabiomlferreira) -### UI Design Inspiration -**sanshao85** - [mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) -Thanks for providing modern interface design inspiration, making this project's UI more beautiful and user-friendly. - -### Fork Maintainer -For questions about Web UI functionality, image support, or other issues, please submit at [GitHub Issues](https://github.com/Minidoracat/mcp-feedback-enhanced/issues). +### Design Inspiration +**sanshao85** - [mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) ### Community Support -Join our Discord community for real-time assistance and discussions: -**Discord Community:** [https://discord.gg/Gur2V67](https://discord.gg/Gur2V67) -Feel free to ask any questions in the community! - -### Related Resources -- [Model Context Protocol](https://modelcontextprotocol.io/) - Official MCP documentation +- **Discord:** [https://discord.gg/Gur2V67](https://discord.gg/Gur2V67) +- **Issues:** [GitHub Issues](https://github.com/Minidoracat/mcp-feedback-enhanced/issues) ## 📄 License -This project is licensed under the MIT License. See [LICENSE](LICENSE) file for details. +MIT License - See [LICENSE](LICENSE) file for details --- - -**🌟 Welcome to Star this project and share it with more developers!** \ No newline at end of file +**🌟 Welcome to Star and share with more developers!** \ No newline at end of file diff --git a/README.zh-CN.md b/README.zh-CN.md index d3ca055..85ca7b3 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -1,523 +1,192 @@ -# Interactive Feedback MCP(交互反馈 MCP) +# Interactive Feedback MCP(互动回馈 MCP) **🌐 语言切换 / Language:** [English](README.md) | [繁體中文](README.zh-TW.md) | **简体中文** -**原作者:** [Fábio Ferreira](https://x.com/fabiomlferreira) | [原始项目](https://github.com/noopstudios/interactive-feedback-mcp) ⭐ +**原作者:** [Fábio Ferreira](https://x.com/fabiomlferreira) | [原始专案](https://github.com/noopstudios/interactive-feedback-mcp) ⭐ **分支版本:** [Minidoracat](https://github.com/Minidoracat) -**UI 设计参考:** [sanshao85/mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) - 感谢提供现代化界面设计灵感 -**相关资源:** [dotcursorrules.com](https://dotcursorrules.com/) 提供更多 AI 开发增强工具 +**UI 设计参考:** [sanshao85/mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) -这是一个简单的 [MCP 服务器](https://modelcontextprotocol.io/),用于在 AI 辅助开发工具(如 [Cursor](https://www.cursor.com))中实现人在回路(human-in-the-loop)的工作流程。该服务器允许您执行命令、查看输出并直接向 AI 提供文字反馈和图片。同时支持 [Cline](https://cline.bot) 和 [Windsurf](https://windsurf.com)。 +## 🎯 核心概念 -## ✨ 新功能特色 +这是一个 [MCP 伺服器](https://modelcontextprotocol.io/),在 AI 辅助开发工具中实现**人在回路(human-in-the-loop)**的工作流程。透过引导 AI 与用户确认而非进行推测性操作,可将多达 25 次工具调用合并为单次回馈导向请求,大幅节省平台成本。 -### 🌐 完整的 SSH Remote 支持 -- **自动环境检测**:智能检测运行环境并选择适当界面 -- **本地环境**:使用原有的 Qt GUI 界面 -- **SSH Remote 环境**:自动切换到现代化 Web UI -- **实时通讯**:基于 WebSocket 的实时命令输出和反馈 -- **深色主题**:提供现代化的深色主题界面 +**支援平台:** [Cursor](https://www.cursor.com) | [Cline](https://cline.bot) | [Windsurf](https://windsurf.com) -### 🖼️ 图片上传支持 -- **多格式支持**:PNG、JPG、JPEG、GIF、BMP、WebP -- **拖拽上传**:支持拖拽文件到界面 -- **剪贴板支持**:直接从剪贴板粘贴图片 -- **自动压缩**:智能压缩大图片以符合 1MB 限制 -- **MCP 整合**:图片自动转换为 MCP Image 对象 +### 🔄 工作流程 +1. **AI 调用** → `mcp-feedback-enhanced` +2. **环境检测** → 自动选择合适介面 +3. **用户互动** → 命令执行、文字回馈、图片上传 +4. **回馈传递** → 资讯返回 AI +5. **流程继续** → 根据回馈调整或结束 -### 🛡️ 稳定性改善 -- **编码修复**:完全解决中文字符乱码问题 -- **调试控制**:可控制的调试输出,避免 JSON 解析错误 -- **错误处理**:强化错误处理,确保程序稳定运行 -- **输出隔离**:严格隔离调试输出与 MCP 通信 +## 🌟 主要功能 -### 🌏 多语言支持 -- **完整国际化**:采用结构化 JSON 翻译文件的完整多语言支持 -- **支持语言**:繁体中文、英文、简体中文 -- **智能检测**:根据系统语言环境自动检测 -- **易于扩充**:基于 JSON 的简单翻译系统,方便新增语言 -- **向后兼容**:与现有程序代码完全向后兼容 +### 🖥️ 双介面系统 +- **Qt GUI**:本地环境原生体验 +- **Web UI**:远端 SSH 环境现代化界面 +- **智能切换**:自动检测环境并选择最适介面 -## 🖥️ 界面预览 +### 🖼️ 图片支援 +- **格式支援**:PNG、JPG、JPEG、GIF、BMP、WebP +- **上传方式**:拖拽档案 + 剪贴板粘贴(Ctrl+V) +- **自动处理**:智能压缩确保符合 1MB 限制 -### Qt GUI 界面(本地环境) -![Qt GUI Interface - Traditional Chinese](docs/images/gui-zh-tw.png) +### 🌏 多语言 +- **三语支援**:繁体中文、英文、简体中文 +- **智能侦测**:根据系统语言自动选择 +- **即时切换**:介面内可直接切换语言 -### Web UI 界面(SSH Remote 环境) -![Web UI Interface - Traditional Chinese](docs/images/web-zh-tw.png) +## 🖥️ 介面预览 -两种界面都支持: -- 💬 文字反馈输入 -- 🖼️ 图片上传(支持拖拽、剪贴板粘贴) -- ⚡ 实时命令执行 -- ⌨️ **快捷键支持**: - - Ctrl+Enter 快速提交反馈(支持主键盘和数字键盘) - - Ctrl+V 直接在反馈对话框中贴上剪贴板图片 -- 🎨 现代化深色主题 -- 📱 响应式设计(Web UI) -- 🌐 多语言支持(繁体中文、英文、简体中文) +![Qt GUI Interface](docs/images/gui-zh-tw.png) +*Qt GUI 介面 - 本地环境* -## 🎯 为什么使用这个工具? +![Web UI Interface](docs/images/web-zh-tw.png) +*Web UI 介面 - SSH Remote 环境* -通过引导 AI 助手与用户进行确认,而非进行推测性的高成本工具调用,此模块可以大幅减少平台(如 Cursor)上的付费请求次数。在某些情况下,它可以将多达 25 次工具调用合并为单次反馈导向的请求,节省资源并提升性能。 +**快捷键支援** +- `Ctrl+Enter`:提交回馈(主键盘与数字键盘皆支援) +- `Ctrl+V`:直接粘贴剪贴板图片 -## 📝 提示工程设定 +## 🚀 快速开始 -为了获得最佳效果,请在您的 AI 助手中添加以下自定义提示(例如在 Cursor 的规则或提示中): +### 1. 安装与测试 +```bash +# 安装 uv(如果尚未安装) +pip install uv -### 基本提示 -> 每当你想要询问问题时,请务必调用 MCP `mcp-feedback-enhanced`。 -> 每当你即将完成用户请求时,请调用 MCP `mcp-feedback-enhanced` 而不是直接结束流程。 -> 持续调用 MCP 直到用户的反馈为空,然后才结束请求。 +# 快速测试 +uvx mcp-feedback-enhanced@latest test + +# 可互动测试 +uvx mcp-feedback-enhanced@latest test --persistent +``` + +### 2. 配置 MCP +**基本配置**(适合大多数用户): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +**进阶配置**(需要自订环境): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "env": { + "FORCE_WEB": "true", + "MCP_DEBUG": "false" + }, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +### 3. 设定提示工程 +为了获得最佳效果,请在 AI 助手中添加以下规则: -### 完整规则范例 ``` # MCP Interactive Feedback 规则 -1. 在任何流程、任务、对话进行时,无论是询问、回复、或完成阶段性任务,皆必须调用 MCP mcp-feedback-enhanced。 -2. 每当收到用户反馈,若反馈内容非空,必须再次调用 MCP mcp-feedback-enhanced,并根据反馈内容调整行为。 -3. 仅当用户明确表示「结束」或「不再需要交互」时,才可停止调用 MCP mcp-feedback-enhanced,流程才算结束。 -4. 除非收到结束指令,否则所有步骤都必须重复调用 MCP mcp-feedback-enhanced。 +1. 在任何流程、任务、对话进行时,无论是询问、回复、或完成阶段性任务,皆必须呼叫 MCP mcp-feedback-enhanced。 +2. 每当收到使用者回馈,若回馈内容非空,必须再次呼叫 MCP mcp-feedback-enhanced,并根据回馈内容调整行为。 +3. 仅当使用者明确表示「结束」或「不再需要互动」时,才可停止呼叫 MCP mcp-feedback-enhanced,流程才算结束。 +4. 除非收到结束指令,否则所有步骤都必须重复呼叫 MCP mcp-feedback-enhanced。 ``` -这将确保您的 AI 助手在标记任务完成前使用此 MCP 服务器请求用户反馈。 +## ⚙️ 进阶设定 -## 🔧 环境检测与配置 +### 环境变数 +| 变数 | 用途 | 值 | 默认 | +|------|------|-----|------| +| `FORCE_WEB` | 强制使用 Web UI | `true`/`false` | `false` | +| `MCP_DEBUG` | 调试模式 | `true`/`false` | `false` | +| `INCLUDE_BASE64_DETAIL` | 图片完整 Base64 | `true`/`false` | `false` | -系统会自动检测运行环境并选择适当的界面: - -### Qt GUI(本地环境) -- 使用 Qt 的 `QSettings` 按项目基础存储配置 -- 包含命令设定、自动执行选项、窗口几何状态等 -- 设定通常存储在平台特定位置(Windows 注册表、macOS plist 文件、Linux 配置目录) - -### Web UI(SSH Remote 环境) -- 基于 FastAPI 和 WebSocket 的现代化界面 -- 支持实时命令执行和输出显示 -- 自动浏览器启动和会话管理 -- 深色主题和响应式设计 - -### 调试模式控制 -- **生产模式**:默认关闭所有调试输出,确保与 MCP 客户端完美兼容 -- **调试模式**:设置 `MCP_DEBUG=true` 启用详细调试信息 -- **输出隔离**:所有调试信息输出到 stderr,不干扰 MCP 通信 - -## 🚀 安装说明 - -### 方法 1:uvx 安装(推荐) - -**这是最简单的方法,无需手动管理依赖项或虚拟环境:** - -1. **安装 uv**(如果尚未安装) - ```bash - # Windows - pip install uv - - # Linux/Mac - curl -LsSf https://astral.sh/uv/install.sh | sh - ``` - -2. **测试安装** - ```bash - # 查看版本信息(推荐使用 @latest 确保最新版本) - uvx mcp-feedback-enhanced@latest version - - # 执行测试 - uvx mcp-feedback-enhanced@latest test - - # 持久化测试模式(可在浏览器中实际测试) - uvx mcp-feedback-enhanced@latest test --persistent - ``` - -### 方法 2:从源码安装(开发者) - -适合需要修改代码或贡献开发的用户: - -1. **获取程序代码** - ```bash - git clone https://github.com/Minidoracat/mcp-feedback-enhanced.git - cd mcp-feedback-enhanced - ``` - -2. **安装依赖项** - ```bash - uv sync - ``` - -3. **测试安装** - ```bash - # 基本功能测试 - uv run python -m mcp_feedback_enhanced test - - # 持久化测试模式(可在浏览器中实际测试) - uv run python -m mcp_feedback_enhanced test --persistent - ``` - -4. **运行 MCP 服务器** - ```bash - uv run python -m mcp_feedback_enhanced - ``` - -## ⚙️ AI 助手配置 - -### 推荐配置(使用 uvx) - -在 Cursor 的设定中配置自定义 MCP 服务器,或手动编辑 `mcp.json`: - -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uvx", - "args": [ - "mcp-feedback-enhanced@latest" - ], - "timeout": 600, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### 替代配置(从源码运行) - -如果您需要使用源码版本或想要自定义环境变量: - -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uv", - "args": [ - "--directory", - "/path/to/mcp-feedback-enhanced", - "run", - "python", - "-m", - "mcp_feedback_enhanced" - ], - "timeout": 600, - "env": { - "FORCE_WEB": "true", - "MCP_DEBUG": "false" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -**记得将路径修改为您实际的项目目录!** - -### Cline / Windsurf 配置 - -类似的设定原则:在各工具的 MCP 设定中配置服务器命令,使用 `mcp-feedback-enhanced` 作为服务器标识符。 - -## 🧪 测试和开发 - -### 使用 uvx 测试 +### 测试选项 ```bash -# 完整功能测试(推荐) -uvx mcp-feedback-enhanced@latest test +# 指定介面测试 +uvx mcp-feedback-enhanced@latest test --gui # 仅测试 Qt GUI +uvx mcp-feedback-enhanced@latest test --web # 仅测试 Web UI -# Qt GUI 专门测试 -uvx mcp-feedback-enhanced@latest test --gui - -# Web UI 专门测试 -uvx mcp-feedback-enhanced@latest test --web - -# 持久化测试模式(测试完不关闭,可交互测试) -uvx mcp-feedback-enhanced@latest test --persistent -uvx mcp-feedback-enhanced@latest test --gui --persistent -uvx mcp-feedback-enhanced@latest test --web --persistent - -# 查看版本 -uvx mcp-feedback-enhanced@latest version - -# 启用调试模式测试 +# 调试模式 MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test ``` -### 从源码测试 +### 开发者安装 ```bash -# 完整功能测试 +git clone https://github.com/Minidoracat/mcp-feedback-enhanced.git +cd mcp-feedback-enhanced +uv sync uv run python -m mcp_feedback_enhanced test - -# Qt GUI 专门测试 -uv run python -m mcp_feedback_enhanced test --gui - -# Web UI 专门测试 -uv run python -m mcp_feedback_enhanced test --web - -# 持久化测试模式 -uv run python -m mcp_feedback_enhanced test --persistent - -# 启用调试模式 -MCP_DEBUG=true uv run python -m mcp_feedback_enhanced test ``` -### 开发模式 -使用 FastMCP 开发模式运行服务器并开启测试界面: -```bash -# 从源码 -uv run fastmcp dev src/mcp_feedback_enhanced/server.py -``` +## 🆕 版本亮点 -### 测试选项说明 -- **无参数 `test`**:执行完整测试套件(环境检测、参数验证、MCP 整合、Web UI) -- **`--gui`**:专门测试 Qt GUI 功能和界面 -- **`--web`**:专门测试 Web UI 功能和 WebSocket 通信 -- **`--persistent`**:持久化模式,测试完成后保持运行,方便交互测试 +### v2.0.14(最新) +- ⌨️ 增强快捷键:Ctrl+Enter 支援数字键盘 +- 🖼️ 智能图片贴上:Ctrl+V 直接贴上剪贴板图片 -## 🌟 功能特色 +### v2.0.9 +- 🌏 多语言架构重构,支援动态载入 +- 📁 语言档案模组化组织 -### 🖥️ 双界面支持 -- **Qt GUI**:适用于本地开发环境,提供原生体验 -- **Web UI**:适用于 SSH remote 开发环境,现代化界面 +### v2.0.3 +- 🛡️ 完全修复中文字符编码问题 +- 🔧 解决 JSON 解析错误 -### 🔍 智能环境检测 -- 自动检测 SSH 连接环境变量 -- 检测 DISPLAY 设定(Linux) -- 检测 VSCode Remote 开发环境 -- 自动选择最适合的界面 +### v2.0.0 +- ✅ 新增 Web UI 支援远端环境 +- ✅ 自动环境检测与介面选择 +- ✅ WebSocket 即时通讯 -### 💻 命令执行功能 -- 实时命令执行和输出显示 -- 支持命令中断和进程树终止 -- 自动工作目录设定 -- 命令历史记录 - -### 🎨 现代化界面 -- 深色主题设计 -- 响应式布局(支持手机浏览器) -- WebSocket 实时通信 -- 加载动画和视觉反馈 - -### 🖼️ 图片处理功能 -- 支持多种图片格式(PNG、JPG、JPEG、GIF、BMP、WebP) -- 智能文件大小检测和压缩 -- 拖拽上传和剪贴板支持 -- 自动转换为 MCP Image 对象 -- Base64 编码和预览 - -## 🛠️ 环境变量配置 - -### 核心环境变量 - -| 环境变量 | 用途 | 可用值 | 默认值 | -|---------|------|--------|--------| -| `FORCE_WEB` | 强制使用 Web UI | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | -| `MCP_DEBUG` | 启用调试模式 | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | -| `INCLUDE_BASE64_DETAIL` | 图片反馈包含完整 Base64 | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | - -### 使用范例 - -**在 MCP 配置中设定**: -```json -"env": { - "FORCE_WEB": "true", // 强制使用 Web UI - "MCP_DEBUG": "false", // 关闭调试输出(推荐生产环境) - "INCLUDE_BASE64_DETAIL": "true" // 包含完整图片 Base64 数据 -} -``` - -**在命令行中设定**: -```bash -# 启用调试模式测试 -MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test -``` - -## 📖 使用范例 - -### 1. **推荐 MCP 配置(uvx)** - -使用 uvx 的简洁配置: -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uvx", - "args": [ - "mcp-feedback-enhanced@latest" - ], - "timeout": 600, - "env": { - "MCP_DEBUG": "false" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### 2. **自定义环境变量配置** - -如需要自定义环境变量(例如强制使用 Web UI): -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uv", - "args": [ - "--directory", - "/path/to/mcp-feedback-enhanced", - "run", - "python", - "-m", - "mcp_feedback_enhanced" - ], - "timeout": 600, - "env": { - "FORCE_WEB": "true", - "MCP_DEBUG": "false", - "INCLUDE_BASE64_DETAIL": "true" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### 3. **工具调用范例** - -AI 助手会如此调用 `mcp-feedback-enhanced` 工具: - -```xml - - mcp-feedback-enhanced - interactive_feedback - - { - "project_directory": "/path/to/your/project", - "summary": "我已经实现了您请求的更改并重构了主模块。请查看结果并提供反馈。" - } - - -``` - -## 🔄 工作流程 - -1. **AI 助手调用** - AI 完成任务后调用 `mcp-feedback-enhanced` -2. **环境检测** - 系统自动检测运行环境 -3. **界面启动** - 根据环境启动 Qt GUI 或 Web UI -4. **用户交互** - 用户可以: - - 执行命令和查看输出 - - 提供文字反馈(支持 Ctrl+Enter 快速提交,兼容主键盘和数字键盘) - - 上传图片(拖拽、剪贴板粘贴 Ctrl+V) - - 使用多语言界面切换 -5. **反馈传递** - 用户反馈(包括图片)传回给 AI 助手 -6. **流程继续** - AI 根据反馈继续或结束任务 - -## 🆕 版本更新 - -### v2.0.14 - 增强快捷键支持(最新版) -- ⌨️ **数字键盘支持**:Ctrl+Enter 快捷键现在同时支持主键盘和数字键盘的 Enter 键 -- 🖼️ **智能图片贴上**:Ctrl+V 可直接在反馈对话框中贴上剪贴板图片,无需额外上传步骤 -- 🎮 **双重快捷键机制**:GUI 使用 QShortcut 双重设定,确保完整兼容性 -- 🌐 **Web UI 快捷键增强**:使用 key/code 双重检测机制,支持所有 Enter 键变体 -- 💡 **用户体验改善**:更新三语言提示文字,明确标示数字键盘支持和图片贴上功能 -- 🔧 **API 简化**:移除 `force_web_ui` 参数,简化 API 设计,只保留环境变量控制 -- 📝 **文档更新**:更新所有相关说明文档,移除冗余范例 - -### v2.0.9 - 多语言架构重构 -- 🌏 **完整多语言架构重构**:从嵌入式翻译迁移到结构化 JSON 基础系统 -- 📁 **语言文件组织化**:将语言文件分离到 `src/mcp_feedback_enhanced/locales/` 目录结构 -- 🔧 **增强国际化功能**:动态加载与嵌套键值结构,支持浏览器语言检测 -- 📚 **完整文档说明**:为翻译贡献者新增详细 README,包含范例和指南 -- 🔄 **向后兼容性**:在启用现代功能的同时保持与现有程序代码的完全兼容性 -- 🖼️ **界面截图更新**:新增完整截图展示英文和繁体中文界面 -- 📝 **文档强化**:更新 README 文件,加入多语言截图和功能说明 -- 🛡️ **增强错误处理**:改善稳定性和错误恢复机制 -- 🚀 **性能优化**:更快的启动时间和改善的资源管理 -- 🔧 **错误修复**:各种小型修复和改善 -- 📦 **包优化**:更好的依赖管理和构建流程 -- 🎨 **视觉改善**:增强按钮可见性和颜色一致性 -- 🖱️ **交互修复**:改善拖拽指示器和空状态提示 -- 📱 **响应式设计**:更好的不同屏幕尺寸适应 -- 🌐 **语言切换**:修复 Qt GUI 语言切换,加入适当的勾选标记 - -### v2.0.3 - 编码与通信修复 -- 🛡️ **完全修复中文字符编码问题**:支持完美的中文显示 -- 🔧 **解决 JSON 解析错误**:修复 MCP 客户端的 "Unexpected token" 错误 -- 🎛️ **可控调试模式**:通过 `MCP_DEBUG` 环境变量控制调试输出 -- 🖼️ **强化图片支持**:改善图片处理和 Base64 编码 -- 🚀 **输出隔离**:严格分离调试输出与 MCP 通信 -- 📦 **包优化**:改善 uvx 安装体验和依赖管理 - -### v2.0.0 - Web UI 与远程支持 -- ✅ **Web UI 界面**:新增 Web UI 支持 SSH remote 开发环境 -- ✅ **自动环境检测**:根据环境智能选择界面 -- ✅ **WebSocket 实时通信**:实时命令执行和反馈 -- ✅ **现代化深色主题**:美观的深色主题与响应式设计 -- ✅ **持久化测试模式**:增强的测试功能 - -### v1.0.0 - 基础版本(原作者) -- ✅ **Qt GUI 界面**:原生桌面界面 -- ✅ **命令执行**:实时命令执行和输出 -- ✅ **MCP 协议支持**:完整的模型上下文协议实现 -- ✅ **跨平台支持**:Windows、macOS 和 Linux 兼容性 - -## 🐛 故障排除 - -### 常见问题 +## 🐛 常见问题 **Q: 出现 "Unexpected token 'D'" 错误** -A: 这通常是调试输出干扰造成的。确保在生产环境中设置 `MCP_DEBUG=false` 或不设置该环境变量。 +A: 调试输出干扰。设置 `MCP_DEBUG=false` 或移除该环境变数。 -**Q: 中文字符显示为乱码** -A: 已在 v2.0.3 中完全修复。如果仍有问题,请更新到最新版本:`uvx mcp-feedback-enhanced@latest` +**Q: 中文字符乱码** +A: 已在 v2.0.3 修复。更新到最新版本:`uvx mcp-feedback-enhanced@latest` **Q: 图片上传失败** -A: 检查图片大小是否超过 1MB 限制,并确保格式为支持的类型(PNG、JPG、JPEG、GIF、BMP、WebP)。 +A: 检查档案大小(≤1MB)和格式(PNG/JPG/GIF/BMP/WebP)。 **Q: Web UI 无法启动** -A: 确保防火墙允许本地端口访问,或尝试设置 `FORCE_WEB=true` 环境变量。 +A: 设置 `FORCE_WEB=true` 或检查防火墙设定。 -### 调试模式 +## 🙏 致谢 -如需详细调试信息,请启用调试模式: -```bash -# 设置调试环境变量 -MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test -``` - -## 🙏 致谢与联系 - -### 原作者 +### 🌟 支持原作者 **Fábio Ferreira** - [X @fabiomlferreira](https://x.com/fabiomlferreira) -**原始项目:** [noopstudios/interactive-feedback-mcp](https://github.com/noopstudios/interactive-feedback-mcp) +**原始专案:** [noopstudios/interactive-feedback-mcp](https://github.com/noopstudios/interactive-feedback-mcp) -如果您觉得 Interactive Feedback MCP 有用,最好的支持方式是: -- 🌟 **为原作者的项目按星星**:[按此前往并按星星](https://github.com/noopstudios/interactive-feedback-mcp) ⭐ -- 📱 **关注原作者的 X 账号**:[@fabiomlferreira](https://x.com/fabiomlferreira) +如果您觉得有用,请: +- ⭐ [为原专案按星星](https://github.com/noopstudios/interactive-feedback-mcp) +- 📱 [关注原作者](https://x.com/fabiomlferreira) -### UI 设计灵感 -**sanshao85** - [mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) -感谢提供现代化界面设计灵感,让本项目的 UI 更加美观和易用。 +### 设计灵感 +**sanshao85** - [mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) -### 分支维护者 -如有关于 Web UI 功能、图片支持或其他问题,欢迎在 [GitHub Issues](https://github.com/Minidoracat/mcp-feedback-enhanced/issues) 中提出。 +### 社群支援 +- **Discord:** [https://discord.gg/Gur2V67](https://discord.gg/Gur2V67) +- **Issues:** [GitHub Issues](https://github.com/Minidoracat/mcp-feedback-enhanced/issues) -### 社区支持 -加入我们的 Discord 社区获得实时协助和讨论: -**Discord 社区:** [https://discord.gg/Gur2V67](https://discord.gg/Gur2V67) -有任何问题都可以到社区中寻求帮助! +## 📄 授权 -### 相关资源 -- [Model Context Protocol](https://modelcontextprotocol.io/) - MCP 官方文档 - -## 📄 授权条款 - -本项目采用 MIT 授权条款。详见 [LICENSE](LICENSE) 文件。 +MIT 授权条款 - 详见 [LICENSE](LICENSE) 档案 --- - -**🌟 欢迎 Star 此项目并分享给更多开发者!** \ No newline at end of file +**🌟 欢迎 Star 并分享给更多开发者!** \ No newline at end of file diff --git a/README.zh-TW.md b/README.zh-TW.md index 5b5f00a..e8fe415 100644 --- a/README.zh-TW.md +++ b/README.zh-TW.md @@ -4,73 +4,100 @@ **原作者:** [Fábio Ferreira](https://x.com/fabiomlferreira) | [原始專案](https://github.com/noopstudios/interactive-feedback-mcp) ⭐ **分支版本:** [Minidoracat](https://github.com/Minidoracat) -**UI 設計參考:** [sanshao85/mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) - 感謝提供現代化界面設計靈感 -**相關資源:** [dotcursorrules.com](https://dotcursorrules.com/) 提供更多 AI 開發增強工具 +**UI 設計參考:** [sanshao85/mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) -這是一個簡單的 [MCP 伺服器](https://modelcontextprotocol.io/),用於在 AI 輔助開發工具(如 [Cursor](https://www.cursor.com))中實現人在回路(human-in-the-loop)的工作流程。該伺服器允許您執行命令、查看輸出並直接向 AI 提供文字回饋和圖片。同時支援 [Cline](https://cline.bot) 和 [Windsurf](https://windsurf.com)。 +## 🎯 核心概念 -## ✨ 新功能特色 +這是一個 [MCP 伺服器](https://modelcontextprotocol.io/),在 AI 輔助開發工具中實現**人在回路(human-in-the-loop)**的工作流程。透過引導 AI 與用戶確認而非進行推測性操作,可將多達 25 次工具調用合併為單次回饋導向請求,大幅節省平台成本。 -### 🌐 完整的 SSH Remote 支援 -- **自動環境檢測**:智能檢測運行環境並選擇適當介面 -- **本地環境**:使用原有的 Qt GUI 介面 -- **SSH Remote 環境**:自動切換到現代化 Web UI -- **即時通訊**:基於 WebSocket 的即時命令輸出和回饋 -- **深色主題**:提供現代化的深色主題界面 +**支援平台:** [Cursor](https://www.cursor.com) | [Cline](https://cline.bot) | [Windsurf](https://windsurf.com) -### 🖼️ 圖片上傳支援 -- **多格式支援**:PNG、JPG、JPEG、GIF、BMP、WebP -- **拖拽上傳**:支援拖拽文件到介面 -- **剪貼板支援**:直接從剪貼板粘貼圖片 -- **自動壓縮**:智能壓縮大圖片以符合 1MB 限制 -- **MCP 整合**:圖片自動轉換為 MCP Image 對象 +### 🔄 工作流程 +1. **AI 調用** → `mcp-feedback-enhanced` +2. **環境檢測** → 自動選擇合適介面 +3. **用戶互動** → 命令執行、文字回饋、圖片上傳 +4. **回饋傳遞** → 資訊返回 AI +5. **流程繼續** → 根據回饋調整或結束 -### 🛡️ 穩定性改善 -- **編碼修復**:完全解決中文字符亂碼問題 -- **調試控制**:可控制的調試輸出,避免 JSON 解析錯誤 -- **錯誤處理**:強化錯誤處理,確保程序穩定運行 -- **輸出隔離**:嚴格隔離調試輸出與 MCP 通信 +## 🌟 主要功能 -### 🌏 多語言支援 -- **完整國際化**:採用結構化 JSON 翻譯檔案的完整多語言支援 -- **支援語言**:繁體中文、英文、簡體中文 -- **智能偵測**:根據系統語言環境自動偵測 -- **易於擴充**:基於 JSON 的簡單翻譯系統,方便新增語言 -- **向後兼容**:與現有程式碼完全向後兼容 +### 🖥️ 雙介面系統 +- **Qt GUI**:本地環境原生體驗 +- **Web UI**:遠端 SSH 環境現代化界面 +- **智能切換**:自動檢測環境並選擇最適介面 + +### 🖼️ 圖片支援 +- **格式支援**:PNG、JPG、JPEG、GIF、BMP、WebP +- **上傳方式**:拖拽檔案 + 剪貼板粘貼(Ctrl+V) +- **自動處理**:智能壓縮確保符合 1MB 限制 + +### 🌏 多語言 +- **三語支援**:繁體中文、英文、簡體中文 +- **智能偵測**:根據系統語言自動選擇 +- **即時切換**:介面內可直接切換語言 ## 🖥️ 介面預覽 -### Qt GUI 介面(本地環境) -![Qt GUI Interface - Traditional Chinese](docs/images/gui-zh-tw.png) +![Qt GUI Interface](docs/images/gui-zh-tw.png) +*Qt GUI 介面 - 本地環境* -### Web UI 介面(SSH Remote 環境) -![Web UI Interface - Traditional Chinese](docs/images/web-zh-tw.png) +![Web UI Interface](docs/images/web-zh-tw.png) +*Web UI 介面 - SSH Remote 環境* -兩種介面都支援: -- 💬 文字回饋輸入 -- 🖼️ 圖片上傳(支援拖拽、剪貼板粘貼) -- ⚡ 即時命令執行 -- ⌨️ **快捷鍵支援**: - - Ctrl+Enter 快速提交回饋(支援主鍵盤和數字鍵盤) - - Ctrl+V 直接在回饋對話框中貼上剪貼板圖片 -- 🎨 現代化深色主題 -- 📱 響應式設計(Web UI) -- 🌐 多語言支援(繁體中文、英文、簡體中文) +**快捷鍵支援** +- `Ctrl+Enter`:提交回饋(主鍵盤與數字鍵盤皆支援) +- `Ctrl+V`:直接粘貼剪貼板圖片 -## 🎯 為什麼使用這個工具? +## 🚀 快速開始 -透過引導 AI 助手與用戶進行確認,而非進行推測性的高成本工具調用,此模組可以大幅減少平台(如 Cursor)上的付費請求次數。在某些情況下,它可以將多達 25 次工具調用合併為單次回饋導向的請求,節省資源並提升效能。 +### 1. 安裝與測試 +```bash +# 安裝 uv(如果尚未安裝) +pip install uv -## 📝 提示工程設定 +# 快速測試 +uvx mcp-feedback-enhanced@latest test -為了獲得最佳效果,請在您的 AI 助手中添加以下自訂提示(例如在 Cursor 的規則或提示中): +# 可互動測試 +uvx mcp-feedback-enhanced@latest test --persistent +``` -### 基本提示 -> 每當你想要詢問問題時,請務必調用 MCP `mcp-feedback-enhanced`。 -> 每當你即將完成用戶請求時,請調用 MCP `mcp-feedback-enhanced` 而不是直接結束流程。 -> 持續調用 MCP 直到用戶的回饋為空,然後才結束請求。 +### 2. 配置 MCP +**基本配置**(適合大多數用戶): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +**進階配置**(需要自訂環境): +```json +{ + "mcpServers": { + "mcp-feedback-enhanced": { + "command": "uvx", + "args": ["mcp-feedback-enhanced@latest"], + "timeout": 600, + "env": { + "FORCE_WEB": "true", + "MCP_DEBUG": "false" + }, + "autoApprove": ["interactive_feedback"] + } + } +} +``` + +### 3. 設定提示工程 +為了獲得最佳效果,請在 AI 助手中添加以下規則: -### 完整規則範例 ``` # MCP Interactive Feedback 規則 @@ -80,444 +107,86 @@ 4. 除非收到結束指令,否則所有步驟都必須重複呼叫 MCP mcp-feedback-enhanced。 ``` -這將確保您的 AI 助手在標記任務完成前使用此 MCP 伺服器請求用戶回饋。 +## ⚙️ 進階設定 -## 🔧 環境檢測與配置 +### 環境變數 +| 變數 | 用途 | 值 | 默認 | +|------|------|-----|------| +| `FORCE_WEB` | 強制使用 Web UI | `true`/`false` | `false` | +| `MCP_DEBUG` | 調試模式 | `true`/`false` | `false` | +| `INCLUDE_BASE64_DETAIL` | 圖片完整 Base64 | `true`/`false` | `false` | -系統會自動檢測運行環境並選擇適當的介面: - -### Qt GUI(本地環境) -- 使用 Qt 的 `QSettings` 按專案基礎儲存配置 -- 包含命令設定、自動執行選項、視窗幾何狀態等 -- 設定通常儲存在平台特定位置(Windows 登錄檔、macOS plist 檔案、Linux 配置目錄) - -### Web UI(SSH Remote 環境) -- 基於 FastAPI 和 WebSocket 的現代化界面 -- 支援即時命令執行和輸出顯示 -- 自動瀏覽器啟動和會話管理 -- 深色主題和響應式設計 - -### 調試模式控制 -- **生產模式**:默認關閉所有調試輸出,確保與 MCP 客戶端完美兼容 -- **調試模式**:設置 `MCP_DEBUG=true` 啟用詳細調試信息 -- **輸出隔離**:所有調試信息輸出到 stderr,不干擾 MCP 通信 - -## 🚀 安裝說明 - -### 方法 1:uvx 安裝(推薦) - -**這是最簡單的方法,無需手動管理依賴項或虛擬環境:** - -1. **安裝 uv**(如果尚未安裝) - ```bash - # Windows - pip install uv - - # Linux/Mac - curl -LsSf https://astral.sh/uv/install.sh | sh - ``` - -2. **測試安裝** - ```bash - # 查看版本信息(推薦使用 @latest 確保最新版本) - uvx mcp-feedback-enhanced@latest version - - # 執行測試 - uvx mcp-feedback-enhanced@latest test - - # 持久化測試模式(可在瀏覽器中實際測試) - uvx mcp-feedback-enhanced@latest test --persistent - ``` - -### 方法 2:從源碼安裝(開發者) - -適合需要修改代碼或貢獻開發的用戶: - -1. **取得程式碼** - ```bash - git clone https://github.com/Minidoracat/mcp-feedback-enhanced.git - cd mcp-feedback-enhanced - ``` - -2. **安裝依賴項** - ```bash - uv sync - ``` - -3. **測試安裝** - ```bash - # 基本功能測試 - uv run python -m mcp_feedback_enhanced test - - # 持久化測試模式(可在瀏覽器中實際測試) - uv run python -m mcp_feedback_enhanced test --persistent - ``` - -4. **運行 MCP 伺服器** - ```bash - uv run python -m mcp_feedback_enhanced - ``` - -## ⚙️ AI 助手配置 - -### 推薦配置(使用 uvx) - -在 Cursor 的設定中配置自訂 MCP 伺服器,或手動編輯 `mcp.json`: - -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uvx", - "args": [ - "mcp-feedback-enhanced@latest" - ], - "timeout": 600, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### 替代配置(從源碼運行) - -如果您需要使用源碼版本或想要自訂環境變數: - -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uv", - "args": [ - "--directory", - "/path/to/mcp-feedback-enhanced", - "run", - "python", - "-m", - "mcp_feedback_enhanced" - ], - "timeout": 600, - "env": { - "FORCE_WEB": "true", - "MCP_DEBUG": "false" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -**記得將路徑修改為您實際的專案目錄!** - -### Cline / Windsurf 配置 - -類似的設定原則:在各工具的 MCP 設定中配置伺服器命令,使用 `mcp-feedback-enhanced` 作為伺服器識別符。 - -## 🧪 測試和開發 - -### 使用 uvx 測試 +### 測試選項 ```bash -# 完整功能測試(推薦) -uvx mcp-feedback-enhanced@latest test +# 指定介面測試 +uvx mcp-feedback-enhanced@latest test --gui # 僅測試 Qt GUI +uvx mcp-feedback-enhanced@latest test --web # 僅測試 Web UI -# Qt GUI 專門測試 -uvx mcp-feedback-enhanced@latest test --gui - -# Web UI 專門測試 -uvx mcp-feedback-enhanced@latest test --web - -# 持久化測試模式(測試完不關閉,可互動測試) -uvx mcp-feedback-enhanced@latest test --persistent -uvx mcp-feedback-enhanced@latest test --gui --persistent -uvx mcp-feedback-enhanced@latest test --web --persistent - -# 查看版本 -uvx mcp-feedback-enhanced@latest version - -# 啟用調試模式測試 +# 調試模式 MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test ``` -### 從源碼測試 +### 開發者安裝 ```bash -# 完整功能測試 +git clone https://github.com/Minidoracat/mcp-feedback-enhanced.git +cd mcp-feedback-enhanced +uv sync uv run python -m mcp_feedback_enhanced test - -# Qt GUI 專門測試 -uv run python -m mcp_feedback_enhanced test --gui - -# Web UI 專門測試 -uv run python -m mcp_feedback_enhanced test --web - -# 持久化測試模式 -uv run python -m mcp_feedback_enhanced test --persistent - -# 啟用調試模式 -MCP_DEBUG=true uv run python -m mcp_feedback_enhanced test ``` -### 開發模式 -使用 FastMCP 開發模式運行伺服器並開啟測試界面: -```bash -# 從源碼 -uv run fastmcp dev src/mcp_feedback_enhanced/server.py -``` +## 🆕 版本亮點 -### 測試選項說明 -- **無參數 `test`**:執行完整測試套件(環境檢測、參數驗證、MCP 整合、Web UI) -- **`--gui`**:專門測試 Qt GUI 功能和介面 -- **`--web`**:專門測試 Web UI 功能和 WebSocket 通訊 -- **`--persistent`**:持久化模式,測試完成後保持運行,方便互動測試 +### v2.0.14(最新) +- ⌨️ 增強快捷鍵:Ctrl+Enter 支援數字鍵盤 +- 🖼️ 智能圖片貼上:Ctrl+V 直接貼上剪貼板圖片 -## 🌟 功能特色 +### v2.0.9 +- 🌏 多語言架構重構,支援動態載入 +- 📁 語言檔案模組化組織 -### 🖥️ 雙介面支援 -- **Qt GUI**:適用於本地開發環境,提供原生體驗 -- **Web UI**:適用於 SSH remote 開發環境,現代化界面 +### v2.0.3 +- 🛡️ 完全修復中文字符編碼問題 +- 🔧 解決 JSON 解析錯誤 -### 🔍 智慧環境檢測 -- 自動檢測 SSH 連線環境變數 -- 檢測 DISPLAY 設定(Linux) -- 檢測 VSCode Remote 開發環境 -- 自動選擇最適合的介面 +### v2.0.0 +- ✅ 新增 Web UI 支援遠端環境 +- ✅ 自動環境檢測與介面選擇 +- ✅ WebSocket 即時通訊 -### 💻 命令執行功能 -- 即時命令執行和輸出顯示 -- 支援命令中斷和程序樹終止 -- 自動工作目錄設定 -- 命令歷史記錄 - -### 🎨 現代化介面 -- 深色主題設計 -- 響應式佈局(支援手機瀏覽器) -- WebSocket 即時通訊 -- 載入動畫和視覺回饋 - -### 🖼️ 圖片處理功能 -- 支援多種圖片格式(PNG、JPG、JPEG、GIF、BMP、WebP) -- 智能文件大小檢測和壓縮 -- 拖拽上傳和剪貼板支援 -- 自動轉換為 MCP Image 對象 -- Base64 編碼和預覽 - -## 🛠️ 環境變數配置 - -### 核心環境變數 - -| 環境變數 | 用途 | 可用值 | 默認值 | -|---------|------|--------|--------| -| `FORCE_WEB` | 強制使用 Web UI | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | -| `MCP_DEBUG` | 啟用調試模式 | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | -| `INCLUDE_BASE64_DETAIL` | 圖片回饋包含完整 Base64 | `true`, `false`, `1`, `0`, `yes`, `no`, `on`, `off` | `false` | - -### 使用範例 - -**在 MCP 配置中設定**: -```json -"env": { - "FORCE_WEB": "true", // 強制使用 Web UI - "MCP_DEBUG": "false", // 關閉調試輸出(推薦生產環境) - "INCLUDE_BASE64_DETAIL": "true" // 包含完整圖片 Base64 數據 -} -``` - -**在命令行中設定**: -```bash -# 啟用調試模式測試 -MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test -``` - -## 📖 使用範例 - -### 1. **推薦 MCP 配置(uvx)** - -使用 uvx 的簡潔配置: -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uvx", - "args": [ - "mcp-feedback-enhanced@latest" - ], - "timeout": 600, - "env": { - "MCP_DEBUG": "false" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### 2. **自訂環境變數配置** - -如需要自訂環境變數(例如強制使用 Web UI): -```json -{ - "mcpServers": { - "mcp-feedback-enhanced": { - "command": "uv", - "args": [ - "--directory", - "/path/to/mcp-feedback-enhanced", - "run", - "python", - "-m", - "mcp_feedback_enhanced" - ], - "timeout": 600, - "env": { - "FORCE_WEB": "true", - "MCP_DEBUG": "false", - "INCLUDE_BASE64_DETAIL": "true" - }, - "autoApprove": [ - "interactive_feedback" - ] - } - } -} -``` - -### 3. **工具調用範例** - -AI 助手會如此調用 `mcp-feedback-enhanced` 工具: - -```xml - - mcp-feedback-enhanced - interactive_feedback - - { - "project_directory": "/path/to/your/project", - "summary": "我已經實現了您請求的更改並重構了主模組。請查看結果並提供回饋。" - } - - -``` - -## 🔄 工作流程 - -1. **AI 助手調用** - AI 完成任務後調用 `mcp-feedback-enhanced` -2. **環境檢測** - 系統自動檢測運行環境 -3. **介面啟動** - 根據環境啟動 Qt GUI 或 Web UI -4. **用戶互動** - 用戶可以: - - 執行命令和查看輸出 - - 提供文字回饋(支援 Ctrl+Enter 快速提交,相容主鍵盤和數字鍵盤) - - 上傳圖片(拖拽、剪貼板粘貼 Ctrl+V) - - 使用多語言介面切換 -5. **回饋傳遞** - 用戶回饋(包括圖片)傳回給 AI 助手 -6. **流程繼續** - AI 根據回饋繼續或結束任務 - -## 🆕 版本更新 - -### v2.0.14 - 增強快捷鍵支援(最新版) -- ⌨️ **數字鍵盤支援**:Ctrl+Enter 快捷鍵現在同時支援主鍵盤和數字鍵盤的 Enter 鍵 -- 🖼️ **智能圖片貼上**:Ctrl+V 可直接在回饋對話框中貼上剪貼板圖片,無需額外上傳步驟 -- 🎮 **雙重快捷鍵機制**:GUI 使用 QShortcut 雙重設定,確保完整相容性 -- 🌐 **Web UI 快捷鍵增強**:使用 key/code 雙重檢測機制,支援所有 Enter 鍵變體 -- 💡 **使用者體驗改善**:更新三語言提示文字,明確標示數字鍵盤支援和圖片貼上功能 -- 🔧 **API 簡化**:移除 `force_web_ui` 參數,簡化 API 設計,只保留環境變數控制 -- 📝 **文件更新**:更新所有相關說明文件,移除冗餘範例 - -### v2.0.9 - 多語言架構重構 -- 🌏 **完整多語言架構重構**:從嵌入式翻譯遷移到結構化 JSON 基礎系統 -- 📁 **語言檔案組織化**:將語言檔案分離到 `src/mcp_feedback_enhanced/locales/` 目錄結構 -- 🔧 **增強國際化功能**:動態載入與嵌套鍵值結構,支援瀏覽器語言偵測 -- 📚 **完整文件說明**:為翻譯貢獻者新增詳細 README,包含範例和指南 -- 🔄 **向後兼容性**:在啟用現代功能的同時保持與現有程式碼的完全相容性 -- 🖼️ **介面截圖更新**:新增完整截圖展示英文和繁體中文介面 -- 📝 **文件強化**:更新 README 檔案,加入多語言截圖和功能說明 -- 🛡️ **增強錯誤處理**:改善穩定性和錯誤恢復機制 -- 🚀 **效能優化**:更快的啟動時間和改善的資源管理 -- 🔧 **錯誤修復**:各種小型修復和改善 -- 📦 **套件優化**:更好的相依性管理和建置流程 -- 🎨 **視覺改善**:增強按鈕可見性和顏色一致性 -- 🖱️ **互動修復**:改善拖拽指示器和空狀態提示 -- 📱 **響應式設計**:更好的不同螢幕尺寸適應 -- 🌐 **語言切換**:修復 Qt GUI 語言切換,加入適當的勾選標記 - -### v2.0.3 - 編碼與通訊修復 -- 🛡️ **完全修復中文字符編碼問題**:支援完美的中文顯示 -- 🔧 **解決 JSON 解析錯誤**:修復 MCP 客戶端的 "Unexpected token" 錯誤 -- 🎛️ **可控調試模式**:透過 `MCP_DEBUG` 環境變數控制調試輸出 -- 🖼️ **強化圖片支援**:改善圖片處理和 Base64 編碼 -- 🚀 **輸出隔離**:嚴格分離調試輸出與 MCP 通信 -- 📦 **套件優化**:改善 uvx 安裝體驗和依賴管理 - -### v2.0.0 - Web UI 與遠端支援 -- ✅ **Web UI 介面**:新增 Web UI 支援 SSH remote 開發環境 -- ✅ **自動環境檢測**:根據環境智能選擇介面 -- ✅ **WebSocket 即時通訊**:即時命令執行和回饋 -- ✅ **現代化深色主題**:美觀的深色主題與響應式設計 -- ✅ **持久化測試模式**:增強的測試功能 - -### v1.0.0 - 基礎版本(原作者) -- ✅ **Qt GUI 介面**:原生桌面介面 -- ✅ **命令執行**:即時命令執行和輸出 -- ✅ **MCP 協議支援**:完整的模型上下文協議實作 -- ✅ **跨平台支援**:Windows、macOS 和 Linux 相容性 - -## 🐛 故障排除 - -### 常見問題 +## 🐛 常見問題 **Q: 出現 "Unexpected token 'D'" 錯誤** -A: 這通常是調試輸出干擾造成的。確保在生產環境中設置 `MCP_DEBUG=false` 或不設置該環境變數。 +A: 調試輸出干擾。設置 `MCP_DEBUG=false` 或移除該環境變數。 -**Q: 中文字符顯示為亂碼** -A: 已在 v2.0.3 中完全修復。如果仍有問題,請更新到最新版本:`uvx mcp-feedback-enhanced@latest` +**Q: 中文字符亂碼** +A: 已在 v2.0.3 修復。更新到最新版本:`uvx mcp-feedback-enhanced@latest` **Q: 圖片上傳失敗** -A: 檢查圖片大小是否超過 1MB 限制,並確保格式為支援的類型(PNG、JPG、JPEG、GIF、BMP、WebP)。 +A: 檢查檔案大小(≤1MB)和格式(PNG/JPG/GIF/BMP/WebP)。 **Q: Web UI 無法啟動** -A: 確保防火牆允許本地端口訪問,或嘗試設置 `FORCE_WEB=true` 環境變數。 +A: 設置 `FORCE_WEB=true` 或檢查防火牆設定。 -### 調試模式 +## 🙏 致謝 -如需詳細調試信息,請啟用調試模式: -```bash -# 設置調試環境變數 -MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test -``` - -## 🙏 致謝與聯繫 - -### 原作者 +### 🌟 支持原作者 **Fábio Ferreira** - [X @fabiomlferreira](https://x.com/fabiomlferreira) -**原始專案:** [noopstudios/interactive-feedback-mcp](https://github.com/noopstudios/interactive-feedback-mcp) +**原始專案:** [noopstudios/interactive-feedback-mcp](https://github.com/noopstudios/interactive-feedback-mcp) -如果您覺得 Interactive Feedback MCP 有用,最好的支持方式是: -- 🌟 **為原作者的專案按星星**:[按此前往並按星星](https://github.com/noopstudios/interactive-feedback-mcp) ⭐ -- 📱 **關注原作者的 X 帳號**:[@fabiomlferreira](https://x.com/fabiomlferreira) +如果您覺得有用,請: +- ⭐ [為原專案按星星](https://github.com/noopstudios/interactive-feedback-mcp) +- 📱 [關注原作者](https://x.com/fabiomlferreira) -### UI 設計靈感 -**sanshao85** - [mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) -感謝提供現代化界面設計靈感,讓本專案的 UI 更加美觀和易用。 - -### 分支維護者 -如有關於 Web UI 功能、圖片支援或其他問題,歡迎在 [GitHub Issues](https://github.com/Minidoracat/mcp-feedback-enhanced/issues) 中提出。 +### 設計靈感 +**sanshao85** - [mcp-feedback-collector](https://github.com/sanshao85/mcp-feedback-collector) ### 社群支援 -加入我們的 Discord 社群獲得即時協助和討論: -**Discord 社群:** [https://discord.gg/Gur2V67](https://discord.gg/Gur2V67) -有任何問題都可以到社群中尋求幫助! +- **Discord:** [https://discord.gg/Gur2V67](https://discord.gg/Gur2V67) +- **Issues:** [GitHub Issues](https://github.com/Minidoracat/mcp-feedback-enhanced/issues) -### 相關資源 -- [Model Context Protocol](https://modelcontextprotocol.io/) - MCP 官方文件 +## 📄 授權 -## 📄 授權條款 - -本專案採用 MIT 授權條款。詳見 [LICENSE](LICENSE) 檔案。 +MIT 授權條款 - 詳見 [LICENSE](LICENSE) 檔案 --- - -**🌟 歡迎 Star 此專案並分享給更多開發者!** \ No newline at end of file +**🌟 歡迎 Star 並分享給更多開發者!** \ No newline at end of file