Raspberry Pi MCP Audio Control System
Allows remote control of audio playback, system volume, microphone, notification sounds, and camera capture on a Raspberry Pi.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Raspberry Pi MCP Audio Control Systemplay the latest podcast episode"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
π Raspberry Pi MCP Audio Control System
Cualquier modificaciΓ³n en el nombre del proyecto debe ser consultada.
A distributed audio management system based on the Model Context Protocol (MCP). This project allows you to remotely control audio playback and system volume on a target machine (e.g., a Raspberry Pi) via a standardized MCP interface.
ποΈ Architecture
The system is split into two main components:
server/: The MCP Server. It runs on the machine connected to the speakers. It exposes tools to play audio bytes, stop playback, manage volume, control the microphone, play notification sounds, capture photos/videos from the camera, list the images available on the Cube display, save images into the local media/images pool (resized/padded to 240x240 JPEG), show gallery images and gifs on the Cube permanently, list the contents of the local galleries (images and gifs), cycle random images and random gifs on the Cube display, and run special routines (e.g.pato-giraβ clears Cube, uploadsmedia/special/gifs/pato-gira/pato-gira.gif+pato-gira-rev.gifand alternates every 60s via simple timer).client/: A reference Python client that demonstrates how to send audio files and control commands to the server.
Related MCP server: Device MCP Server
π Quick Start
1. Server Setup
The server requires ffmpeg (for ffplay) to be installed on the host machine:
sudo apt install ffmpeg2. Running the Server
For production:
python -m server.mainFor development:
uv run mcp dev server/main.py3. Client Usage
Once the server is running, you can use the client CLI:
# Play an audio file
python -m client.main play --file path/to/audio.mp3
# Stop playback
python -m client.main stop
# Play a notification sound (default)
python -m client.main notify --random
# List available notification sounds
python -m client.main list-notifications
# Play an alarm sound
python -m client.main play-alarm --random --stop-time 10
# List available alarms
python -m client.main list-alarms
# π Mute the microphone
python -m client.main mute-mic
# π Unmute the microphone
python -m client.main unmute-mic
# π Set the microphone volume to a specific level (0-100)
python -m client.main set-mic-volume --level 75
# π Get the current microphone volume level
python -m client.main get-mic-volume
# π· Capture a photo from the Raspberry Pi camera
python -m client.main take-photo --output photo.jpg
# π₯ Record a 15 second video from the Raspberry Pi camera at a low framerate
python -m client.main record-video --output video.mp4 --duration 15 --fps 10
# π§ Get the gif currently displayed on the Cube
python -m client.main get-cube-gif
# π List the files (gifs and images) stored on the Cube, with sizes in KB
python -m client.main list-cube-contents
# ποΈ Delete a file from the Cube's memory
python -m client.main delete-cube-file --file tmp.gif
# π§Ή Clear all files from the Cube's memory
python -m client.main clear-cube-contents
# πΎ Get the free storage space on the Cube display
python -m client.main get-cube-free-space
# πΌοΈ Display a gif on the Cube (validated against the Cube file list, sent as /image/<name>)
python -m client.main set-cube-gif --gif gif1.gif
# π‘ Set the Cube display brightness to a specific level (0-100, default 50)
python -m client.main set-cube-brightness --level 10
# β¨ Get the current brightness level of the Cube display
python -m client.main get-cube-brightness
# π Turn off the Cube display (brightness 0, remembers the previous level)
python -m client.main turn-cube-off
# βοΈ Turn on the Cube display (restores the remembered brightness, default 50)
python -m client.main turn-cube-on
# π€ Upload a gif/jpg image (must be 240x240) to the Cube display (sent Base64-encoded)
python -m client.main upload-cube-gif --file path/to/image.gif
# πΎ Save any image in the server's media/images pool, resized/padded to exactly 240x240 JPEG (--name usually has no suffix; max 25 chars)
python -m client.main save-image-in-gallery --file path/to/photo.png --name test
# πΊ Show an image already stored in the server's gallery on the Cube (no timer, it stays until changed)
python -m client.main show-gallery-image --file test.jpg
# πΊ Show a gif from the server's media/gifs gallery on the Cube as tmp.gif (no timer, it stays until changed)
python -m client.main show-gallery-gif --file test.gif
# πΌοΈ List the images stored in the server's local gallery (media/images)
python -m client.main list-gallery-images
# ποΈ List the gifs stored in the server's local gallery (media/gifs)
python -m client.main list-gallery-gifs
# β±οΈ Show an image temporarily on the Cube (default 5 s, max 30 s, non-blocking; other formats are converted)
python -m client.main show-cube-gif --file path/to/image.gif --seconds 10
# π² Start cycling random images from media/images as random.jpg (must be 240x240, default 300 s / 5 min, max 3600 s)
python -m client.main start-random-images --seconds 300
# π Get which temporary image (random.jpg) is currently being used on the Cube
python -m client.main get-current-random-image
# π Stop cycling random images on the Cube (the last random.jpg stays displayed)
python -m client.main stop-random-images
# π² Start cycling random gifs from media/gifs as random.gif (default 300 s / 5 min, max 3600 s)
python -m client.main start-random-gifs --seconds 300
# π Get which temporary gif (random.gif) is currently being used on the Cube
python -m client.main get-current-random-gif
# π Stop cycling random gifs on the Cube (the last random.gif stays displayed)
python -m client.main stop-random-gifs
# π¦ Special routine `pato-gira` β clears Cube, uploads 2 gifs from media/special/gifs/pato-gira and loops every 60s (1 min) simple timer
python -m client.main special --routine pato-gira
python -m client.main special --routine pato-gira --seconds 60
python -m client.main special --status # show special routine status
python -m client.main special --stop # stop special routineπ§ͺ Testing
It is highly recommended to run the integration tests to verify the audio processing and server logic.
# Set PYTHONPATH to include the current directory and run tests
export PYTHONPATH=$PYTHONPATH:.
python -m unittest discover testsπ οΈ Tech Stack
Language: Python 3.11+
Protocol: Model Context Protocol (MCP)
Audio Backend:
ffplay(FFmpeg)Image Validation: Pillow
Package Management:
uv/pyproject.toml
π Project Structure
.
βββ client/ # Reference MCP Client
β βββ main.py # Client CLI entry point
β βββ audio_client.py # Audio control logic
β βββ image_client.py # Photo capture logic
β βββ video_client.py # Video recording logic
β βββ notification_client.py # Notification logic
β βββ cube_client.py # Cube display image listing
βββ server/ # MCP Server implementation
β βββ audio/ # Audio playback, volume and microphone logic
β β βββ play.py # Base audio control
β β βββ notify.py # Notification sounds logic
β β βββ speaker.py # Speaker mute/unmute and volume control
β β βββ micphone.py # Microphone mute/unmute and volume control
β βββ image/ # Photo capture tools
β βββ video/ # Video recording tools
β βββ display/ # Cube display image and storage info
β βββ cube.py # Cube current gif (/img.json), file listing with sizes (cube://contents), file deletion (/delete?file=), clear all (/set?clear=image), free space, gif-set (/image/<name>), brightness (/set?brt=, /brt.json), display on/off, image upload (/doUpload), temporary gif, local image saving (media/images, 240x240 JPEG with black padding), permanent gallery image/gif show, gallery listing (gallery://images, gallery://gifs), random image cycling (media/images -> random.jpg), random gif cycling and special routine pato-gira (media/special/gifs/pato-gira β 60s timer, cube://special)
βββ tests/ # Integration testsTool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
No tool schema history has been recorded yet.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Drive WhatsApp from any MCP client: pair devices, send text and media, manage contacts and groups.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
An authenticated remote MCP server for user-owned devices and one-shot capability invocation.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceA Model Context Protocol server that enables controlling Spotify playback through natural language commands in MCP clients like Cursor or Claude for Desktop.1-
- AlicenseNot gradedqualityDmaintenanceA 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.5MIT
- FlicenseNot gradedqualityDmaintenanceAllows controlling Apple Music on macOS through an MCP server that supports playback control, volume adjustment, and music search functionality.2-
- AlicenseAqualityDmaintenanceMCP server for controlling the mpv media player, enabling playback control, music library browsing, YouTube streaming and downloading, and metadata editing from within an MCP client.17671MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ChilindrinoBot/raspberry-pi-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server