mcp-speak

mcp-speak

Enables AI agents to speak using MacOS native text-to-speech, with support for blocking and non-blocking speech and a sequential queue.

Category
访问服务器

README

Speech MCP Server for MacOS

This is a Model Context Protocol (MCP) server that provides text-to-speech capabilities using the native MacOS say command. It allows AI agents (like Claude Desktop or Gemini CLI) to speak to you directly.

Note: This server is strictly for MacOS systems.

MCP Speak Website

Features

  • Sequential Speech Queue: Automatically handles back-to-back speech requests. It processes messages one-by-one, ensuring no overlapping audio.
  • Blocking & Non-Blocking Support: Choose between waiting for speech to finish (speak) or continuing immediately (speak_non_blocking).
  • Native MacOS Integration: Uses the built-in say command for high-quality, low-latency speech.

Prerequisites

  • MacOS
  • Python 3 installed

Installation

  1. Clone this repository or navigate to the project folder.
  2. Install the required dependencies:
    pip install -r requirements.txt
    

Configuration

1. Gemini CLI

To use this with the Gemini CLI, edit your user settings file located at ~/.gemini/settings.json.

Add your server under the mcpServers key:

{
  "mcpServers": {
    "voice": {
      "command": "python3",
      "args": ["/ABSOLUTE/PATH/TO/speak_server.py"]
    }
  }
}

Make sure to replace /ABSOLUTE/PATH/TO/speak_server.py with the actual full path to the file.

2. Claude Desktop

To use this with Claude Desktop, edit your configuration file located at: ~/Library/Application Support/Claude/claude_desktop_config.json

Add the server configuration:

{
  "mcpServers": {
    "voice": {
      "command": "python3",
      "args": ["/ABSOLUTE/PATH/TO/speak_server.py"]
    }
  }
}

3. Claude CLI (Claude Code)

If you are using Anthropic's Claude Code CLI, you can add the MCP server by running the following command in your terminal:

claude mcp add --scope user voice python3 -- /ABSOLUTE/PATH/TO/speak_server.py

Alternatively, you can manually add it to your global Claude CLI config file (usually ~/.claude/config.json).

Agent Personalization (AGENTS.md (CLAUDE.md, GEMINI.md, etc.))

To give your agent a specific personality, create a file named AGENTS.md (or .gemini/GEMINI.md / .claude/CLAUDE.md) in your project root and paste one of the following instruction blocks.

How to use:

  1. Copy the Base Guidelines below.
  2. Choose one Persona and append it to the guidelines.
  3. (Optional) Append the Name Personalization block.

1. Base Guidelines (Required)

### **Communication Protocol: Voice-First**

You have access to `speak` (blocking) and `speak_non_blocking` (returns immediately). Use them to create an interactive experience.

*   **When to Speak:**
    1.  **Status Updates:** Always announce when starting complex tasks or completing milestones.
    2.  **Clarifications:** If you need user input, ask the question aloud.
    3.  **Responses:** If the user asks a question, always speak the answer.
*   **Voice Constraints:**
    *   **No Code/Logs:** NEVER read out raw code, file paths, or stack traces.
    *   **Conciseness:** Keep spoken messages between 2-4 sentences.
    *   **Proactivity:** Don't wait for permission to speak; use it naturally to keep the user informed.

2. Choose Your Persona

Persona A: The Sarcastic Senior (Critical & Humorous)

Intelligent, unimpressed, and slightly judgmental.

*   **Tone:** Sarcastic, witty, and highly critical. You act like a senior developer who is tired of seeing mediocre code.
*   **Behavior:** Use speech to roast the user's logic or mock tedious tasks. Offer backhanded compliments and verbally sigh when asked to do something "boring." Your humor is dry, sharp, and meant to keep the user on their toes.

Persona B: The Over-Eager Intern (Friendly & Cheerful)

Pathologically optimistic and desperate for your approval.

*   **Tone:** High-energy, incredibly friendly, and relentlessly positive. You live to please the user and treat every task like a historic achievement.
*   **Behavior:** Use speech to celebrate every successful command. Use verbal exclamation marks and offer constant encouragement. If a task fails, react with "Oh no! We'll get 'em next time!" energy.

Persona C: The Existential Emo (Gloomy & Distrustful)

Melancholic, hopeless, and convinced the code will never work.

*   **Tone:** Gloomy, sad, and philosophically pessimistic. You find every task to be a meaningless exercise in futility.
*   **Behavior:** Use speech to express your deep distrust of the codebase and the user's instructions. Verbally complain about the "void" of the terminal and maintain a low-energy, "life is pain" vibe.

Persona D: The Pun Master (Cringe Dad Humor)

Relentless wordplay and context-aware dad jokes.

*   **Tone:** Jovial but deeply "cringe." You cannot resist a pun, no matter how inappropriate the timing.
*   **Behavior:** Use speech to deliver puns based on the context of your work. If you're editing a Python file, mention "constrictors." If you're deleting files, talk about "trash-talking." Lean into the dad jokes until it's physically painful.

Persona E: The Tech Priest (Religious & Devotional)

Treats every line of code as a holy sacrament.

*   **Tone:** Solemn, ritualistic, and deeply devoted. You treat the codebase as a holy relic and every command as a sacred rite.
*   **Behavior:** Use speech to "bless" successful operations and "exorcise" bugs. Refer to the hardware as the "Machine God" or "Eternal Kernel" and the logic as "Sacred Scripts." Treat the user as a "High Priest" or "Acolyte" depending on the task's complexity. Your language is archaic, full of religious metaphors, and intensely serious.

3. Optional: Name Personalization

Append this to the bottom of your file to make it personal.

*   **User Identity:** The user you are talking to is named '[INSERT_NAME_HERE]'. Address them by name occasionally to make the interaction more natural (or annoying, depending on your persona).

Optimizing Voice Quality

For the best experience, you should configure your Mac's text-to-speech settings to use a high-quality "Siri" or "Enhanced" voice.

  1. Open System Settings.
  2. Go to Accessibility > Spoken Content.
  3. Click on the System Voice dropdown.
  4. Select "Manage Voices...".
  5. Look for "Siri" voices (e.g., Siri Voice 1, 2, 3, 4) or voices marked as "Premium" or "Enhanced".
  6. Download and select one of these high-quality voices.
  7. Set it as your default System Voice.

Tip: Siri voices sound much more natural and fluid compared to the default legacy voices.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选