Used as the web framework for the MCP service's web interface, enabling HTTP-based interactions between AI tools and users through a browser.
The primary language for the MCP service, providing the foundation for all UI types (CLI, Web, PyQt) and tool implementations.
Mentioned as an example implementation option in the select_option tool, allowing AI tools to present PyTorch as an implementation choice to users.
MCP Interactive Service
This is an MCP service implemented using the FastMCP library, designed for interaction with AI tools like Cursor, Windsurf, etc. When AI tools need user input or option selection while calling large language models, they can invoke this MCP service.
Core Purpose
The core purpose of this plugin is to enable high-frequency communication and confirmation between AI tools (like Cursor and Windsurf) and users. It significantly improves the efficiency and effectiveness of AI interactions by:
- Reducing Wasted Resources: By allowing users to confirm or redirect AI's approach before it commits to a potentially incorrect solution path, the plugin minimizes wasted API calls and computational resources.
- Maximizing Resource Utilization: Every API call to Cursor or Windsurf becomes more productive as the AI can verify its understanding and approach with the user before proceeding.
- Preventing Attention Fragmentation: By confirming approaches early, the plugin helps maintain focus on the correct solution path rather than having attention diverted to incorrect approaches.
- Enabling Interactive Decision Making: Users can actively participate in the decision-making process, providing immediate feedback and guidance to the AI.
- Streamlining Complex Tasks: For multi-step tasks, the plugin ensures alignment between user expectations and AI execution at each critical decision point.
Features
- Option Selection: Display a list of options for users to select by entering numbers or providing custom answers
- Information Supplement: When AI models need more complete information, they can request users to directly input supplementary information
- Multiple User Interfaces: Support for CLI, Web, and PyQt interfaces
UI Types
This project supports three different user interface types, each with its own characteristics:
CLI (Command Line Interface)
- Description: Opens a new command prompt window for user interaction
- Advantages:
- Minimal dependencies (no additional packages required)
- Can handle multiple dialog windows simultaneously
- Works well in environments without graphical interfaces
- Lightweight and fast to start
- Disadvantages:
- Basic visual presentation
- May not be as intuitive for non-technical users
- Best for: Server environments, systems with limited resources, or when multiple simultaneous dialogs are needed
PyQt Interface
- Description: Provides a modern graphical user interface using PyQt
- Advantages:
- Clean, professional-looking dialogs
- Familiar desktop application experience
- Easy to use for all user types
- Disadvantages:
- Can only display one dialog at a time
- Requires PyQt dependencies (larger installation)
- Best for: Desktop use where visual appeal is important and only one dialog is needed at a time
Web Interface
- Description: Opens dialogs in a web browser
- Advantages:
- Can handle multiple dialog windows simultaneously
- Accessible from anywhere via web browser
- Modern, customizable interface
- Disadvantages:
- Requires web browser to be installed
- Slightly more complex setup
- Best for: Remote access scenarios, environments where a web interface is preferred, or when multiple simultaneous dialogs are needed
Usage Guide
1. Getting Started (Two Options)
Option A: Use Pre-compiled Executable (Recommended for Windows)
- Download the latest pre-compiled executable from the GitHub Releases page.
- No installation required - simply download and run the executable.
- You can test the functionality using these commands:
- Skip to step 3 below for configuration.
Option B: Install from Source Code
This project separates dependencies based on different UI types:
requirements-base.txt
: Base dependencies, shared by all UI typesrequirements-pyqt.txt
: PyQt5 UI dependenciesrequirements-web.txt
: Web UI (Flask) dependencies
You can choose to use either traditional pip or the faster uv package manager to install dependencies.
Using pip (Traditional Method)
Choose the appropriate dependency file based on the UI type you want to use:
Note: Each specific UI dependency file already includes a reference to the base dependencies (via -r requirements-base.txt
), so you only need to install a single file.
Using uv (Recommended, Faster)
If you already have uv installed, you can use the following commands to create a virtual environment and install dependencies:
You can also use the project's pyproject.toml file to install all dependencies directly:
2. Start the Program
Start different UI response methods:
Other service startup options:
3. Configure Cursor, Windsurf, or Claude
Using stdio Protocol (Recommended)
The stdio protocol is the most stable and recommended connection method, communicating directly with Python scripts through standard input/output, with the following advantages:
- Higher stability and reliability
- Can open multiple dialog boxes simultaneously
- Simple and direct, no need to deal with network connection issues
- Tighter integration with the system, faster response
Configuration examples:
Using with Python (source code)
Using with Executable
Using SSE Protocol (Alternative)
If you need to connect to a remote server over the network, you can use the SSE protocol:
Local startup:
Cursor configuration:
Windsurf configuration:
4. Configure AI Interaction Rules
To maximize the effectiveness of AI interactions in Cursor and Windsurf, configure the following rules for AI to follow when using MCP:
- When the AI is unclear about a task or needs additional information, it should call MCP ai-interaction to request clarification from the user.
- When the AI has multiple possible approaches to a solution, it should call MCP ai-interaction to let the user select the preferred approach.
- After completing a task, the AI should call MCP ai-interaction to confirm whether there are other tasks that need to be executed.
- The AI should break down tasks into multiple stages and before starting a new stage, call MCP ai-interaction to ask the user if any additional thoughts or considerations need to be incorporated.
- The AI should proactively use MCP to confirm critical decisions rather than making assumptions.
These rules ensure high-quality, interactive AI assistance while maximizing the value of each API call.
Other Functions
View Available Tools
Test Tools
Interactive Test Client
The project includes an interactive test client that allows you to test the MCP service with different UI types and methods:
Options:
--host
: Server host (default: localhost)--port
: Server port (default: 7888)--ui
: UI type to use (cli, pyqt, web)
The client provides:
- Connection testing with MCP service
- Selection of UI type to test with
- Testing both select_option and request_additional_info methods
- Multiple parameter presets for each method
- Full visualization of requests and responses
This is particularly useful for:
- Debugging UI interaction issues
- Testing different UI types behavior
- Demonstrating the service to users
- Verifying server functionality
STDIO Test Client
For specifically testing the stdio transport protocol, we provide a command line tool:
For more details, see the STDIO Testing Guide.
UI Testing
Tool Description
Option Selection (select_option)
This tool is used to present a set of options to users and let them select by entering numbers or providing custom answers.
Parameters:
options
: List of options, can be a list of strings or dictionariesprompt
: Prompt message displayed to the user
Return: A dictionary containing the selection result, in the format:
Information Supplement (request_additional_info)
This tool is used to request supplementary information from users.
Parameters:
prompt
: Prompt for requesting informationcurrent_info
: Current information, displayed to users as reference
Return: The supplementary information input by the user (string)
Integration with AI Tools
To integrate this MCP service with AI tools, follow these steps:
- Start the MCP service using either the executable or Python source code:
- Using executable:
mcp-interactive.exe run
- Using Python source:
python main.py run
- Using executable:
- Configure the MCP endpoint in the AI tool, choosing either stdio or SSE protocol as needed
- Call the appropriate MCP tool when the AI model needs user input or option selection
Claude Integration
To integrate with Claude in Anthropic's official products or third-party apps:
- Configure the stdio connection in your AI tool settings:
- Configure Claude to use the interaction service when needed, with instructions like:
- "When you need user input or confirmation, use the MCP interaction service"
- "For multiple choice options, call the select_option tool"
- "For collecting additional user information, call the request_additional_info tool"
- Claude will now be able to present options and request additional information directly through the MCP service.
Examples
Option Selection Example
Information Supplement Example
Development Notes
- Unless you need to develop or test multiple UI types, it's recommended to install only one UI dependency
- If you need to add new dependencies, please add them to the appropriate dependency file
Current Development Status
Please note the following status of the implementation:
- Windows: CLI and PyQt UI versions are fully functional. Web UI still has some issues that need to be addressed.
- Linux/Mac: These platforms have not been thoroughly tested yet. Your experience may vary.
We are actively working on improving compatibility across all platforms and UI types.
Building and Distribution
Building Executable Files
This project includes a script to build a standalone executable file for Windows:
This will create mcp-interactive.exe
in the dist
directory that you can run without Python installation.
Cross-Platform Building
To build executables for different platforms:
Windows
macOS
Linux
Note: You must build on the target platform (you cannot build macOS executables from Windows, etc.)
Distributing via GitHub
To make your built executables available for download:
- Create a GitHub release for your project
- Upload the built executables as release assets
- Provide clear documentation on which executable to use for each platform
Example steps:
- Navigate to your GitHub repository
- Click on "Releases" in the right sidebar
- Click "Create a new release"
- Set a version tag (e.g., v1.0.0)
- Add a title and description for your release
- Drag and drop or upload your executable files for different platforms
- Click "Publish release"
Users can then download the appropriate version for their operating system from the GitHub releases page.
License
This project is released under the MIT License.
This server cannot be installed
hybrid server
The server is able to function both locally and remotely, depending on the configuration or use case.
An interface enabling high-frequency communication between AI tools (like Cursor and Windsurf) and users, allowing for option selection and information gathering through CLI, Web, or PyQt interfaces.
Related MCP Servers
- -securityFlicense-qualityThis server acts as a Message Communication Protocol (MCP) service for integrating Apifox and Cursor, enabling OpenAPI interface implementation through AI-driven interaction.Last updated -7TypeScript
- -securityFlicense-qualityA Model Context Protocol server that enables AI assistants to explore and interact with Cursor IDE's SQLite databases, providing access to project data, chat history, and composer information.Last updated -10Python
Apifox MCP Serverofficial
-securityFlicense-qualityA server that connects AI coding assistants like Cursor and Cline to Apifox API definitions, allowing developers to implement API interfaces through natural language commands.Last updated -8321- -securityFlicense-qualityThis server enables AI assistants (CLINE, Cursor, Windsurf, Claude Desktop) to share a common knowledge base through Retrieval Augmented Generation (RAG), providing consistent information access across multiple tools.Last updated -1TypeScript