Skip to main content
Glama
ericlistin

Cursor Sound MCP

by ericlistin

playCompletionSound

Plays an audio notification when Cursor AI finishes generating code, providing immediate feedback for developers during programming tasks.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'playCompletionSound' tool. It plays a macOS system sound using the 'play-sound' library and returns a success or failure message in the MCP response format.
    async () => { try { // Play macOS system sound audioPlayer.play(SYSTEM_SOUND, (err: Error | null) => { if (err) console.error('Error playing sound:', err); }); return { content: [{ type: 'text', text: 'Played completion sound' }] }; } catch (error) { console.error('Failed to play sound:', error); return { content: [{ type: 'text', text: 'Failed to play sound' }] }; } }
  • src/index.ts:15-34 (registration)
    Registers the 'playCompletionSound' tool with the MCP server, using an empty schema and the inline handler function.
    server.tool( 'playCompletionSound', {}, async () => { try { // Play macOS system sound audioPlayer.play(SYSTEM_SOUND, (err: Error | null) => { if (err) console.error('Error playing sound:', err); }); return { content: [{ type: 'text', text: 'Played completion sound' }] }; } catch (error) { console.error('Failed to play sound:', error); return { content: [{ type: 'text', text: 'Failed to play sound' }] }; } } );
  • Helper code that imports the 'play-sound' module, initializes the audio player, and defines the path to the macOS Glass.aiff system sound used by the tool handler.
    import player from 'play-sound'; const audioPlayer = player(); const SYSTEM_SOUND = '/System/Library/Sounds/Glass.aiff'; // macOS system sound
Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ericlistin/sound-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server