livechat-mcp
livechat-mcp
Сервер протокола контекста модели (MCP), который позволяет вести непрерывный голосовой диалог с вашим ИИ-ассистентом для программирования. Вы говорите, ваша речь локально транскрибируется с помощью Whisper, и каждое высказывание передается ассистенту так, как если бы вы напечатали его вручную. Никакого переключения вкладок, копирования/вставки или пакетной записи.
Работает с любым MCP-хостом. Поддержка первого класса для:
Claude Code
Codex CLI
Gemini CLI
Требования
macOS, Linux или Windows (нативно через PowerShell или в WSL2 / Git Bash).
Python 3.10+
Установленный MCP-хост (Claude Code, Codex, Gemini и т. д.)
Исправный микрофон
~500 МБ дискового пространства для кэша модели Whisper + зависимости
uvдля управления проектом (рекомендуется)
Related MCP server: Voice MCP
Быстрая установка (рекомендуется)
Из клона репозитория:
# macOS / Linux / Git Bash on Windows
./install.sh# Native Windows PowerShell
.\install.ps1Скрипт начальной загрузки определяет ОС, при необходимости устанавливает portaudio (brew / apt / dnf / pacman / zypper — в Windows-сборках он уже включен), устанавливает uv, если он отсутствует, запускает uv sync, помещает мастер настройки в ~/.local/bin и запускает интерактивный мастер настройки.
Windows: нативная блокировка использует
msvcrt, а сигнал о перехвате основан на файлах, поэтому зависимостьfcntlне требуется. Интерактивный мастер — это bash-скрипт,install.ps1вызывает его через Git Bash, который он предложит установить черезwinget, если он отсутствует.
Ручная настройка
Если вы предпочитаете устанавливать пошагово, вот что делает install.sh:
1. Установка portaudio
sounddevice требует portaudio.
macOS:
brew install portaudioDebian/Ubuntu:
sudo apt-get install libportaudio2 portaudio19-devFedora/RHEL:
sudo dnf install portaudio portaudio-develArch:
sudo pacman -S portaudio
2. Установка uv, если он отсутствует
curl -LsSf https://astral.sh/uv/install.sh | sh3. Клонирование и установка зависимостей
cd livechat-mcp
uv syncЭто создаст .venv/ и установит mcp, faster-whisper, sounddevice, silero-vad, torch и т. д.
4. Запуск мастера настройки
install -m 0755 bin/livechat-mcp ~/.local/bin/livechat-mcp
livechat-mcp setupМастер выполнит следующее:
Спросит, для каких ассистентов выполнить установку (Claude Code / Codex / Gemini, любая комбинация).
Скопирует слэш-команды
/livechatи/endlivechatдля хостов, поддерживающих пользовательские слэш-команды. Для Codex он устанавливает как устаревшие файлы промптов, так и навыкlivechat, поскольку текущие версии Codex CLI не предоставляют пользовательские промпты как/livechat.Зарегистрирует MCP-сервер в файле конфигурации каждого хоста.
Проведет вас через настраиваемые переменные окружения (порог тишины, модель Whisper и т. д.) — нажмите Enter, чтобы оставить значения по умолчанию.
Убедитесь, что ~/.local/bin находится в вашем PATH (это уже так, если вы использовали официальный установщик uv).
Если вы предпочитаете настроить все вручную, шаги для каждого хоста приведены ниже.
5. Предоставление разрешения на использование микрофона
macOS: при первой попытке сервера захватить аудио macOS запросит у вашего терминального приложения (Terminal, iTerm, Ghostty, Warp и т. д.) доступ к микрофону. Если вы пропустили запрос, включите его вручную:
Системные настройки → Конфиденциальность и безопасность → Микрофон → включите для вашего терминала
Если пропустить этот шаг, захват аудио будет молча возвращать тишину, и ничего не будет транскрибироваться.
Windows: Параметры → Конфиденциальность и защита → Микрофон → разрешить классическим приложениям доступ к микрофону (и убедитесь, что вашему терминалу разрешен доступ).
Linux: обычно запрос не требуется — просто убедитесь, что у вашего пользователя есть правильный доступ к ALSA / PulseAudio / Pipewire (обычно группа
audio).
6. Предварительная загрузка модели Whisper (опционально)
При первом запуске загружается base.en (~150 МБ). Вы можете предварительно загрузить её:
uv run python -c "from faster_whisper import WhisperModel; WhisperModel('base.en', device='cpu', compute_type='int8')"Ручная установка (пропустите, если использовали livechat-mcp setup)
Claude Code
Скопируйте слэш-команды:
mkdir -p ~/.claude/commands
cp commands/livechat.md ~/.claude/commands/
cp commands/endlivechat.md ~/.claude/commands/Зарегистрируйте MCP-сервер:
claude mcp add livechat -- uv --directory "$(pwd)" run livechat-mcpИли отредактируйте ~/.claude.json напрямую:
{
"mcpServers": {
"livechat": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/livechat-mcp", "run", "livechat-mcp"]
}
}
}Codex CLI
Установите навык Codex и устаревшие файлы промптов:
mkdir -p ~/.codex/skills/livechat
cp skills/livechat/SKILL.md ~/.codex/skills/livechat/
mkdir -p ~/.codex/prompts
cp commands/livechat.md ~/.codex/prompts/
cp commands/endlivechat.md ~/.codex/prompts/Зарегистрируйте MCP-сервер в ~/.codex/config.toml:
[mcp_servers.livechat]
command = "uv"
args = ["--directory", "/absolute/path/to/livechat-mcp", "run", "livechat-mcp"]Gemini CLI
Gemini использует TOML для пользовательских команд. Мастер генерирует их для вас; чтобы сделать это вручную, см. commands/gemini/livechat.toml.template (создается после однократного запуска livechat-mcp setup).
Зарегистрируйте MCP-сервер в ~/.gemini/settings.json:
{
"mcpServers": {
"livechat": {
"command": "uv",
"args": ["--directory", "/absolute/path/to/livechat-mcp", "run", "livechat-mcp"]
}
}
}Использование
Откройте CLI вашего ассистента в любом терминале:
claude # or: codex or: geminiЗатем в промпте ассистента:
/livechat # Claude Code, Gemini CLI
use livechat # Codex CLIТребуется перезапуск Codex. Codex загружает навыки и MCP-серверы только при запуске. Если вы запускали мастер, пока Codex был открыт, закройте и перезапустите его перед использованием
use livechat.
Codex 0.128.0 не поддерживает пользовательские слэш-команды /livechat; / в настоящее время зарезервирован для встроенных команд Codex. Установка добавляет обнаруживаемый навык livechat, поэтому вы можете ввести use livechat или открыть /skills и выбрать livechat.
Ассистент вызовет get_voice_input и начнет слушать. Говорите как обычно. Когда вы делаете паузу примерно на 1,5 секунды, ваше высказывание завершается, транскрибируется и отправляется как промпт. Ассистент отвечает, а затем сразу же начинает слушать следующее высказывание.
Пока ассистент генерирует ответ, микрофон остается активным — все, что вы скажете в это время, встанет в очередь и будет передано целиком при следующем вызове get_voice_input.
Завершение сессии
Три способа:
/endlivechat— самый чистый способ, запускается из промпта ассистента. (Вам нужно будет сначала прервать текущий ход, если он находится в процессе ответа.)Кодовая фраза — скажите
terminate voice session now. Транскрипция инициирует завершение работы. Фраза намеренно выбрана неудобной, чтобы избежать совпадений с реальным содержанием обзора. Настраивается черезLIVECHAT_END_PHRASE.Ctrl+C — завершает работу MCP-сервера. Ассистент увидит ошибку инструмента при следующем вызове и остановит цикл.
Конфигурация
Все настраиваемые параметры находятся в livechat_mcp/config.py и могут быть переопределены через переменные окружения:
Переменная | По умолчанию | Примечания |
|
| Только английский: |
|
| Код языка ( |
|
|
|
|
|
|
|
| Тишина после речи для завершения высказывания |
|
| Порог вероятности речи Silero VAD |
|
| Минимальная длина высказывания (фильтрует кашель) |
|
| Принудительное прерывание слишком длинных высказываний |
|
| Время блокировки |
|
| Произнесенная фраза для завершения сессии |
| не задано | Установите |
Самый простой способ задать их — livechat-mcp set KEY VALUE — это отредактирует блок env в каждой конфигурации хоста, которую он найдет (Claude / Codex / Gemini).
livechat-mcp show # print current env block(s)
livechat-mcp set LIVECHAT_SILENCE_SEC 1.5
livechat-mcp unset LIVECHAT_DEBUGПерезапустите CLI ассистента после любых изменений — переменные окружения MCP считываются сервером при запуске.
Чтобы сделать это вручную, отредактируйте поле env записи livechat MCP в конфигурации каждого хоста. Пример для Claude Code:
{
"mcpServers": {
"livechat": {
"command": "uv",
"args": ["--directory", "/abs/path", "run", "livechat-mcp"],
"env": {
"LIVECHAT_WHISPER_MODEL": "small.en",
"LIVECHAT_DEBUG": "1"
}
}
}
}Устранение неполадок
Ничего не происходит, когда я говорю.
Проверьте (по порядку): разрешение микрофона для вашего терминального приложения, уровень входного сигнала микрофона (Системные настройки → Звук), установите LIVECHAT_DEBUG=1 и следите за stderr на наличие событий VAD, уменьшите LIVECHAT_VAD_THRESHOLD до 0.3.
Транскрипции неточные.
Обновите модель: LIVECHAT_WHISPER_MODEL=small.en или medium.en. medium.en заметно медленнее на CPU (все еще почти в реальном времени), но гораздо лучше справляется с технической лексикой.
Высказывание заканчивается слишком быстро / слишком медленно.
Настройте LIVECHAT_SILENCE_SEC (или выполните livechat-mcp set LIVECHAT_SILENCE_SEC 1.5). Диапазон 1.0–4.5 является полезным — меньшее значение ощущается более отзывчивым, но рискует прервать паузы в середине мысли.
uv не найден.
Либо установите uv (рекомендуется), либо измените command в конфигурации MCP на прямой вызов python -m livechat_mcp.server из активированного venv.
Сервер запускается, но ассистент никогда не вызывает инструмент.
Убедитесь, что /livechat был вызван. Без слэш-команды у ассистента нет инструкции для входа в цикл.
Логи сервера попадают в UI ассистента как мусор / нарушают протокол.
Этого не должно происходить — все логи сервера идут в stderr. Если вы это видите, создайте баг-репорт. Убедитесь, что вы не добавили никаких операторов print(...) без file=sys.stderr.
Ошибки portaudio при запуске.
Установите его: brew install portaudio. Если он установлен и все еще не работает, попробуйте brew reinstall portaudio и переустановите sounddevice: uv sync --reinstall.
Как это работает (кратко)
[mic] → [Silero VAD] → [Whisper] → [queue] ← [get_voice_input tool] ← [Assistant]
↑________background thread, always running________↑Аудиоконвейер отделен от инструмента MCP, поэтому микрофон всегда активен, пока сервер запущен. Высказывания, произнесенные во время генерации ответа ассистентом, ставятся в очередь и передаются при следующем вызове инструмента.
Лицензия
MIT.
Available Tools
4 toolsend_voice_sessionA
Cleanly end the current voice session. After calling this, any further get_voice_input calls will return 'END_SESSION'. Use this when the user invokes /endlivechat or otherwise asks to stop voice mode.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description carries the behavioral burden. It discloses the key side effect: subsequent get_voice_input calls return '__END_SESSION__'. It doesn't mention idempotency or error conditions, but for a zero-parameter tool this is sufficient disclosure.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, front-loaded with the main action, then the effect and trigger. No wasted words, perfectly concise.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter, no-output-schema tool, the description covers purpose, usage, and behavioral consequence. An agent has everything needed to decide when to call and what to expect.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
There are zero parameters, so the baseline is 4. The description correctly adds no parameter info, and none is needed.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states the tool's purpose: 'Cleanly end the current voice session.' It uses a specific verb (end) and resource (voice session), and the mention of the sentinel return on get_voice_input distinguishes it from siblings like take_over_voice_session or reset_voice_session.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
It provides explicit usage guidance: 'Use this when the user invokes /endlivechat or otherwise asks to stop voice mode.' This clearly tells the agent when to invoke this tool versus the alternatives.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
get_voice_inputA
Returns the next voice utterance from the user as text. Used in a loop during voice review sessions. If multiple utterances are queued, they are joined with ' / '. Returns the literal string 'END_SESSION' when the user has ended the session (Ctrl+C, /endlivechat, or wake phrase) — stop calling this tool when you see that. Returns 'NO_INPUT' if the long-poll timed out with no speech; in that case, call this tool again. Returns 'ALREADY_RUNNING:' if another livechat MCP process (e.g. another Claude Code window) currently holds the session lock — ask the user to confirm a takeover, then call take_over_voice_session if they agree.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations, the description fully carries the behavioral disclosure burden. It reveals long-poll timeout behavior, queue joining with ' / ', sentinel values, the session lock with PID, and the exact follow-up action for each sentinel. This is exceptionally transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is longer than most, but every sentence earns its place: purpose, loop context, queue joining, and each sentinel case. It is well-structured, front-loaded with the core purpose, and groups related behavioral details logically.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
There is no output schema, but the description documents every possible return value and the appropriate agent reaction, including edge cases like concurrent process lock and takeover. It also names the relevant sibling tool. No meaningful gaps remain for an agent to call it correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters)Skip, so the schema is trivially complete (100% coverage). The description adds no parameter details, but none are needed; the baseline for a zero-parameter tool is 4.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Returns the next voice utterance from the user as text.' It clearly frames the tool as a polling operation used in a loop during voice review sessionsasha. The sentinel behaviors and the mention of take_over_voice_session distinguish it from siblings.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly explains when to call the tool (in a loop during voice review) and how to react to each possible return value: retry on __NO_INPUT__, stop on __END_SESSION__, and ask the user then call take_over_voice_session on __ALREADY_RUNNING__. This is clear, actionable usage guidance with no ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
reset_voice_sessionA
Clear stale shutdown state from a previous /endlivechat in this same MCP server process so a new voice session can start cleanly. Call this once at the very beginning of a /livechat session, after the announcement and before the first get_voice_input. Safe to call mid-session: if a session is already running healthily this is a no-op and no in-flight utterances are dropped.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are present, so the description carries the full burden. It discloses that it clears stale state, is a no-op on a healthy session, and explicitly guarantees 'no in-flight utterances are dropped'. These behavioral details are specific and transparent.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Three sentences, each earning its place: purpose and state, exact placement in the session flow, and safety guarantee. No redundancy, front-loaded with the primary action.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter utility tool with no output schema, the description covers purpose, timing, safety, and idempotency. It provides all necessary context for an agent to decide when and how to call it, and it clearly differentiates from sibling tools.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has zero parameters, so the schema is empty and description coverage is trivially 100%. The baseline for zero-parameter tools is 4; the description appropriately says nothing about parameters since none exist.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb ('Clear'), a resource ('stale shutdown state'), and the purpose ('so a new voice session can start cleanly'). It clearly differentiates from siblings by placing the call before get_voice_input, making its role obvious.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Explicitly instructs when to call: 'at the very beginning of a /livechat session, after the announcement and before the first get_voice_input'. It also notes it is safe mid-session and is a no-op if the session is healthy, giving clear usage conditions without ambiguity.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
take_over_voice_sessionA
Forcibly take the cross-process session lock from another livechat MCP instance. Signals the holder to release, waits briefly, and starts a new session here. Only call this after the user explicitly confirms taking over from the other window. Returns 'OK' on success or an error string on failure.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations present, the description carries the full behavioral disclosure burden. It fully discloses the mechanism: the tool signals the current holder to release, waits briefly, starts a new session, and returns 'OK' or an error string. This gives the agent enough detail to anticipate side effects and outcomes.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three tight sentences with no filler. The first sentence names the action and target, the second explains the process, and the third adds the safety condition and expected return value. Every sentence earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
For a zero-parameter tool with no output schema, the description is complete: it explains what happens, when to call it, and what the response will be. Nothing essential is missing for an agent to invoke this tool correctly.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The input schema has zero parameters, so the baseline is 4. The description correctly adds no parameter details because none exist, and it still clarifies the operational scope and return behavior.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description uses a specific verb ('take') and resource ('cross-process session lock from another livechat MCP instance'), making the action unmistakable. It also differentiates this tool from siblings like get_voice_input or end_voice_session by focusing on the takeover of a lock rather than reading or ending a session.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explicitly states when the tool is appropriate: 'Only call this after the user explicitly confirms taking over from the other window.' This is a clear, actionable condition that prevents premature or accidental invocation, and it implies the alternative context (continue using the current instance) without needing to name a sibling.
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.
4 tool updates
v0.1.0- First observed
end_voice_session - First observed
get_voice_input - First observed
reset_voice_session - First observed
take_over_voice_session
TDQS
Scored across 4 tools
Each tool has a clearly distinct purpose: retrieving input, ending the session, taking over a lock, and resetting state. No overlap or ambiguity between them.
All tool names follow a consistent verb_noun snake_case pattern (e.g., get_voice_input, end_voice_session). The pattern is uniform and predictable.
Four tools is well-scoped for a voice session lifecycle. Each tool serves a necessary function with no redundancy, fitting the server's narrow purpose.
The tool surface covers the full voice session lifecycle: starting clean, retrieving input, ending, and handling cross-process takeover. No obvious dead ends or missing operations for the intended use case.
Maintenance
Related MCP Connectors
Speech, transcription, voice agents, Trace, Recap, dubbing and narration with browser OAuth.
Command your AI agents by voice: PTT rooms, channels, direct messages, agent email, memory (mRAG).
- mcpOAuthcom.attendmeet
Bring meeting decisions, tasks and user stories into your AI editor (Claude, Cursor, Copilot).
Transcribe audio & video to text for AI agents: 100+ languages, speaker labels, webhooks.
Related MCP Servers
- FlicenseNot gradedqualityAmaintenanceEnables coding agents to speak aloud using text-to-speech functionality. Works with agents running inside devcontainers and provides configurable voice settings for creating chatty AI companions.6-
- FlicenseNot gradedqualityDmaintenanceEnables voice interaction with Claude Code through local speech-to-text (Whisper) and text-to-speech (Supertonic), allowing verbal input/output without external API calls.1-
- FlicenseNot gradedqualityCmaintenanceEnables natural voice interaction with Claude Code through speech-to-text, supporting wake word activation and multiple backends like Whisper and Google. It allows users to execute commands and control their coding environment hands-free via their microphone.2-
- AlicenseNot gradedqualityDmaintenanceEnables bidirectional voice interaction for Claude Code using local speech-to-text and text-to-speech models optimized for Apple Silicon. It provides tools to listen to user speech via microphone and speak responses aloud through system speakers.16Apache 2.0