Content
# Deepin MCP Servers
## Introduction
An MCP (Model Context Protocol) server implementation designed for the Deepin system, providing functionalities such as system tools, file operations, network searches, and more. This is derived from Deepin's MCP server implementation, optimized and extended.
## Features
### 🚀 Application Management
- **Launch Applications**: Supports launching built-in system applications
- Supported applications include: Calendar, File Manager, Calculator, Camera, Paint, Text Editor, Music, Cinema, Browser, Control Center, and over 40 other applications.
### 📁 File Operations
- **Basic File Operations**
- Open files (using the system's default program)
- Copy files/folders
- Move files/folders
- Rename files/folders
- Delete files/folders
- Create new files
- Create new folders
- Batch rename files
- List directory contents (supports recursion)
- Get file size information
- Get user directory path
- **Document Processing**
- Supports reading various document formats:
- Text files (.txt, .md)
- Microsoft Office documents (.doc, .docx, .xls, .xlsx, .ppt, .pptx)
- PDF documents
- Other common formats
### 🌐 Network Services
- **Multi-Search Engine Support**
- Baidu Search
- Bing Search
- DuckDuckGo Search
- Google Search
- Sogou Search
- **Web Content Retrieval**
- Retrieve web content and convert it to Markdown format
- Supports content extraction and cleaning
- File download functionality (supports HTTP/HTTPS)
### 🖥️ System Control
- **Desktop Environment Control**
- Change system wallpaper (supports specified files or automatic switching)
- Switch taskbar modes (Fashion Mode/Efficient Mode)
- Enable/disable Do Not Disturb mode
- Switch system themes (Light/Dark/Automatic)
- **System Information**
- Get system hardware information (CPU, memory, hard disk)
- **Communication Features**
- Send emails (supports subject, body, recipient, CC, BCC)
- Create schedules (supports title, start time, end time)
### 💻 Terminal Commands
- **Safe Command Execution**
- Execute common Linux commands
- Dangerous command interception and confirmation mechanism
- Supports custom working directories
- Command timeout control (maximum 120 seconds)
- Execution results include standard output, error output, and exit code
### 🔧 Git Operations
- **Repository Management**
- View Git repository status
- Retrieve commit history
- View branch information
- Clone remote repositories
- **File Operations**
- Add files to the staging area
- Commit changes
- Pull remote updates
- Push local commits
- **Differences and History**
- View file modification differences (working directory/staging area)
- View detailed information of specific commits
- View file modification history
### 🌐 Browser Control
- **Browser Automation**
- Supports Chrome and Firefox browsers
- Start/stop browser sessions
- Supports headless and headed modes
- Page navigation and screenshot functionality
- **Page Element Operations**
- Supports various element selectors (CSS, XPath, ID, etc.)
- Click page elements (buttons, links, etc.)
- Input text into input fields
- Get element text and attributes
- Wait for elements to appear (smart wait)
- **Advanced Features**
- Execute custom JavaScript scripts
- Page scrolling and element positioning
- Automatic form filling
- Retrieve page information (title, URL, etc.)
### 🔔 System Interaction
- **DBus Service Integration**
- Deep integration with Deepin system services
- Supports DBus interfaces for V20 and V25 versions
- Read and set system properties
- **User Interaction**
- Display confirmation dialogs
- Send system desktop notifications
- Supports custom icons and timeout settings
## Installation
### Use uv to install dependencies:
```bash
uv sync
```
### Or use pip:
```bash
pip install -e .
```
## Usage
### Start the MCP Server
```bash
python src/deepin_mcp_server/server.py
```
### Browser Control Function Settings
> **💡 Important Note**: If you have already installed Chrome, **you can use it directly**! The system will automatically download the matching ChromeDriver without manual installation.
**For Chrome users (recommended):**
```bash
# If Chrome is installed, just test it directly
python test_chrome_direct.py
```
**Complete Automatic Setup:**
```bash
# Run the automatic setup script
./setup_browser.sh
```
**Manual Setup:**
Browser control functionality requires the corresponding WebDriver to be installed:
**Chrome WebDriver Installation:**
```bash
# Method 1: Use package manager (recommended)
sudo apt install chromium-chromedriver
# Method 2: Manual download
# Visit https://chromedriver.chromium.org/ to download the corresponding version
```
**Firefox WebDriver Installation:**
```bash
# Method 1: Use package manager
sudo apt install firefox-geckodriver
# Method 2: Manual download
# Visit https://github.com/mozilla/geckodriver/releases to download
```
### Browser Function Testing
Verify browser control functionality:
```bash
# Start the MCP server
python src/deepin_mcp_server/server.py
```
This example includes:
- Baidu search automation
- GitHub page navigation demonstration
- JavaScript script execution
- Form auto-filling demonstration
## Project Structure
```
src/deepin_mcp_server/
├── server.py # Main server file, defines all MCP tools
├── dbus_service/ # DBus service module
│ └── services.py # DBus interface and service definitions
├── system_tools/ # System tools module
│ ├── file_operation.py # File operation functionality
│ ├── git_operations.py # Git operation functionality
│ ├── system_control.py # System control functionality
│ ├── terminal_command.py # Terminal command execution
│ └── browser_control.py # Browser control functionality
└── web_service/ # Network service module
├── services.py # Main interface for network services
├── utils.py # Utility functions
└── web_search/ # Network search submodule
├── base.py # Base class for search
├── search.py # Main search logic
├── search_types.py # Search type definitions
├── util.py # Search utility functions
└── engines/ # Search engine implementations
├── baidu.py # Baidu search
├── bing.py # Bing search
├── duckduckgo.py # DuckDuckGo search
├── google.py # Google search
└── sogou.py # Sogou search
```
## Technical Dependencies
- **Python >= 3.12**
- **Core Dependencies**:
- `httpx >= 0.28.1` - HTTP client
- `mcp[cli] >= 1.6.0` - MCP protocol support
- `requests >= 2.30.0` - HTTP request library
- **Document Processing**:
- `PyPDF2` - PDF document processing
- `python-docx` - Word document processing
- `python-pptx` - PowerPoint document processing
- `pandas` - Data processing
- **Web Page Processing**:
- `beautifulsoup4 >= 4.12.0` - HTML parsing
- `lxml >= 4.9.0` - XML/HTML processor
- `markdownify >= 0.11.0` - HTML to Markdown conversion
- `readabilipy >= 0.2.0` - Web content extraction
- `readability-lxml >= 0.8.1` - Readability analysis
- `lxml_html_clean` - HTML cleaning
- **Browser Automation**:
- `selenium >= 4.15.0` - Browser automation framework
## Featured Functions
1. **Deep System Integration**: Deeply integrated with the Deepin desktop environment, supporting wallpaper switching, theme switching, and other system-level operations.
2. **Safe Command Execution**: Built-in detection of dangerous commands and user confirmation mechanisms to ensure system security.
3. **Multiple Search Engines**: Supports five mainstream search engines, with automatic switching to ensure search success rates.
4. **Complete Git Workflow**: Supports a complete Git development workflow from basic operations to advanced features.
5. **Rich Document Support**: Supports reading and processing various document formats.
6. **Browser Automation**: Powerful browser control based on Selenium, supporting automation of complex web tasks.
7. **User-Friendly Interaction**: Provides dialog confirmations and system notifications to enhance user experience.
## Logging
Server runtime logs are saved at: `~/.local/share/deepin-mcp-server/deepin-mcp-server.log`
## Compatibility
- Supports Deepin V20 and V25 systems
- Automatically detects system versions and uses the corresponding DBus interfaces
- Backward compatibility with older system functionalities
Connection Info
You Might Also Like
markitdown
Python tool for converting files and office documents to Markdown.
everything-claude-code
Complete Claude Code configuration collection - agents, skills, hooks,...
awesome-claude-skills
A curated list of awesome Claude Skills, resources, and tools for...
antigravity-awesome-skills
The Ultimate Collection of 130+ Agentic Skills for Claude...
openfang
Open-source Agent Operating System
memU
MemU is a memory framework for LLM and AI agents, organizing multimodal...