Wallpaper MCP Server
A cross-platform MCP (Model Context Protocol) server for setting desktop wallpapers on Windows, macOS, and Linux.
一个跨平台的 MCP 服务器,用于在 Windows、macOS 和 Linux 上设置桌面壁纸。
Features / 功能特性
- 🖼️ Set wallpaper from URL - Download and set wallpaper from any image URL
- 📁 Set wallpaper from local file - Use local images as wallpaper
- 📱 Get screen resolution - Automatically detect current screen resolution
- 🎨 Smart image processing - Auto-resize and crop images to fit screen perfectly
- 🌍 Cross-platform support - Works on Windows, macOS, and Linux
Installation / 安装
From PyPI
pip install wallpaper-mcp
From Source / 从源码安装
git clone https://github.com/mcpcn/wallpaper-mcp
cd wallpaper-mcp
pip install -e .
Using uv
uv pip install wallpaper-mcp
Usage / 使用方法
With Claude Desktop
Add to your Claude Desktop configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"wallpaper": {
"command": "wallpaper-mcp"
}
}
}
Or if using uv:
{
"mcpServers": {
"wallpaper": {
"command": "uv",
"args": ["--directory", "/path/to/wallpaper-mcp", "run", "wallpaper-mcp"]
}
}
}
Available Tools / 可用工具
1. set_wallpaper_from_url
Set desktop wallpaper from an image URL.
Parameters:
url(required): Image URL to download and set as wallpaperresolution(optional): Target resolution as{width, height}object
Example:
Set this aurora image as my wallpaper:
https://example.com/aurora.jpg
2. set_wallpaper_from_file
Set desktop wallpaper from a local image file.
Parameters:
file_path(required): Path to local image fileresolution(optional): Target resolution as{width, height}object
Example:
Set ~/Pictures/sunset.jpg as my desktop wallpaper
3. get_current_resolution
Get the current screen resolution.
Parameters: None
Example:
What's my current screen resolution?
Platform Support / 平台支持
| Platform | Status | Method |
|---|---|---|
| macOS | ✅ Supported | AppleScript via osascript |
| Windows | ✅ Supported | Windows API via ctypes |
| Linux (GNOME) | ✅ Supported | gsettings |
| Linux (KDE) | ✅ Supported | qdbus |
| Linux (XFCE) | ✅ Supported | xfconf-query |
| Linux (MATE) | ✅ Supported | gsettings |
| Linux (Other) | ✅ Supported | feh fallback |
Supported Image Formats / 支持的图片格式
- JPEG/JPG
- PNG
- BMP
- GIF (static)
- WEBP
- TIFF
Requirements / 依赖
- Python 3.10+
- Pillow (for image processing)
- requests (for downloading images)
- mcp (for MCP protocol support)
Troubleshooting / 故障排除
macOS Permission Issues
Grant Terminal or your app appropriate permissions in System Preferences > Security & Privacy > Privacy.
Linux Desktop Detection
If auto-detection fails, manually set the environment variable:
export DESKTOP_SESSION=gnome # or kde, xfce, etc.
Windows Administrator Rights
Some operations may require administrator privileges.
Development / 开发
Setup Development Environment
# Clone the repository
git clone https://github.com/mcpcn/wallpaper-mcp
cd wallpaper-mcp
# Install with development dependencies
pip install -e ".[dev]"
Running Tests
pytest tests/
Code Quality
# Format code
black src/
# Lint
ruff check src/
License / 许可证
MIT License - see LICENSE file for details.
Contributing / 贡献
Contributions are welcome! Please feel free to submit a Pull Request.
欢迎贡献!请随时提交 Pull Request。
Credits / 致谢
Developed by MCP Chinese Community
由 MCP 中文社区 开发
Metadata
Release files for wallpaper-mcp 0.1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| wallpaper_mcp-0.1.1.tar.gz | 9.1 kB | Without provenance | Details for wallpaper_mcp-0.1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| wallpaper_mcp-0.1.1-py3-none-any.whl | Python 3 | none | any | Details for wallpaper_mcp-0.1.1-py3-none-any.whl |
Total release size: 19.2 kB
Release files / wallpaper_mcp-0.1.1.tar.gz
| Download URL | wallpaper_mcp-0.1.1.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d63428260886cacc0a76cc0442dd10e99cac7e9c85213aa51347f2c6e17f66e1
|
|
BLAKE2b-256 checksum How to use checksums |
0097a1cb63d19dfc74ab692f441d62c93bd7d3c1a356cb4e3448c7b0e07b999f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Release files / wallpaper_mcp-0.1.1-py3-none-any.whl
| Download URL | wallpaper_mcp-0.1.1-py3-none-any.whl |
|---|---|
| Size | 10.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
0bb085a882ee3cbe788cad34622af1eebcd6269737ed63ff88a6b43489cc06bc
|
|
BLAKE2b-256 checksum How to use checksums |
b939cc195a1dcbd63c4cc0d0a8c53c059f6063dc6f32f5b82b769aca1fff9041
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.12.12
|
Security for wallpaper-mcp 0.1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.