Audio MCP Server
音频 MCP 服务器
一个 MCP(模型上下文协议)服务器,为 Claude 等 AI 助手提供音频输入/输出功能。该服务器使 Claude 能够与计算机的音频系统进行交互,包括通过麦克风录音和通过扬声器播放音频。
特征
列出音频设备:查看系统上所有可用的麦克风和扬声器
录制音频:从任何麦克风捕获可自定义持续时间和质量的音频
播放录音:播放最近的录音
音频文件播放:通过扬声器播放音频文件
文本转语音:(未来实现的占位符)
Related MCP server: mac-audio-router-mcp
要求
Python 3.8 或更高版本
系统上的音频输入/输出设备
安装
克隆此存储库或将文件下载到您的计算机:
git clone https://github.com/GongRzhe/Audio-MCP-Server.git
cd Audio-MCP-Server创建虚拟环境并安装依赖项:
# 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或者使用附带的安装脚本来自动安装:
python setup_mcp.py配置
Claude桌面配置
要将此服务器与 Claude Desktop 一起使用,请将以下内容添加到您的 Claude Desktop 配置文件中:
macOS :
~/Library/Application Support/Claude/claude_desktop_config.jsonWindows :
%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"
}
}
}
}将路径替换为系统上的实际路径。安装脚本将为您生成此配置。
用法
设置服务器后,重新启动 Claude Desktop。您应该在输入框中看到一个锤子图标,表示工具可用。
尝试询问克劳德:
“我的系统上有哪些麦克风和扬声器?”
“用我的麦克风录制 5 秒的音频。”
“播放录音。”
“从我的电脑播放音频文件。”
可用工具
列出音频设备
列出系统上所有可用的音频输入和输出设备。
录制音频
录制麦克风的音频。
参数:
duration:录制持续时间(以秒为单位)(默认值:5)sample_rate:采样率(赫兹)(默认值:44100)channels:音频通道数(默认值:1)device_index:要使用的特定输入设备索引(默认值:系统默认值)
播放最新录音
播放最近录制的音频。
播放音频
文本转语音功能的占位符。
参数:
text:要转换为语音的文本voice:要使用的语音(默认值:“default”)
播放音频文件
通过扬声器播放音频文件。
参数:
file_path:音频文件的路径device_index:要使用的特定输出设备索引(默认值:系统默认值)
故障排除
未找到设备
如果没有找到音频设备,请检查:
您的麦克风和扬声器已正确连接
您的操作系统识别该设备
您拥有访问音频设备的必要权限
播放问题
如果音频播放不正常:
检查音量设置
确保选择了正确的输出设备
尝试重新启动 Claude Desktop 应用程序
服务器连接
如果 Claude 无法连接到服务器:
验证配置路径是否正确
确保已安装 Python 和所有依赖项
检查 Claude 的日志中的错误消息
执照
麻省理工学院
致谢
注意:此服务器提供可访问您麦克风和扬声器的工具。请务必在执行工具操作前进行审核并获得批准。
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Maintenance
Related MCP Connectors
Audio for your agent: transcribe, speak, translate, summarise, plus sound effects and music.
Audio and video tools for your AI assistant: remove noise, enhance voices, transcribe, and more.
Generate AI images, videos, music, SFX & speech in any AI assistant. Results appear inline in chat.
Lets Claude, Cursor or any MCP client build voice agents and place real phone calls.
Related MCP Servers
- AlicenseNot gradedqualityDmaintenanceEnables text-to-speech conversion with smart language detection (using Google TTS for Chinese) and audio file playback with playback controls for Claude Desktop.2MIT
- AlicenseAqualityDmaintenanceEnables AI agents to manage macOS audio routing, device switching, volume control, and multi-zone playback.16MIT
- FlicenseNot gradedqualityDmaintenanceEnables Claude to speak text with an embedded audio player, supporting 54 voices, voice cloning, and playback controls, all running locally.3-
- AlicenseAqualityBmaintenanceEnables spoken conversations with Claude on a Mac: Claude speaks through speakers, listens to the user's natural replies, and transcribes them locally. No audio leaves the computer, and it includes tools for voice setup and a hands-free voice mode.6759 npm1MIT