MCP Sound Tool
MCPサウンドツール
Cursor AIやその他のMCP互換環境でサウンド効果を再生するモデルコンテキストプロトコル(MCP)実装。このPython実装は、よりインタラクティブなコーディング体験のためにオーディオフィードバックを提供します。
特徴
さまざまなイベント(完了、エラー、通知)のサウンド効果を再生します
Cursor や他の IDE との標準化された統合に Model Context Protocol (MCP) を使用します。
クロスプラットフォームサポート(Windows、macOS、Linux)
設定可能なサウンドエフェクト
Related MCP server: MCP Notify Server
インストール
Pythonバージョンの互換性
このパッケージはPython 3.8~3.11でテストされています。Python 3.12以降でエラー(特にBrokenResourceErrorまたはTaskGroup例外)が発生する場合は、以前のバージョンのPythonをお試しください。
推奨: pipxでインストール
mcp-sound-tool をインストールするには、 pipxを使用することをお勧めします。これにより、コマンドをグローバルに使用しながら、パッケージが分離された環境にインストールされます。
# Install pipx if you don't have it
python -m pip install --user pipx
python -m pipx ensurepath
# Install mcp-sound-tool
pipx install mcp-sound-toolこの方法により、ツールが独自の分離された環境を持つことが保証され、他のパッケージとの競合を回避できます。
代替案: pipでインストールする
pip で直接インストールすることもできます。
pip install mcp-sound-toolソースから
このリポジトリをクローンします:
git clone https://github.com/yourusername/mcp-sound-tool cd mcp-sound-toolソースディレクトリから pipx を直接インストールします。
pipx install .または pip を使用する場合:
pip install -e .
使用法
サウンドファイルの追加
サウンドファイルはsoundsディレクトリに置いてください。以下のサウンドファイルが想定されています。
completion.mp3- コード生成後に再生error.mp3- エラーが発生したときに再生されますnotification.mp3- 一般的な通知に使用
freesound.org などの Web サイトで無料のサウンドエフェクトを見つけることができます。
MCPサーバーの実行
MCP サーバーを実行します。
mcp-sound-toolサーバーが起動し、stdio トランスポートを介して Cursor またはその他の MCP 互換クライアントからのイベントをリッスンします。
カーソル内の設定
このサーバーを Cursor で使用するには、MCP 構成ファイルに追加します。
macOSの場合:
// ~/Library/Application Support/Cursor/mcp.json
{
"mcpServers": {
"sound": {
"command": "mcp-sound-tool",
"args": [],
"type": "stdio",
"pollingInterval": 5000,
"startupTimeout": 10000,
"restartOnFailure": true
}
}
}Windowsの場合:
// %APPDATA%/Cursor/mcp.json
{
"mcpServers": {
"sound": {
"command": "mcp-sound-tool",
"args": [],
"type": "stdio",
"pollingInterval": 5000,
"startupTimeout": 10000,
"restartOnFailure": true
}
}
}pipxと一緒にインストールすると、 mcp-sound-toolコマンドが PATH で使用できるようになるため、Cursor は完全なパスを指定しなくてもそれを見つけて実行できるようになります。
AIモデルのための健全なMCP使用ガイドライン
このMCPサーバーは、AIとのインタラクションに音声フィードバック機能を提供します。テキストを読むことなく操作状況を分かりやすく音声で知らせることで、ユーザーエクスペリエンスを向上させるように設計されています。
サウンドフィードバックを使用する場合
AI エージェントは、適切なタイミングでサウンド ツールを積極的に使用する必要があります。
成功音(
completion) :タスクまたはコマンドが正常に完了した後
重要な操作が正常に終了したとき
ユーザーのリクエストが満たされたことを確認するとき
エラー音(
error) :コマンドが失敗したりエラーが発生した場合
ユーザーに問題について警告する場合
要求通りに操作を完了できなかった場合
通知音(
notification) :ユーザーに重要な情報を知らせる場合
ユーザーの注意や入力を促すとき
長時間実行中の操作のステータス更新
使用例
# When a command completes successfully
@mcp.tool()
def execute_command(command):
result = run_command(command)
if result.success:
play_sound("completion") # Indicate success with audio
return "Command executed successfully"
else:
play_sound("error") # Indicate failure with audio
return f"Error: {result.error_message}"利用可能なツール
play_sound(sound_type="completion", custom_sound_path=None): 効果音を再生するlist_available_sounds(): 利用可能なサウンドファイルをすべて一覧表示するinstall_to_user_dir(): サウンドファイルをユーザーの設定ディレクトリにインストールする
詳細については、MCP サーバーに接続してツールの説明を確認してください。
発達
開発の場合:
# Install development dependencies
pip install -e ".[dev]"
# Run tests
pytest謝辞
このPythonバージョンにインスピレーションを与えたオリジナルのsound-mcp JavaScript実装を作成したSIAM-TheLegend
AIツールのインタラクションのための強力な標準を作成するMCPプロトコル開発者
テストとドキュメント作成への貢献者
ライセンス
このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細については LICENSE ファイルを参照してください。
Available Tools
3 toolsinstall_to_user_dirA
Install sound files to user's config directory.
WHEN TO USE THIS TOOL:
- When the user wants to customize the sound files
- When setting up the sound tool for the first time
- When troubleshooting missing sound files
This tool copies the default sound files to the user's configuration directory
where they can be modified or replaced with custom sounds.
Inputs: no named parameters. Returns: result
list_available_soundsA
List all available notification sounds.
WHEN TO USE THIS TOOL:
- When you need to check what sound options are available
- When determining if a specific sound file exists
- Before using a custom sound to verify available options
This tool helps you discover what sounds are available for providing audio feedback.
Inputs: no named parameters. Returns: result
play_soundA
Play a notification sound on the user's device.
WHEN TO USE THIS TOOL:
- Use 'completion' sound when a task or command has SUCCESSFULLY completed
- Use 'error' sound when a command has FAILED or an error has occurred
- Use 'notification' sound for important alerts or information that needs attention
- Use 'custom' sound only when you need a specific sound not covered by the standard types
AI agents SHOULD proactively use these sounds to provide audio feedback based on
the outcome of commands or operations, enhancing the user experience with
non-visual status indicators.
Example usage: After executing a terminal command, play a 'completion' sound if
successful or an 'error' sound if it failed.
Inputs: sound_type, custom_sound_path. Returns: result
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 3 tools
Each tool has a distinct purpose: installing, listing, and playing sounds, with no overlap in functionality.
All tools use a consistent verb_noun pattern in snake_case, with clear and descriptive names.
Three tools is a reasonable number for a sound tool, covering setup, exploration, and core usage.
The tool set covers basic lifecycle: install, list, play. Minor gap: no tool for direct volume control or custom sound management beyond defaults.
Maintenance
Related MCP Connectors
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
CC0 sound effects API for AI agents — search, preview, and download via MCP.
Synth, sampler and music tracker for AI assistants: sound effects, UI sounds and songs as audio.
Audio for your agent: transcribe, speak, translate, summarise, plus sound effects and music.
Related MCP Servers
- AlicenseDqualityDmaintenanceProvides audio feedback by playing sound effects when Cursor AI completes code generation, creating a more interactive coding experience.119ISC
- AlicenseBqualityDmaintenanceA Model Context Protocol service that sends desktop notifications and alert sounds when AI agent tasks are completed, integrating with various LLM clients like Claude Desktop and Cursor.154MIT
- AlicenseBqualityDmaintenancePlays sound effects when Cursor AI completes code generation, providing audio feedback for a more interactive coding experience.12ISC
- AlicenseBqualityDmaintenanceA Model Context Protocol server that allows AI agents to play notification sounds when tasks are completed.127 npm14Apache 2.0