Skip to main content
Glama

MCP Yandex Voice — голосовые ответы в Cursor

MCP-сервер для Cursor: по сообщению из чата получает ответ от Yandex GPT (AI Studio) и озвучивает его через Yandex SpeechKit TTS. В чате можно вызывать инструмент и получать ответ текстом и аудио.

Что нужно

  • Доступ к Yandex Cloud AI Studio (Yandex GPT).

  • Включённый SpeechKit (TTS) в том же каталоге (folder).

  • API-ключ сервисного аккаунта с ролями в каталоге:

    • ai.languageModels.user (Yandex GPT)

    • ai.speechkit-tts.user (SpeechKit TTS)

Related MCP server: Yandex AI Studio MCP Server

Настройка доступа к Yandex Cloud

Подробная инструкция: docs/YANDEX-CLOUD-SETUP.md

Включает:

  • Регистрацию и создание каталога

  • Включение AI Studio и SpeechKit

  • Создание сервисного аккаунта и добавление ролей в каталоге (ai.languageModels.user, ai.speechkit-tts.user)

  • Создание API-ключа (через консоль или YC CLI)

  • Проверку доступа через curl

  • Разбор частых ошибок

Установка

cd mcp-yandex-voice
npm install
npm run build

Переменные окружения

Скопируйте .env.example в .env и заполните:

Переменная

Обязательно

Описание

YANDEX_API_KEY или YC_API_KEY

да

API-ключ сервисного аккаунта

YANDEX_FOLDER_ID или YC_FOLDER_ID

да

ID каталога в Yandex Cloud

YANDEX_MODEL

нет

Модель (по умолчанию yandexgpt-lite)

YANDEX_TTS_VOICE

нет

Голос TTS (по умолчанию alena)

YANDEX_TTS_LANG

нет

Язык (по умолчанию ru-RU)

YANDEX_TTS_FORMAT

нет

Формат аудио (по умолчанию oggopus)

YANDEX_TTS_SPEED

нет

Скорость речи: 0.1–3.0 (по умолчанию 1.0). 1.2–1.5 — быстрее

YANDEX_GPT_MAX_TOKENS

нет

Макс. токенов ответа GPT (по умолчанию 350). Меньше — быстрее ответ

Подключение в Cursor

В корне репозитория уже есть конфиг .cursor/mcp.json. Подставьте в нём свои YANDEX_API_KEY и YANDEX_FOLDER_ID в блоке env для сервера yandex-voice, затем перезапустите Cursor.

Либо настройте вручную:

  1. Откройте Cursor Settings → MCP (или конфиг MCP вручную).

  2. Добавьте сервер, например в ~/.cursor/mcp.json или в настройках проекта:

{
  "mcpServers": {
    "yandex-voice": {
      "command": "node",
      "args": ["/ABSOLUTE/PATH/TO/leetcode/mcp-yandex-voice/dist/index.js"],
      "env": {
        "YANDEX_API_KEY": "ваш_api_ключ",
        "YANDEX_FOLDER_ID": "ваш_folder_id"
      }
    }
  }
}

Замените ABSOLUTE/PATH/TO/leetcode на полный путь к репозиторию. После npm run build исполняемый файл — dist/index.js.

Вариант с tsx (без сборки):

{
  "mcpServers": {
    "yandex-voice": {
      "command": "npx",
      "args": ["tsx", "/ABSOLUTE/PATH/TO/leetcode/mcp-yandex-voice/src/index.ts"],
      "env": {
        "YANDEX_API_KEY": "ваш_api_ключ",
        "YANDEX_FOLDER_ID": "ваш_folder_id"
      }
    }
  }
}
  1. Перезапустите Cursor или перезагрузите MCP.

Инструмент speak_response

  • Название: Голосовой ответ (speak_response)

  • Вход:

    • message — вопрос пользователя; Yandex GPT генерирует ответ и озвучивает.

    • textToSummarize — текст ответа ассистента; Yandex GPT кратко пересказывает (2–3 предложения) и озвучивает. Используй для озвучивания своих ответов.

    • systemPrompt (опционально) — системный промпт (роль, стиль). При textToSummarize не используется.

  • Выход: текст и аудио (base64). Cursor может отобразить текст и воспроизвести аудио.

Нужен один из message или textToSummarize. Режим textToSummarize — для краткого озвучивания длинных ответов Cursor.

Инструмент playback_control

  • Название: Остановка / пауза воспроизведения (playback_control)

  • Вход: action"stop" или "pause" (остановить текущее воспроизведение).

  • Выход: сообщение об успехе или подсказка.

Работает только на macOS. Останавливает воспроизведение, запущенное через afplay (ответы Yandex Voice в формате WAV). Если воспроизведение идёт через приложение по умолчанию (OGG), остановите его вручную. В чате можно написать: «Останови воспроизведение» или «Вызови playback_control с action stop».

Кнопки управления воспроизведением (пауза/стоп)

Пока MCP-сервер запущен (Cursor с подключённым yandex-voice), на macOS поднимается локальная панель с кнопками:

  • Открой в браузере: http://127.0.0.1:3846

  • Кнопки Стоп и Пауза останавливают текущее воспроизведение ответа Yandex Voice (работает только для afplay/WAV).

Держи вкладку открытой или добавь в закладки — во время озвучки ответа можно нажать «Стоп» прямо из браузера, без запроса в чате.

Локальная проверка

Запуск через stdio (для отладки или MCP Inspector):

export YANDEX_API_KEY=... YANDEX_FOLDER_ID=...
npm run dev
# или после сборки:
npm start

Сервер общается по stdin/stdout; для теста можно использовать MCP Inspector:
npx @modelcontextprotocol/inspector node dist/index.js

Ускорение ответов

Чтобы диктор отвечал быстрее:

  1. YANDEX_TTS_SPEED=1.3 — ускорить речь (1.2–1.5 — комфортно, до 3.0 — максимально быстро).

  2. YANDEX_GPT_MAX_TOKENS=250 — короче ответы GPT → меньше времени на генерацию и синтез.

Чанки TTS обрабатываются параллельно, что ускоряет длинные ответы.

Ограничения

  • SpeechKit TTS: размер одного запроса ограничен (в коде текст разбивается на чанки по 500 символов).

  • Для длинных ответов генерация и синтез могут занять несколько секунд.

Лицензия

MIT.

Available Tools

4 tools
health_checkПроверка подключенияA

Проверяет, что Yandex GPT и SpeechKit TTS подключены и работают. Возвращает статус по каждому сервису.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

TDQS

A4.3/5.0
Behavior4/5

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

The description discloses the tool is a read-only health check returning service status. With no annotations, it carries full burden; it is clear but lacks details on error handling or response format.

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?

Two sentences efficiently convey purpose and output with no superfluous text. Front-loaded with the action and resource.

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?

For a simple health check with no parameters or output schema, the description adequately explains what it does and what it returns, covering all needed context.

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?

No parameters exist; schema coverage is 100%. Baseline for 0 parameters is 4, and description appropriately requires no additional param info.

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 the tool checks connectivity of Yandex GPT and SpeechKit TTS, returning status per service. It clearly distinguishes from sibling audio tools.

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

Usage Guidelines3/5

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

The description implies usage before using related services but does not provide explicit when-to-use or when-not-to-use guidance, nor mentions alternatives.

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

playback_controlОстановка / пауза воспроизведенияA

Остановить или поставить на паузу текущее воспроизведение голоса (ответа Yandex Voice). Работает только на macOS; действует только для воспроизведения через afplay (WAV).

ParametersJSON Schema
NameRequiredDescriptionDefault
actionYesstop — остановить, pause — остановить (возобновление не поддерживается)

TDQS

A4/5.0
Behavior3/5

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

No annotations provided, so description must cover behavior. It mentions constraints but omits edge cases (e.g., no current playback, multiple instances, state after pause). Adequate but not exhaustive.

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?

Two concise sentences: first states purpose, second adds constraints. No filler, front-loaded.

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 simple tool with one parameter and no output schema, description covers key constraints. Lacks handling of error states, but acceptable given tool simplicity.

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

Parameters3/5

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

Schema description coverage is 100%, with enum values explained. Description repeats the action names without adding new meaning, meeting baseline but not exceeding.

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?

Description clearly states the action (stop/pause) and resource (current playback of Yandex Voice response). Sibling tools like play_sound and speak_response are distinct, so no ambiguity.

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?

Explicitly specifies platform (macOS) and audio source (afplay/WAV) constraints, guiding when to use. Lacks explicit contrast with siblings but sufficient for differentiation.

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

play_soundВоспроизвести звукA

Воспроизведение звуков на macOS: системные звуки, TTS или аудиофайл. Работает только на macOS.

ParametersJSON Schema
NameRequiredDescriptionDefault
nameNoДля system: имя звука (Basso, Glass, Hero, Ping и др.)
pathNoДля file: абсолютный путь к аудиофайлу
textNoДля tts: текст для озвучки
typeYesТип: system — системный звук, tts — озвучка текста, file — аудиофайл

