Skip to main content
Glama
tijs

MCP Sound Tool

by tijs

MCP 사운드 도구

Cursor AI 및 기타 MCP 호환 환경에서 사운드 효과를 재생하는 모델 컨텍스트 프로토콜(MCP) 구현입니다. 이 Python 구현은 더욱 인터랙티브한 코딩 경험을 위해 오디오 피드백을 제공합니다.

특징

  • 다양한 이벤트(완료, 오류, 알림)에 대한 사운드 효과를 재생합니다.

  • Cursor 및 기타 IDE와의 표준화된 통합을 위해 MCP(Model Context Protocol)를 사용합니다.

  • 크로스 플랫폼 지원(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를 사용하는 것입니다. 이 방법을 사용하면 패키지를 격리된 환경에 설치하면서 동시에 명령을 전역적으로 사용할 수 있습니다.

지엑스피1

이 방법을 사용하면 도구가 자체적으로 격리된 환경을 갖도록 하여 다른 패키지와의 충돌을 피할 수 있습니다.

대안: pip로 설치

pip를 사용하여 직접 설치할 수도 있습니다.

pip install mcp-sound-tool

출처에서

  1. 이 저장소를 복제하세요:

    git clone https://github.com/yourusername/mcp-sound-tool
    cd mcp-sound-tool
  2. 소스 디렉토리에서 pipx로 직접 설치:

    pipx install .

    또는 pip를 사용하면:

    pip install -e .

용법

사운드 파일 추가

사운드 파일을 sounds 디렉터리에 넣으세요. 다음과 같은 사운드 파일이 필요합니다.

  • completion.mp3 - 코드 생성 후 재생됨

  • error.mp3 - 오류 발생 시 재생됩니다.

  • notification.mp3 - 일반 알림에 사용됨

freesound.org와 같은 웹사이트에서 무료 음향 효과를 찾을 수 있습니다.

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 모델을 위한 Sound MCP 사용 지침

이 MCP 서버는 AI 상호작용을 위한 오디오 피드백 기능을 제공합니다. 사용자가 텍스트를 읽지 않고도 작업 상태를 명확하게 나타내는 오디오 신호를 제공하여 사용자 경험을 향상시키도록 설계되었습니다.

사운드 피드백을 사용하는 경우

AI 에이전트는 적절한 순간에 적극적으로 사운드 도구를 활용해야 합니다.

  1. 성공 사운드( completion ) :

    • 작업이나 명령이 성공적으로 완료된 후

    • 중요한 작업이 성공적으로 완료되었을 때

    • 사용자의 요청이 이행되었음을 확인할 때

  2. 오류 소리( error ) :

    • 명령이 실패하거나 오류가 발생한 경우

    • 사용자에게 문제에 대해 경고할 때

    • 요청한 대로 작업을 완료할 수 없는 경우

  3. 알림음( 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}"

사용 가능한 도구

  1. play_sound(sound_type="completion", custom_sound_path=None) : 사운드 효과를 재생합니다.

  2. list_available_sounds() : 사용 가능한 모든 사운드 파일을 나열합니다.

  3. install_to_user_dir() : 사용자의 config 디렉토리에 사운드 파일을 설치합니다.

자세한 내용을 알아보려면 MCP 서버에 연결하여 도구 설명을 확인하세요.

개발

개발을 위해:

# Install development dependencies
pip install -e ".[dev]"

# Run tests
pytest

감사의 말

  • 이 Python 버전에 영감을 준 원래의 sound-mcp JavaScript 구현을 만든 SIAM-TheLegend

  • AI 도구 상호 작용을 위한 강력한 표준을 만드는 MCP 프로토콜 개발자

  • 테스트 및 문서화에 기여한 사람들

특허

이 프로젝트는 MIT 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

Available Tools

3 tools
install_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.
    
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.2/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must cover behavioral traits. It states the tool copies default sound files to the config directory for modification, but lacks details on whether files are overwritten, directory creation, or error conditions. This provides basic but incomplete behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, uses bullet points for clarity, and front-loads the core action in the first line. Every sentence adds value with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a zero-parameter tool with an output schema, the description adequately covers purpose and usage scenarios. It does not elaborate on return values (not required due to output schema) or side effects like overwriting, but the simplicity of the tool makes this likely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, making schema coverage trivially 100%. Per the rubric, a baseline of 4 applies. No parameter information is needed, and the description does not need to add any.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the primary action: 'Install sound files to user's config directory.' This is a specific verb-resource combination that distinguishes it from sibling tools list_available_sounds and play_sound, which are read and playback operations respectively.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description includes explicit 'WHEN TO USE THIS TOOL' bullets, covering customization, first-time setup, and troubleshooting. While it does not specify when not to use or explicitly name alternatives, the use cases are clear and distinct from siblings.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.
    
ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.5/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It implies read-only fetching of available sounds, but does not explicitly state that it is safe, nondestructive, or what the output format is. Since it's a simple list tool, this is adequate but not fully transparent.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with only two sentences plus a bulleted usage section. It front-loads the purpose and uses clear formatting, making it easy to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool complexity (no parameters), the presence of an output schema, and the absence of annotations, the description fully covers the tool's purpose and usage. No additional details are needed.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, and schema coverage is 100%. The description adds value by explaining the purpose, aligning with the baseline score of 4 for parameterless tools.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists all available notification sounds. It uses specific verb 'list' and resource 'notification sounds', distinguishing it from sibling tools like 'play_sound' and 'install_to_user_dir'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly provides three scenarios for when to use the tool: checking available options, verifying existence of a specific sound, and before using a custom sound. This gives clear guidance without needing to mention alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

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.
    
ParametersJSON Schema
NameRequiredDescriptionDefault
sound_typeNocompletion
custom_sound_pathNo

Output Schema

ParametersJSON Schema
NameRequiredDescription
resultYes

TDQS

A4.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose behavioral traits such as whether audio playback is synchronous, permission requirements, or error handling. The output schema exists but is not described.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is well-structured with a clear introduction and bullet-point guidelines. The example adds context. It is slightly verbose but efficiently conveys necessary information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (2 parameters, no required ones), the description covers the purpose, usage scenarios, and parameter semantics adequately. It does not discuss return values, but that is acceptable for a straightforward action.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds meaning to the sound_type parameter by explaining when to use each value. The custom_sound_path parameter is implied but not detailed. This compensates partially for the lack of schema descriptions.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description explicitly states 'Play a notification sound on the user's device' and differentiates between sound types with specific use cases. It clearly distinguishes from sibling tools like install_to_user_dir and list_available_sounds.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides detailed WHEN TO USE guidelines for each sound type (completion, error, notification, custom) and an example. This gives clear context for when the tool should be invoked.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 3 tool updates
    • First observedinstall_to_user_dir
    • First observedlist_available_sounds
    • First observedplay_sound

TDQS

A4.4/5.0

Scored across 3 tools

Disambiguation5/5

Each tool has a distinct purpose: installing, listing, and playing sounds, with no overlap in functionality.

Naming Consistency5/5

All tools use a consistent verb_noun pattern in snake_case, with clear and descriptive names.

Tool Count5/5

Three tools is a reasonable number for a sound tool, covering setup, exploration, and core usage.

Completeness4/5

The tool set covers basic lifecycle: install, list, play. Minor gap: no tool for direct volume control or custom sound management beyond defaults.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers