mcp-device
A Model Context Protocol (MCP) server for seamless integration with peripheral devices connected to your computer. Control, monitor, and manage hardware devices through a unified API.
claude mcp add --transport stdio akshitsinha-mcp-device-server uvx --directory /path/to/mcp-device-server run src/main.py \ --env MCP_HOST="127.0.0.1" \ --env MCP_PORT="8000" \ --env MCP_ENABLE_AUDIO="true" \ --env MCP_ENABLE_CAMERA="true" \ --env MCP_ENABLE_SCREEN="true" \ --env MCP_ENABLE_PRINTER="true"
How to use
This MCP server, mcp-device, exposes a unified API to interact with peripheral hardware connected to your machine. It aggregates capabilities for cameras, printers, audio devices, and screen capture under a single MCP interface, enabling programmatic control and monitoring through the MCP protocol. Use the available tools to list devices, query information, and perform actions such as capturing images, recording video, printing documents, recording audio, and capturing the screen. The server can be run directly via uvx (Python/uv) or integrated with Claude Desktop by pointing it at the server’s run command, so you can orchestrate device actions from your application or UI.
Typical usage flows include starting the server with the configured host/port, enabling the desired feature flags via environment variables, and issuing MCP tool commands (e.g., list_cameras, capture_image, list_printers, record_audio, capture_screenshot) through your MCP client or automation layer. Refer to the Tools Reference Wiki linked in the repository for exact command formats and response schemas for each tool.
How to install
Prerequisites:
- An OS with Python and the uv (uvx) runtime available (as used in this project).
- System dependencies for full functionality:
- FFMPEG (for screen and camera recording)
- PortAudio (for audio recording)
Installation steps:
-
Install system dependencies
- macOS: brew install ffmpeg portaudio
- Linux (Ubuntu/Debian): sudo apt update sudo apt install ffmpeg portaudio19-dev
- Linux (Fedora): sudo dnf install ffmpeg portaudio-devel
- Windows: winget install ffmpeg
-
Clone the repository git clone https://github.com/akshitsinha/mcp-device-server.git cd mcp-device-server
-
Install Python dependencies with uv (uvx) uv sync
-
Run the server (examples)
- Run directly: uv run src/main.py
- Run via Claude Desktop (config example): Use the provided Claude Desktop config to point to the server directory and run the main script, for example: { "mcpServers": { "mcp-device-server": { "command": "uv", "args": [ "--directory", "/path/to/mcp-device-server", "run", "src/main.py" ] } } }
Note: Ensure environment variables MCP_HOST, MCP_PORT, and feature flags are set as needed (see Configuration section in the README).
Additional notes
Tips and common issues:
- Ensure the required system libraries (FFMPEG and PortAudio) are installed for full functionality of screen, camera, and audio features.
- When running with Claude Desktop, keep the directory path accurate and restart Claude Desktop after updating the configuration.
- If a feature is disabled via environment variables (e.g., MCP_ENABLE_CAMERA=false), the corresponding MCP tools may not be exposed by the server.
- The MCP server listens on MCP_HOST:MCP_PORT (default 127.0.0.1:8000) unless overridden in the environment.
- If you encounter permission or device access errors, verify that the running process has access to the hardware devices (cameras, microphones, printers, displays).
- For troubleshooting, consult the Tools Reference Wiki linked in the repo for command formats and expected responses.
Related MCP Servers
mcp-vegalite
MCP server from isaacwasserman/mcp-vegalite-server
github-chat
A Model Context Protocol (MCP) for analyzing and querying GitHub repositories using the GitHub Chat API.
nautex
MCP server for guiding Coding Agents via end-to-end requirements to implementation plan pipeline
pagerduty
PagerDuty's official local MCP (Model Context Protocol) server which provides tools to interact with your PagerDuty account directly from your MCP-enabled client.
futu-stock
mcp server for futuniuniu stock
mcp -boilerplate
Boilerplate using one of the 'better' ways to build MCP Servers. Written using FastMCP