TDQS

A3.8/5.0
Behavior3/5

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

Without annotations, the description carries the burden. It adds the critical constraint of macOS-only operation and lists three sound categories. However, it omits details like file format support, volume behavior, or whether the tool blocks or returns immediately.

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 two sentences with no redundancy. It front-loads the purpose and then adds the platform constraint. Every word contributes to understanding.

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 simple tool with 4 parameters, no output schema, and no annotations, the description covers the core functionality and platform. It could mention return behavior (e.g., no output on success) or error handling, but the current level is sufficient for most use cases.

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 coverage is 100%, so parameters are already documented. The description adds value by providing example sound names for the 'system' type (Basso, Glass, Hero, Ping), which goes beyond the schema. This helps the agent decide which parameter values to use.

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's purpose (playing sounds on macOS) and specifies three types: system sounds, TTS, audio file. It distinguishes itself from siblings by emphasizing macOS-only compatibility and the various sound sources.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like speak_response or playback_control. There is no mention of prerequisites, when not to use, or how to choose between sound types.

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

speak_responseГолосовой ответA

Озвучить ответ через Yandex GPT + TTS. Режимы: 1) message — вопрос пользователя, GPT генерирует и озвучивает развёрнутый ответ; 2) textToSummarize — текст ответа ассистента, GPT адаптирует для озвучивания. Контексты: default (краткое), coding_interview (алгоритмы, сложность), architecture (system design, trade-offs).

ParametersJSON Schema
NameRequiredDescriptionDefault
contextNoКонтекст: default — краткое озвучивание; coding_interview — развёрнуто с алгоритмами и Big O; architecture — развёрнуто с trade-offs и компонентами
messageNoВопрос пользователя — Yandex GPT генерирует развёрнутый ответ и озвучивает
systemPromptNoКастомный системный промпт. Переопределяет контекстный промпт
textToSummarizeNoТекст ответа ассистента — Yandex GPT адаптирует под контекст (default: кратко; coding_interview/architecture: развёрнуто) и озвучивает

TDQS

A3.8/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 full burden. It discloses use of Yandex GPT and TTS, and explains the two modes. However, it does not mention the output format (audio stream, file, or direct playback), side effects, required permissions, or behavior when both message and textToSummarize are provided (likely exclusive). The description is basic but not misleading.

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 very concise: three sentences front-loaded with purpose, followed by mode and details. No extraneous words. Every sentence adds value.

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

Completeness2/5

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

Given the tool's complexity (4 parameters, no output schema, no annotations), the description is incomplete. It does not specify the output type (e.g., audio URL, base64, stream), whether the tool is synchronous, or what happens on parameter conflicts. Sibling tools hint at playback, but this tool's integration with them is unclear. The description could be enhanced to cover missing behavioral contracts.

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

Parameters3/5

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

Schema description coverage is 100%, so baseline is 3. The description summarizes the modes and contexts, which aligns with schema comments. It does not add significant new meaning beyond the schema for each parameter. The high-level overview is helpful but not additional semantic depth.

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's purpose: 'Озвучить ответ через Yandex GPT + TTS' (voice response via GPT and TTS). It explains two main usage modes (message and textToSummarize) and three context options. This distinguishes it from sibling tools like health_check, playback_control, and play_sound, which are about audio system status or playback control, not generating speech from text.

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 provides clear guidance on when to use each mode (message for user questions, textToSummarize for assistant text) and context (default for brief, coding_interview/architecture for detailed). However, it does not explicitly state when NOT to use or compare with alternatives. Since siblings are unrelated, the guidance is adequate but not exhaustive.

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. 4 tool updatesv1.0.0
    • First observedhealth_check
    • First observedplay_sound
    • First observedplayback_control
    • First observedspeak_response

TDQS

A4/5.0

Scored across 4 tools

Disambiguation5/5

Each tool has a distinct purpose: health monitoring, playback control, sound playback, and TTS with GPT. No overlapping functionalities.

Naming Consistency4/5

Tool names mostly follow a verb_noun pattern (play_sound, speak_response) with some compound nouns (health_check, playback_control). Consistent snake_case but minor variation in structure.

Tool Count4/5

4 tools is a reasonable scope for a voice interaction server, covering health, playback control, sound playback, and speech response. Slightly thin but not undermanned.

Completeness4/5

Core voice interaction workflows are covered: health check, playback control, sound playback, and TTS with GPT context. Minor gaps like volume control or direct TTS are acceptable for this specific focus.

Maintenance

ActivityInactive
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers