Co-Pilot
Updated 24 days ago

mcp-server_ai-interaction

KKhaiHuynhVN
0.0k
khaihuynhvn/mcp-server_ai-interaction
80
Agent Score

๐Ÿ’ก Summary

A modern AI interaction tool that enhances user experience with advanced UI features and multi-language support.

๐ŸŽฏ Target Audience

AI developers looking for enhanced interaction toolsData scientists needing efficient file and image managementProduct managers seeking streamlined AI integrationEducators wanting to utilize AI in teachingTech enthusiasts exploring AI capabilities

๐Ÿค– AI Roast: โ€œPowerful, but the setup might scare off the impatient.โ€

Security AnalysisMedium Risk

Risk: Medium. Review: shell/CLI command execution; outbound network access (SSRF, data egress); filesystem read/write scope and path traversal; dependency pinning and supply-chain risk. Run with least privilege and audit before enabling in production.

AI Interaction Tool - MCP Server

Modern AI interaction tool with advanced UI and powerful features for Model Context Protocol (MCP)

๐Ÿš€ Core Features

๐ŸŽฏ Main Capabilities

  • Interactive UI Popup for content input and conversation control
  • File/Folder Attachment from workspace with validation and preview
  • ๐Ÿ–ผ๏ธ Image Attachment System with drag & drop, multi-image support
  • Multi-language Support (English/Vietnamese)
  • Maximum Cognitive Power activation for peak AI performance
  • Tag-based Output Format integrated with system prompt rules
  • Workspace-aware Path Processing for cross-project compatibility

๐Ÿ”ง New in v2.2.0 (Latest)

  • ๐Ÿ–ผ๏ธ Image Attachment Support with drag & drop functionality
  • ๐Ÿ›ก๏ธ Security Enhanced - secure path storage in user_images directory
  • ๐Ÿ’พ Persistent Image State - checkbox state saves correctly
  • ๐ŸŽฏ Multi-image Management - attach, preview, and remove multiple images
  • ๐Ÿ”„ Database Auto-cleanup - automatic image cleanup when disabled

๐Ÿ”ง Previous v2.1.0

  • Enhanced UI/UX with modern PyQt5 interface
  • Structured Tag-based Output for perfect AI agent integration
  • Debounce Configuration with smart auto-save mechanisms
  • Cursor IDE Integration with comprehensive setup guide

๐Ÿ“‹ Installation & Setup Guide

๐Ÿ“ฅ Step 1: Clone Repository

git clone https://github.com/your-username/AI-interaction.git cd AI-interaction

๐Ÿ Step 2: Install Python

  • Requirement: Python 3.8+
  • Download from python.org
  • Or use package manager:
    # Windows with Chocolatey choco install python # macOS with Homebrew brew install python # Ubuntu/Debian sudo apt update && sudo apt install python3 python3-pip

๐Ÿ“ฆ Step 3: Install Dependencies

# Using pip pip install -r requirements.txt # Or using uv (recommended for performance) pip install uv uv pip install -r requirements.txt

โš™๏ธ Step 4: Configure MCP Server in Claude Desktop

Add the following configuration to Claude Desktop config file:

Config file paths:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Linux: ~/.config/claude/claude_desktop_config.json

Configuration 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.

๐Ÿง  Step 5: Configure AI Agent Rules (REQUIRED)

For proper AI agent operation with ai_interaction tool, you MUST setup custom instructions:

๐Ÿ“‹ How to Add Custom Instructions:

  1. Open Claude Desktop or access Claude web interface
  2. Find "Custom Instructions" or "Add custom instructions" in settings
  3. Copy entire content from one of the rule files:
    • ๐Ÿ‡ป๐Ÿ‡ณ Vietnamese: rule_for_ai_VI.txt
    • ๐Ÿ‡บ๐Ÿ‡ธ English: rule_for_ai_EN.txt
  4. Paste into custom instructions field and save

๐ŸŽฏ Why This is Necessary:

  • โœ… Behavioral Framework: Rules define how AI agent processes ai_interaction output
  • โœ… Thinking Protocols: Activates high-level thinking patterns for quality responses
  • โœ… Ultra-Enhancement Modes: 10 cognitive modes for maximum performance
  • โœ… Tag Processing: Reads and processes control tags like <AI_INTERACTION_CONTINUE_CHAT>
  • โœ… Continue Logic: Auto-recall ai_interaction when continue_chat=true

๐Ÿ“ Rule Files Location:

AI-interaction/
โ”œโ”€โ”€ rule_for_ai_VI.txt    # Vietnamese rules 
โ”œโ”€โ”€ rule_for_ai_EN.txt    # English rules
โ””โ”€โ”€ ...

โšก Quick Setup Commands:

