mcp-ai-extension

The MCP Server AI extension is a modern tool with an advanced UI and powerful features designed for the Model Context Protocol (MCP). It features a beautiful dark theme interface built with PyQt5, advanced file management capabilities, image support, and multi-language options. Additionally, it allows for seamless conversation continuation and intelligent relative path handling based on the workspace, all while being optimized for performance.

GitHub Stars

0

User Rating

Not Rated

Forks

0

Issues

0

Views

0

Favorites

0

README
๐Ÿš€ MCP Server AI extension

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

โœจ Features
  • ๐ŸŽจ Modern Dark Theme UI - Beautiful, responsive interface with PyQt5
  • ๐Ÿ“ Advanced File Management - Browse, select, and attach files/folders with workspace support
  • ๐Ÿ–ผ๏ธ Image Support - Drag & drop images, paste from clipboard, with preview functionality
  • ๐ŸŒ Multi-language Support - English and Vietnamese translations
  • ๐Ÿ’พ Smart Persistence - Remember your preferences, workspace, and attached files
  • ๐Ÿ”„ Continue Conversations - Seamless chat continuation with smart state management
  • ๐ŸŽฏ Workspace-Aware - Intelligent relative path handling for better code context
  • โšก Fast & Responsive - Optimized performance with async operations
๐Ÿš€ Quick Start
Installation
# Install dependencies
pip install -r requirements.txt

# Run the tool directly
python -m AI_EXTENSION_tool
Usage with MCP

Add to your MCP client configuration:

{
  "mcpServers": {
    "ai-extension": {
      "command": "python",
      "args": ["-m", "AI_EXTENSION_tool"],
      "cwd": "/path/to/mcp-ai-extension"
    }
  }
}
๐Ÿ“‹ How It Works
Basic Workflow
  1. Launch Tool: Call the MCP tool or run directly
  2. Enter Message: Type your message in the text area
  3. Attach Files (Optional): Use the file browser to select files/folders
  4. Attach Images (Optional): Drag & drop or select images
  5. Configure Options: Set continue conversation and other preferences
  6. Send: Submit your message with all attachments
Advanced Features
Workspace Management
  • Set a workspace root directory for consistent relative paths
  • All file attachments are relative to your workspace
  • Workspace state is remembered between sessions
File Attachments
  • Browse and select multiple files and folders
  • Supports all file types with intelligent type detection
  • Workspace-relative paths for better code context
  • Multi-select with Ctrl+Click and Shift+Click
Image Attachments
  • Drag & drop images directly into the interface
  • Paste images from clipboard (Ctrl+V in text area)
  • Support for PNG, JPG, GIF, BMP, WebP formats
  • Image previews with click-to-enlarge functionality
  • Smart duplicate detection
Continue Conversations
  • Enable "Continue conversation" to keep the chat active
  • Tool automatically reopens after AI responds
  • Perfect for multi-step tasks and iterative development
๐Ÿ”ง Configuration

The tool automatically saves your preferences:

  • Window size and position
  • Language preference
  • Workspace directory
  • Attached files state
  • Continue conversation setting
  • Image save preferences
๐Ÿ“– Output Format
AI extension Tool

The tool outputs structured data for AI processing:

# Call "AI_EXTENSION" to launch the UI
With File Attachments
Your message content

<AI_EXTENSION_ATTACHED_FILES>
FOLDERS:
- src/components

FILES:
- src/utils/helper.js
- config/settings.json

</AI_EXTENSION_ATTACHED_FILES>

<AI_EXTENSION_WORKSPACE>my-project</AI_EXTENSION_WORKSPACE>
<AI_EXTENSION_CONTINUE_CHAT>true/false</AI_EXTENSION_CONTINUE_CHAT>
With Images

When images are attached, they're included as base64 data in the response for AI processing.

๐Ÿ—๏ธ Project Structure
mcp-ai-extension/
โ”œโ”€โ”€ AI_EXTENSION_tool/       # Main package
โ”‚   โ”œโ”€โ”€ core/                  # Core functionality
โ”‚   โ”‚   โ”œโ”€โ”€ dialog.py         # Main UI dialog
โ”‚   โ”‚   โ”œโ”€โ”€ config.py         # Configuration management
โ”‚   โ”‚   โ””โ”€โ”€ mcp_handler.py    # MCP integration
โ”‚   โ”œโ”€โ”€ ui/                   # UI components
โ”‚   โ”‚   โ”œโ”€โ”€ file_dialog.py    # File selection dialog
โ”‚   โ”‚   โ”œโ”€โ”€ image_attachment.py # Image handling
โ”‚   โ”‚   โ””โ”€โ”€ styles.py         # UI styling
โ”‚   โ””โ”€โ”€ utils/                # Utilities
โ”‚       โ”œโ”€โ”€ translations.py   # Multi-language support
โ”‚       โ””โ”€โ”€ file_utils.py     # File operations
โ”œโ”€โ”€ user_images/              # Stored images
โ”œโ”€โ”€ pyproject.toml           # Package configuration
โ””โ”€โ”€ README.md               # This file
๐Ÿ› Troubleshooting
Common Issues
  1. Import Errors: Make sure all dependencies are installed

    pip install -r requirements.txt
    
  2. PyQt5 Issues: Install PyQt5 system dependencies

    • Try python -m AI_EXTENSION_tool instead
  3. Permission Errors: Ensure write access to the project directory

  4. Image Issues: Check that image files are in supported formats (PNG, JPG, GIF, BMP, WebP)

Debug Mode

Run with debug output:

python -m AI_EXTENSION_tool --debug
๐Ÿค Contributing
  1. Fork the repository
  2. Create a feature branch
  3. Make your changes
  4. Test thoroughly
  5. Submit a pull request
๐Ÿ“„ License

This project is licensed under the MIT License.

๐Ÿ™ Acknowledgments
  • Built with PyQt5 for the modern UI
  • Uses Model Context Protocol (MCP) for AI integration
  • Inspired by the need for better AI-developer extension tools
๐Ÿ“ง Support

For issues and questions:

  • Create an issue on GitHub
  • Check the troubleshooting section above

Happy coding with AI extension Tool! ๐Ÿš€


Copyright (c) 2025 DemonVN - AI extension Tool