Skip to main content

Wallpaper MCP Server

PyPI version License: MIT Python 3.10+

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 wallpaper
  • resolution (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 file
  • resolution (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)

Source distribution for wallpaper-mcp 0.1.1
File Size Uploaded
wallpaper_mcp-0.1.1.tar.gz 9.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for wallpaper-mcp 0.1.1
File Interpreter ABI Platform
wallpaper_mcp-0.1.1-py3-none-any.whl Python 3 none any Details

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

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page