2025-05-31 06:53:35 +08:00
# Interactive Feedback MCP
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
**🌐 Language / 語言切換:** **English** | [繁體中文 ](README.zh-TW.md )
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
**Original Author:** [Fábio Ferreira ](https://x.com/fabiomlferreira )
**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
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
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 ).
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
## ✨ New Features
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### 🌐 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
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
### 🖼️ 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
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
### 🛡️ 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
2025-05-31 05:38:05 +08:00
2025-05-31 06:53:35 +08:00
### 🌏 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
2025-05-31 06:00:25 +08:00
## 🖥️ Interface Preview
### Qt GUI Interface (Local Environment)
2025-05-31 06:53:35 +08:00

2025-05-31 05:38:05 +08:00
2025-05-31 06:00:25 +08:00
### Web UI Interface (SSH Remote Environment)
2025-05-31 06:53:35 +08:00

2025-05-31 05:38:05 +08:00
2025-05-31 06:00:25 +08:00
Both interfaces support:
- 💬 Text feedback input
- 🖼️ Image upload (supports drag & drop, clipboard paste)
- ⚡ Real-time command execution
- 🎨 Modern dark theme
- 📱 Responsive design (Web UI)
2025-05-31 06:53:35 +08:00
- 🌐 Multi-language support (Traditional Chinese, English, Simplified Chinese)
2025-05-31 05:38:05 +08:00
2025-05-31 06:00:25 +08:00
## 🎯 Why Use This Tool?
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
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.
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
## 📝 Prompt Engineering Setup
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
For best results, add the following custom prompts to your AI assistant (e.g., in Cursor's rules or prompts):
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### 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.
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### Complete Rules Example
2025-05-31 03:42:31 +08:00
```
2025-05-31 06:00:25 +08:00
# MCP Interactive Feedback Rules
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
1. During any process, task, or conversation, whether asking, responding, or completing stage tasks, must call MCP mcp-feedback-enhanced.
2. When receiving user feedback, if feedback content is not empty, must call MCP mcp-feedback-enhanced again and adjust behavior based on feedback.
3. Only when user explicitly indicates "end" or "no more interaction needed" can you stop calling MCP mcp-feedback-enhanced, then the process is complete.
4. Unless receiving end command, all steps must repeatedly call MCP mcp-feedback-enhanced.
2025-05-31 03:42:31 +08:00
```
2025-05-31 06:00:25 +08:00
This ensures your AI assistant uses this MCP server to request user feedback before marking tasks as complete.
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
## 🚀 Installation
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### Method 1: uvx Installation (Recommended)
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
**This is the simplest method, no need to manually manage dependencies or virtual environments:**
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
1. **Install uv** (if not already installed)
2025-05-31 03:42:31 +08:00
```bash
# Windows
pip install uv
# Linux/Mac
curl -LsSf https://astral.sh/uv/install.sh | sh
```
2025-05-31 06:00:25 +08:00
2. **Test Installation**
2025-05-31 03:42:31 +08:00
```bash
2025-05-31 06:00:25 +08:00
# View version info (recommend using @latest for latest version)
2025-05-31 05:20:53 +08:00
uvx mcp-feedback-enhanced@latest version
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
# Run tests
2025-05-31 05:20:53 +08:00
uvx mcp-feedback-enhanced@latest test
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
# Persistent test mode (can actually test in browser)
2025-05-31 05:20:53 +08:00
uvx mcp-feedback-enhanced@latest test --persistent
2025-05-31 03:42:31 +08:00
```
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### Method 2: Install from Source (Developers)
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
Suitable for users who need to modify code or contribute to development:
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
1. **Get the Code**
2025-05-30 23:24:09 +08:00
```bash
2025-05-31 03:42:31 +08:00
git clone https://github.com/Minidoracat/mcp-feedback-enhanced.git
cd mcp-feedback-enhanced
2025-05-30 23:24:09 +08:00
```
2025-05-31 06:00:25 +08:00
2. **Install Dependencies**
2025-05-30 23:24:09 +08:00
```bash
uv sync
```
2025-05-31 06:00:25 +08:00
3. **Test Installation**
2025-05-30 23:24:09 +08:00
```bash
2025-05-31 06:00:25 +08:00
# Basic functionality test
2025-05-31 03:42:31 +08:00
uv run python -m mcp_feedback_enhanced test
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
# Persistent test mode (can actually test in browser)
2025-05-31 03:42:31 +08:00
uv run python -m mcp_feedback_enhanced test --persistent
2025-05-30 23:24:09 +08:00
```
2025-05-31 06:00:25 +08:00
4. **Run MCP Server**
2025-05-30 23:24:09 +08:00
```bash
2025-05-31 03:42:31 +08:00
uv run python -m mcp_feedback_enhanced
2025-05-30 23:24:09 +08:00
```
2025-05-31 06:00:25 +08:00
## ⚙️ AI Assistant Configuration
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### Recommended Configuration (using uvx)
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
Configure custom MCP server in Cursor settings, or manually edit `mcp.json` :
2025-05-30 23:24:09 +08:00
```json
{
"mcpServers": {
2025-05-31 03:42:31 +08:00
"mcp-feedback-enhanced": {
"command": "uvx",
"args": [
2025-05-31 05:20:53 +08:00
"mcp-feedback-enhanced@latest "
2025-05-31 03:42:31 +08:00
],
"timeout": 600,
"autoApprove": [
"interactive_feedback"
]
}
}
}
```
2025-05-31 06:00:25 +08:00
### Alternative Configuration (running from source)
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
If you need to use source version or want to customize environment variables:
2025-05-31 03:42:31 +08:00
```json
{
"mcpServers": {
"mcp-feedback-enhanced": {
2025-05-30 23:24:09 +08:00
"command": "uv",
"args": [
"--directory",
2025-05-31 03:42:31 +08:00
"/path/to/mcp-feedback-enhanced",
2025-05-30 23:24:09 +08:00
"run",
2025-05-31 03:42:31 +08:00
"python",
"-m",
"mcp_feedback_enhanced"
2025-05-30 23:24:09 +08:00
],
"timeout": 600,
2025-05-31 02:03:00 +08:00
"env": {
2025-05-31 05:20:53 +08:00
"FORCE_WEB": "true",
"MCP_DEBUG": "false"
2025-05-31 02:03:00 +08:00
},
2025-05-30 23:24:09 +08:00
"autoApprove": [
"interactive_feedback"
]
}
}
}
```
2025-05-31 06:00:25 +08:00
**Remember to modify the path to your actual project directory!**
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
## 🧪 Testing and Development
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### Testing with uvx
2025-05-31 03:42:31 +08:00
```bash
2025-05-31 06:00:25 +08:00
# Complete functionality test (recommended)
2025-05-31 05:20:53 +08:00
uvx mcp-feedback-enhanced@latest test
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
# Qt GUI specific test
2025-05-31 05:20:53 +08:00
uvx mcp-feedback-enhanced@latest test --gui
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
# Web UI specific test
2025-05-31 05:20:53 +08:00
uvx mcp-feedback-enhanced@latest test --web
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
# Persistent test mode (doesn't close after test, allows interactive testing)
2025-05-31 05:20:53 +08:00
uvx mcp-feedback-enhanced@latest test --persistent
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
# View version
2025-05-31 05:20:53 +08:00
uvx mcp-feedback-enhanced@latest version
2025-05-31 06:00:25 +08:00
# Enable debug mode testing
2025-05-31 05:20:53 +08:00
MCP_DEBUG=true uvx mcp-feedback-enhanced@latest test
2025-05-31 03:42:31 +08:00
```
2025-05-31 06:53:35 +08:00
## 🆕 Version History
### v2.0.9 - Multi-language Architecture Enhancement (Latest)
- 🌏 **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
### v2.0.7 - Stability and Performance Improvements
- 🛡️ **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
- 🛡️ **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
2025-05-31 06:00:25 +08:00
## 🛠️ Environment Variables
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
### Core Environment Variables
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
| 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` |
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
## 🐛 Troubleshooting
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
### Common Issues
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
**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.
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
**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`
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
**Q: Image upload fails**
A: Check if image size exceeds 1MB limit and ensure format is supported (PNG, JPG, JPEG, GIF, BMP, WebP).
2025-05-31 03:42:31 +08:00
2025-05-31 06:00:25 +08:00
**Q: Web UI won't start**
A: Ensure firewall allows local port access, or try setting `FORCE_WEB=true` environment variable.
2025-05-31 05:20:53 +08:00
2025-05-31 06:00:25 +08:00
## 🙏 Acknowledgments & Contact
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### Original Author
2025-05-30 23:24:09 +08:00
**Fábio Ferreira** - [X @fabiomlferreira ](https://x.com/fabiomlferreira )
2025-05-31 06:00:25 +08:00
If you find Interactive Feedback MCP useful, the best way to support is by following the original author's X account.
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### UI Design Inspiration
2025-05-31 05:38:05 +08:00
**sanshao85** - [mcp-feedback-collector ](https://github.com/sanshao85/mcp-feedback-collector )
2025-05-31 06:00:25 +08:00
Thanks for providing modern interface design inspiration, making this project's UI more beautiful and user-friendly.
2025-05-31 05:38:05 +08:00
2025-05-31 06:00:25 +08:00
### 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 ).
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
### 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!
2025-05-31 05:50:20 +08:00
2025-05-31 06:00:25 +08:00
### Related Resources
- [dotcursorrules.com ](https://dotcursorrules.com/ ) - More AI-assisted development workflow resources
- [Model Context Protocol ](https://modelcontextprotocol.io/ ) - Official MCP documentation
2025-05-30 23:24:09 +08:00
2025-05-31 06:00:25 +08:00
## 📄 License
2025-05-09 12:49:13 +01:00
2025-05-31 06:00:25 +08:00
This project is licensed under the MIT License. See [LICENSE ](LICENSE ) file for details.
2025-05-09 12:49:13 +01:00
2025-05-30 23:24:09 +08:00
---
2025-05-09 12:49:13 +01:00
2025-05-31 06:00:25 +08:00
**🌟 Welcome to Star this project and share it with more developers!**