MCP Voice Notification
Provides voice notifications using Grok's text-to-speech API to alert users when Claude Code completes tasks, with support for both local and remote server configurations.
README
MCP Voice Notification
An MCP server that provides voice notifications using the Grok Voice API. Perfect for alerting you when Claude Code has finished a task.
Features
- Text-to-speech voice notifications via Grok's realtime voice API
- Works with Claude Code and other MCP-compatible clients
- Two server modes: HTTP (streamable) or stdio (local)
- Cross-platform audio playback (macOS, Linux)
Prerequisites
- uv (Python package manager)
- A Grok API key from x.ai
- Audio playback capability (
afplayon macOS,aplay/paplayon Linux)
Installation
-
Clone the repository:
git clone https://github.com/orishu/mcp-voice-notif.git cd mcp-voice-notif -
Install dependencies with uv:
uv sync -
Set up your environment:
cp env.sample .env # Edit .env and add your GROK_API_KEY
Usage
Option 1: Stdio Server (Recommended for local use)
The stdio server communicates via standard input/output, which is the simplest setup for local MCP clients.
Using the claude mcp add command (Recommended)
The easiest way to add the server is using the Claude Code CLI:
claude mcp add voice-notification -e GROK_API_KEY=your_api_key_here -- \
uv run --directory /path/to/mcp-voice-notif python stdio_server.py
Replace /path/to/mcp-voice-notif with the actual path to this project.
Manual configuration
Alternatively, add to your Claude Code MCP configuration (~/.claude/claude_code_config.json):
{
"mcpServers": {
"voice-notification": {
"command": "uv",
"args": ["run", "--directory", "/path/to/mcp-voice-notif", "python", "stdio_server.py"],
"env": {
"GROK_API_KEY": "your_api_key_here"
}
}
}
}
Option 2: HTTP Server (For remote/shared use)
The HTTP server runs as a persistent service, useful for remote access or shared setups.
-
Start the server:
uv run python server.pyThe server will start on
http://127.0.0.1:8000. -
Add to your Claude Code MCP configuration:
{ "mcpServers": { "voice-notification": { "type": "streamable-http", "url": "http://127.0.0.1:8000/mcp" } } }
Tool Reference
voice_notification
Generates and plays a voice notification.
Parameters:
text(string, optional): The text to speak. Default: "Done!"
Example responses:
- "Voice notification played: 'Build complete!'"
- "No audio data received from API"
Configuring Claude Code to Use Voice Notifications
To have Claude Code automatically notify you when it's ready for your next prompt, add the following to your project's CLAUDE.md file (or global ~/.claude/CLAUDE.md):
When you complete a task, use the voice_notification tool to alert the user.
Keep the message short and contextual (e.g., "Build done!", "Tests passed!", "Ready!").
This instructs the agent to call the voice notification with a brief, task-relevant message whenever it finishes working.
Testing
To test the voice API directly:
uv run python test_voice_api.py
License
MIT License - see LICENSE for details.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。