@mcpcn/computer-volume-control
v1.0.3
Published
Model Context Protocol Server via Cross-Platform (Mac, Windows & Linux) Computer Audio Control
Readme
Computer Volume Control MCP Server
A Model Context Protocol (MCP) server that provides cross-platform computer volume control capabilities for AI assistants. Available as an npm package for easy installation and use.
Features
Cross-platform support: Works on Windows and macOS
Volume control: Get, set, increase, and decrease system volume
Mute control: Mute and unmute system audio
MCP integration: Exposes audio control as tools for AI assistants
Installation
Install the npm package:
npm install computer-volume-control-mcpOr install locally for development:
git clone <repository-url>
cd computer-volume-control-mcp
npm installUsage
Run the standalone audio control module:
npm startRun the MCP server:
npm run mcpAvailable Functions
Core Audio Control Functions (index.js):
getCurrentVolume()- Get current system volume (0-100%)setVolume(volume)- Set system volume to specific percentagegetMuteStatus()- Check if system is mutedmute()- Mute the systemunmute()- Unmute the systemincreaseVolume()- Increase volume by 10%decreaseVolume()- Decrease volume by 10%
MCP Tools (mcp-server.js):
get_current_volume- Get current system volumeset_volume- Set volume to specific percentage (0-100)get_mute_status- Check if system is mutedmute_system- Mute the systemunmute_system- Unmute the systemincrease_volume- Increase volume by 10%decrease_volume- Decrease volume by 10%
MCP Configuration
Use the provided mcp-config.json to connect this server to MCP-compatible AI assistants:
{
"mcpServers": {
"computer-audio-control": {
"command": "npx",
"args": ["computer-volume-control-mcp"],
"env": {}
}
}
}Dependencies
loudness- Cross-platform audio control library
Project Structure
computer-volume-control-mcp/
├── index.js # Core audio control functions
├── mcp-server.js # MCP server implementation (executable)
├── mcp-config.json # MCP configuration
├── package.json # Project configuration
└── README.md # This fileExample Usage
As a Node.js module:
const { getCurrentVolume, setVolume, mute } = require('./index.js');
// Get current volume
const volume = await getCurrentVolume();
console.log(`Current volume: ${volume}%`);
// Set volume to 50%
await setVolume(50);
// Mute the system
await mute();As MCP tools (for AI assistants):
- "What's the current volume?"
- "Set volume to 75%"
- "Mute the system"
- "Increase volume by 10%"
- "Unmute the system"
License
ISC