# 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

๐Ÿš€ Step 6: Configure Cursor IDE (Recommended)

Cursor is the recommended IDE for AI development with this tool:

๐Ÿ“‹ Cursor Setup Steps:

  1. Download Cursor: https://cursor.sh/
  2. Install and open workspace: Open AI-interaction folder
  3. Configure MCP in Cursor:
    • Open Command Palette (Cmd/Ctrl + Shift + P)
    • Search "Configure MCP Servers"
    • Add AI_interaction server config
  4. Setup custom instructions:
    • Copy content from rule_for_ai_VI.txt or rule_for_ai_EN.txt
    • Paste into "Custom Instructions" field in custom mode Agent: image image image

๐ŸŽฏ Cursor Advantages:

  • โœ… Native MCP Support: Built-in integration with MCP servers
  • โœ… AI-First IDE: Optimized for AI development workflows
  • โœ… Real-time Suggestions: Context-aware code completion
  • โœ… Advanced Debugging: Enhanced debugging for MCP tools
  • โœ… Performance: Faster than traditional IDEs for AI projects

๐Ÿš€ Step 7: Launch and Test

!!! -----> 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:

  1. Restart Claude Desktop/Cursor after configuring MCP server
  2. Test connection by calling ai_interaction tool
  3. Test UI popup to verify functionality
  4. Validate rule integration through AI agent responses

๐Ÿ“ฆ Package Structure

AI-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

๐ŸŽฎ Usage Guide

Available Tools in MCP Server

1. ai_interaction: Main Interactive Tool

  • Function: Creates UI popup for user input with file/image attachment
  • Output: Structured tag-based format with image support
  • Integration: Perfect integration with system prompt rules
  • Use cases:
    • Input complex content with formatting
    • Attach files/folders from workspace
    • ๐Ÿ–ผ๏ธ Attach images with drag & drop functionality
    • ๐Ÿ“ท Multi-image support with preview and management
    • Control AI thinking modes and reasoning levels

Basic Usage Examples

# Programmatic usage from ai_interaction_tool import ai_interaction # Launch interactive interface result = ai_interaction() print(result) # Structured output with tags

๐Ÿ–ผ๏ธ Image Attachment Features

๐Ÿ“ท Core Image Capabilities

  • Drag & Drop Support: Drag images directly into the UI
  • Multi-image Management: Attach, preview, and remove multiple images
  • Format Support: PNG, JPG, JPEG, GIF, BMP, WEBP
  • Secure Storage: Images stored safely in user_images/ directory
  • Base64 Encoding: Automatic conversion for AI processing
  • Preview System: Click images to view larger versions
  • Persistent State: Save images option with checkbox persistence

๐ŸŽฏ How to Use Image Attachment

  1. Attach Button: Click "๐Ÿ“ท Attach Images" to select files
  2. Drag & Drop: Drag images from file explorer directly to UI
  3. Paste Support: Paste images from clipboard (Ctrl+V)
  4. Multiple Images: Attach as many images as needed
  5. Remove Images: Click X button on individual image previews
  6. Clear All: Use "๐Ÿ—‘๏ธ Clear Images" to remove all at once
  7. Save Toggle: Check/uncheck "Save images" to control persistence

๐Ÿ›ก๏ธ Security & Privacy

  • Local Only: All images stored locally in user_images/
  • No External Access: No uploads or external connections
  • Relative Paths: Only relative paths stored in config for security
  • User Control: Users control what images to attach and save
  • Auto-cleanup: Images automatically cleaned when save disabled

Output Format

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_ATTACHE
5-Dim Analysis
Clarity8/10
Novelty8/10
Utility9/10
Completeness8/10
Maintainability7/10
Pros & Cons

Pros

  • User-friendly interface with drag & drop features
  • Supports multi-language for wider accessibility
  • Robust file and image management capabilities
  • Integrates well with existing AI systems

Cons

  • Requires configuration which may be complex for beginners
  • Dependency on external tools like Claude Desktop
  • Limited to local storage for images
  • Potential performance issues with large files

Related Skills

pytorch

S
toolCode Lib
92/ 100

โ€œIt's the Swiss Army knife of deep learning, but good luck figuring out which of the 47 installation methods is the one that won't break your system.โ€

agno

S
toolCode Lib
90/ 100

โ€œIt promises to be the Kubernetes for agents, but let's see if developers have the patience to learn yet another orchestration layer.โ€

nuxt-skills

S
toolCo-Pilot
90/ 100

โ€œIt's essentially a well-organized cheat sheet that turns your AI assistant into a Nuxt framework parrot.โ€

Disclaimer: This content is sourced from GitHub open source projects for display and rating purposes only.

Copyright belongs to the original author KhaiHuynhVN.