Content
# Desktop Image Manager MCP Server
A desktop image management server developed based on the Model Context Protocol (MCP), providing image file statistics, viewing, and compression features.
<a href="https://glama.ai/mcp/servers/@zhixiaoqiang/desktop-image-manager-mcp">
<img width="380" height="200" src="https://glama.ai/mcp/servers/@zhixiaoqiang/desktop-image-manager-mcp/badge" alt="Desktop Image Manager Server MCP server" />
</a>
## Example Operation:
[](https://claude.ai/share/0ffbad1e-502e-4188-b008-0bb966acf06d)
[https://claude.ai/share/0ffbad1e-502e-4188-b008-0bb966acf06d](https://claude.ai/share/0ffbad1e-502e-4188-b008-0bb966acf06d)
## Features
- Count desktop images: Quickly obtain the total number of image files on the desktop.
- Get image list: List the names of all image files on the desktop.
- Image compression: Supports compressing image files in formats such as JPG, PNG, WebP, etc., with customizable compression quality.
## Implementation Tips
Let Trae reference `./demand.md` for functional code generation, simplified version as follows:
```plaintext
... (This is the already introduced domain knowledge)
Create an MCP server that can:
- Features:
- Count the number of image files on the current desktop.
- Retrieve the names of the corresponding files.
- Support image compression.
Requirements:
- No need to provide prompt and resource-related code.
- You can assume my desktop path is /Users/{username}/Desktop.
```
## Supported Image Formats
- JPG/JPEG
- PNG
- GIF
- BMP
- WebP
- TIFF
- SVG
## Environment Requirements
- Node.js >= 16
- pnpm >= 8
## Installation
```bash
# Clone the project
git clone <repository-url>
cd desktop-image-manager
# Install dependencies
pnpm install
```
## Development
```bash
# Start the development server
pnpm dev
```
## Build and Run
```bash
# Build the project
pnpm build
# Run the server
pnpm start
```
## Debugging
```bash
# Debug the MCP service
pnpm inspector
```
## MCP Tool Usage Instructions
### 1. Count Desktop Images
```bash
# Build the project
pnpm build
# Run the server
pnpm start
```
### 2. Get Image List
```typescript
// Tool Name: list-desktop-images
// Parameters: None
await client.callTool({
name: "list-desktop-images"
});
```
### 3. Compress Image
```typescript
// Tool Name: compress-image
// Parameters:
// - fileName: The name of the image file to compress
// - quality: Compression quality (1-100), default 80
// - outputName: Output file name (optional)
await client.callTool({
name: "compress-image",
arguments: {
fileName: "example.jpg",
quality: 75,
outputName: "example-compressed.jpg"
}
});
```
## Development
```bash
# Start the development server
pnpm dev
```
## Installation
Use Claude Desktop to add the following configuration config:
MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%/Claude/claude_desktop_config.json
```json
{
"desktop-image-manager": {
"command": "npx",
"args": [
"-y",
"@jzone-mcp/desktop-image-manager-mcp"
]
}
}
```
## Notes
1. Ensure sufficient desktop access permissions.
2. Compressing large files may take a long time.
3. Compressed files are saved on the desktop by default, with "-compressed" suffix added to the file name.
## Tech Stack
- TypeScript
- MCP SDK
- Sharp (Image Processing)
- fs-extra (File Operations)
- zod (Parameter Validation)
## License
MIT License
```plaintext
This README file contains the main information about the project, installation instructions, usage methods, and notes. If you need to add or modify any content, please let me know.
```
Connection Info
You Might Also Like
bytebot
Bytebot is a self-hosted AI desktop agent that automates computer tasks...
inbox-zero
The world's best AI personal assistant for email. Open source app to help...
ClaudeComputerCommander
This is an MCP server that provides terminal control, file system search,...
ZipAgent
轻量级AI Agent框架,让你5分钟构建专属智能助手。
Lightweight AI Agent framework. Build your AI...
mcp-probe
A Model Context Protocol (MCP) client library and debugging toolkit in Rust....
smileyCoin
Smileycoin (SMLY) is a cryptocurrency using multiple proof-of-work algorithms.