by KhaiHuynhVN
Provides an interactive UI popup for user input, file and image attachment, and emits a structured tag‑based output that AI agents can consume directly.
The tool offers a modern PyQt5 interface that lets users compose messages, attach files, folders, and multiple images, then returns the content in a predefined tag format for seamless integration with AI agents via MCP.
requirements.txt.python mcp_server.py.python main.py --ui (or python mcp_server.py to start the server only).<AI_INTERACTION_CONTINUE_CHAT> flag.user_images/Q: Do I need an internet connection for the UI? A: No. All operations, including image handling, are performed locally.
Q: Which image formats are supported? A: PNG, JPG, JPEG, GIF, BMP, and WEBP.
Q: How does the tool ensure privacy?
A: Images are stored only in the local user_images/ directory; no external uploads occur.
Q: Can I disable image persistence? A: Yes. Uncheck the “Save images” checkbox; the tool will auto‑clean up attached images after the session.
Q: What if the UI does not appear? A: Verify that PyQt5 is installed correctly and that your Python version is 3.8 or newer.
Q: How do I integrate the tool with an AI agent?
A: Copy the content of rule_for_ai_EN.txt or rule_for_ai_VI.txt into the agent’s custom instructions. The agent will then parse the tags produced by the tool.
Modern AI interaction tool with advanced UI and powerful features for Model Context Protocol (MCP)
git clone https://github.com/your-username/AI-interaction.git
cd AI-interaction
# Windows with Chocolatey
choco install python
# macOS with Homebrew
brew install python
# Ubuntu/Debian
sudo apt update && sudo apt install python3 python3-pip
# Using pip
pip install -r requirements.txt
# Or using uv (recommended for performance)
pip install uv
uv pip install -r requirements.txt
Add the following configuration to Claude Desktop config file:
Config file paths:
%APPDATA%\Claude\claude_desktop_config.json~/Library/Application Support/Claude/claude_desktop_config.json~/.config/claude/claude_desktop_config.jsonConfiguration content:
{
"mcpServers": {
"AI_interaction": {
"command": "python",
"args": ["E:/MCP-servers-github/AI-interaction/mcp_server.py"],
"stdio": true,
"enabled": true
}
}
}
⚠️ Important: Replace E:/MCP-servers-github/AI-interaction/mcp_server.py with the absolute path to mcp_server.py on your system.
For proper AI agent operation with ai_interaction tool, you MUST setup custom instructions:
rule_for_ai_VI.txtrule_for_ai_EN.txt<AI_INTERACTION_CONTINUE_CHAT>continue_chat=trueAI-interaction/
├── rule_for_ai_VI.txt # Vietnamese rules
├── rule_for_ai_EN.txt # English rules
└── ...
# View Vietnamese rules content
cat rule_for_ai_VI.txt
# View English rules content
cat rule_for_ai_EN.txt
# Copy to clipboard (Windows)
type rule_for_ai_VI.txt | clip
# Copy to clipboard (macOS)
cat rule_for_ai_VI.txt | pbcopy
# Copy to clipboard (Linux)
cat rule_for_ai_VI.txt | xclip -selection clipboard
Cursor is the recommended IDE for AI development with this tool:
Cmd/Ctrl + Shift + P)rule_for_ai_VI.txt or rule_for_ai_EN.txt!!! -----> In your terminal: python E:\MCP-servers-github\AI-interaction\main.py --ui
⚠️ Important: Replace E:/MCP-servers-github/AI-interaction/mcp_server.py with the absolute path to mcp_server.py on your system.
---> AUTO SHOW UI:
ai_interaction toolAI-interaction/
├── ai_interaction_tool/ # Main interaction tool package
│ ├── core/ # Core dialog and configuration
│ │ ├── dialog.py # InputDialog with PyQt5 UI
│ │ └── config.py # Configuration management
│ ├── ui/ # Interface and styling
│ │ ├── file_dialog.py # File attachment dialogs
│ │ ├── file_tree.py # File system tree view
│ │ ├── image_attachment.py # 🖼️ Image attachment with drag & drop
│ │ └── styles.py # Modern UI styling
│ ├── utils/ # Utilities and multi-language
│ │ ├── translations.py # Multi-language support
│ │ └── file_utils.py # File operation utilities
│ ├── engine.py # Main entry point
│ ├── description.py # Detailed tool description
│ └── __init__.py # Package exports
├── user_images/ # 🛡️ Secure image storage directory
├── main.py # Legacy entry point
├── mcp_server.py # MCP server implementation
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
└── README.md # This file
# Programmatic usage
from ai_interaction_tool import ai_interaction
# Launch interactive interface
result = ai_interaction()
print(result) # Structured output with tags
user_images/ directoryuser_images/AI Interaction Tool uses clean tag-based format:
User message content with natural line breaks
<AI_INTERACTION_ATTACHED_FILES>
FOLDERS:
- workspace_name/relative/path/to/folder
FILES:
- workspace_name/relative/path/to/file.js
</AI_INTERACTION_ATTACHED_FILES>
<AI_INTERACTION_WORKSPACE>workspace_name</AI_INTERACTION_WORKSPACE>
<AI_INTERACTION_CONTINUE_CHAT>true/false</AI_INTERACTION_CONTINUE_CHAT>
Note: When images are attached, they are automatically converted to base64 format and included in the response for AI processing.
"Command not found" error
"Module not found" error
pip install -r requirements.txtUI not displaying
File attachment not working
🖼️ Image attachment issues
user_images/ directory permissionslast_attached_images from config.jsonMCP Connection Issues in Cursor
ps aux | grep mcp_serverTo debug issues, run server directly:
python mcp_server.py
For Cursor debugging:
# Check MCP server logs in Cursor
# Open Developer Tools → Console
# Look for MCP connection messages
[User Input] → [ai_interaction Tool] → [Tag-based Output] → [AI Agent Rules] → [Enhanced Response]
↑ ↓
└─────────────── [Auto-recall if continue_chat=true] ←─────────────────────────┘
<AI_INTERACTION_CONTINUE_CHAT>true/false</AI_INTERACTION_CONTINUE_CHAT>
<AI_INTERACTION_ATTACHED_FILES>
FOLDERS:
- workspace_name/relative/path/folder
FILES:
- workspace_name/relative/path/file.ext
</AI_INTERACTION_ATTACHED_FILES>
<AI_INTERACTION_WORKSPACE>workspace_name</AI_INTERACTION_WORKSPACE>
OS: Windows 10+ / macOS 10.14+ / Ubuntu 18.04+
Python: 3.8 or higher
RAM: 512MB available
Storage: 100MB free space
Display: 1024x768 minimum resolution
OS: Windows 11 / macOS 12+ / Ubuntu 20.04+
Python: 3.10+ with virtual environment
RAM: 2GB available
Storage: 500MB free space
Display: 1920x1080 or higher
GPU: Optional for enhanced UI rendering
| Component | Version | Status | Notes |
|---|---|---|---|
| Python | 3.8-3.11 | ✅ Tested | Recommended 3.10+ |
| PyQt5 | 5.15+ | ✅ Required | Core UI framework |
| Claude Desktop | Latest | ✅ Optimized | MCP integration |
| Cursor IDE | Latest | 🚀 Recommended | AI-first development |
| VS Code | Any | ✅ Compatible | Alternative IDE option |
Note: This is a private repository. Only the owner has push access.
For suggestions or issues:
rule_for_ai_VI.txt - Vietnamese agent behavior rulesrule_for_ai_EN.txt - English agent behavior rulesSYSTEM_PROMPT_Claude-4-sonnet-max.txt - Full system prompt examplepyproject.toml - Project configuration and dependencies- https://github.com/KhaiHuynhVN/mcp-server-agent-comm
MIT License
Copyright (c) 2025 DemonVN - AI Interaction Tool
Project inspired by the need for seamless AI interaction tools with modern UX principles and professional-grade architecture.
🚀 Happy Coding with AI Interaction Tool!
For support, issues, or feature requests, please open an issue on the GitHub repository.
Please log in to share your review and rating for this MCP.
Explore related MCPs that share similar capabilities and solve comparable challenges
by modelcontextprotocol
A Model Context Protocol server for Git repository interaction and automation.
by zed-industries
A high‑performance, multiplayer code editor designed for speed and collaboration.
by modelcontextprotocol
Model Context Protocol Servers
by modelcontextprotocol
A Model Context Protocol server that provides time and timezone conversion capabilities.
by cline
An autonomous coding assistant that can create and edit files, execute terminal commands, and interact with a browser directly from your IDE, operating step‑by‑step with explicit user permission.
by upstash
Provides up-to-date, version‑specific library documentation and code examples directly inside LLM prompts, eliminating outdated information and hallucinated APIs.
by daytonaio
Provides a secure, elastic infrastructure that creates isolated sandboxes for running AI‑generated code with sub‑90 ms startup, unlimited persistence, and OCI/Docker compatibility.
by continuedev
Enables faster shipping of code by integrating continuous AI agents across IDEs, terminals, and CI pipelines, offering chat, edit, autocomplete, and customizable agent workflows.
by github
Connects AI tools directly to GitHub, enabling natural‑language interactions for repository browsing, issue and pull‑request management, CI/CD monitoring, code‑security analysis, and team collaboration.