Skip to main content

An MCP server that provides audio input/output capabilities for AI assistants

Project description

Audio MCP Server

smithery badge

An MCP (Model Context Protocol) server that provides audio input/output capabilities for AI assistants like Claude. This server enables Claude to interact with your computer's audio system, including recording from microphones and playing audio through speakers.

Features

  • List Audio Devices: View all available microphones and speakers on your system
  • Record Audio: Capture audio from any microphone with customizable duration and quality
  • Playback Recordings: Play back your most recent recording
  • Audio File Playback: Play audio files through your speakers
  • Text-to-Speech: (Placeholder for future implementation)

Requirements

  • Python 3.8 or higher
  • Audio input/output devices on your system

Installation

Installing via Smithery

To install Audio Interface Server for Claude Desktop automatically via Smithery:

npx -y @smithery/cli install @GongRzhe/Audio-MCP-Server --client claude

Manual Installation

  1. Clone this repository or download the files to your computer:
git clone https://github.com/GongRzhe/Audio-MCP-Server.git
cd Audio-MCP-Server
  1. Create a virtual environment and install dependencies:
# Windows
python -m venv .venv
.venv\Scripts\activate
pip install -r requirements.txt

# macOS/Linux
python -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
  1. Or use the included setup script to automate installation:
python setup_mcp.py

Configuration

Claude Desktop Configuration

To use this server with Claude Desktop, add the following to your Claude Desktop configuration file:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
{
  "mcpServers": {
    "audio-interface": {
      "command": "/path/to/your/.venv/bin/python",
      "args": [
        "/path/to/your/audio_server.py"
      ],
      "env": {
        "PYTHONPATH": "/path/to/your/audio-mcp-server"
      }
    }
  }
}

Replace the paths with the actual paths on your system. The setup script will generate this configuration for you.

Usage

After setting up the server, restart Claude Desktop. You should see a hammer icon in the input box, indicating that tools are available.

Try asking Claude:

  • "What microphones and speakers are available on my system?"
  • "Record 5 seconds of audio from my microphone."
  • "Play back the audio recording."
  • "Play an audio file from my computer."

Available Tools

list_audio_devices

Lists all available audio input and output devices on your system.

record_audio

Records audio from your microphone.

Parameters:

  • duration: Recording duration in seconds (default: 5)
  • sample_rate: Sample rate in Hz (default: 44100)
  • channels: Number of audio channels (default: 1)
  • device_index: Specific input device index to use (default: system default)

play_latest_recording

Plays back the most recently recorded audio.

play_audio

Placeholder for text-to-speech functionality.

Parameters:

  • text: The text to convert to speech
  • voice: The voice to use (default: "default")

play_audio_file

Plays an audio file through your speakers.

Parameters:

  • file_path: Path to the audio file
  • device_index: Specific output device index to use (default: system default)

Troubleshooting

No devices found

If no audio devices are found, check:

  • Your microphone and speakers are properly connected
  • Your operating system recognizes the devices
  • You have the necessary permissions to access audio devices

Playback issues

If audio playback isn't working:

  • Check your volume settings
  • Ensure the correct output device is selected
  • Try restarting the Claude Desktop application

Server connectivity

If Claude can't connect to the server:

  • Verify your configuration paths are correct
  • Ensure Python and all dependencies are installed
  • Check Claude's logs for error messages

License

MIT

Acknowledgments


Note: This server provides tools that can access your microphone and speakers. Always review and approve tool actions before they execute.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iflow_mcp_gongrzhe_audio_mcp_server-0.1.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

File details

Details for the file iflow_mcp_gongrzhe_audio_mcp_server-0.1.0.tar.gz.

File metadata

File hashes

Hashes for iflow_mcp_gongrzhe_audio_mcp_server-0.1.0.tar.gz
Algorithm Hash digest
SHA256 764b744d180edb3b14673abe28cd60c16945455927ccd74f9de2baccc2cd361f
MD5 b6f19195452be09429b9fba2199a0e05
BLAKE2b-256 889a87db4508ad9e1eb15bf9eb2b2a25ad11052c8c12a4786f0e24907c07f504

See more details on using hashes here.

File details

Details for the file iflow_mcp_gongrzhe_audio_mcp_server-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for iflow_mcp_gongrzhe_audio_mcp_server-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 54f3ff02027a715107a0902e75417a5cf06fe17da3b545159603c732b00666b5
MD5 32fc4c71ca6f2a4df5ab4b4486448de6
BLAKE2b-256 23ac214defdf53c284e04274d9236f9338e72153799e1dd56ad30bf4f0c7431f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page