voiceconsole
Voice Console is a local voice-driven MCP server that turns spoken or text commands into guarded local command execution with spoken feedback.
run_cli — run a shell command (
shell=False); whitelisted commands execute directly, blacklisted ones are refused, everything else needs voice confirmation.find_file — fuzzy-search for files by name within a directory.
open_folder — open a folder in the system file manager.
speak — read text aloud via TTS (used to read back results).
confirm — request and wait for a voice safety confirmation; times out to deny after 30s.
Safety notes: unknown commands fail closed, path access is limited to the home directory plus cwd, a local local-ui authority prevents the MCP from self-approving confirmations, and actions are logged to ~/.voiceconsole/audit.jsonl. Intended for trusted local hosts only, not production use.
Allows running whitelisted Git commands such as 'git status' and 'git log' through the run_cli tool, enabling voice-driven inspection of Git repository state.
Click on "Deploy Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@voiceconsole find my budget spreadsheet on the desktop"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Voice Console —— 语音指令控制台 MCP
安全硬化说明(合并入 README 顶部或「安全」章节)
状态:
local-tool· 语音控制将执行本机命令 · 仅在可信 MCP 宿主使用
威胁模型:docs/THREAT_MODEL.md
Sprint1 硬化
项 | 默认 |
|
|
| null → 默认用户主目录 + 当前工作目录;越界拒绝 |
审计 |
|
TTS | 默认 |
迁移:若你依赖 MCP 自批,需在 config.json 显式设 "confirm_authority": "mcp"(不推荐)。
对着电脑说一句「打开桌面」或「执行 dir」,它就执行并播报结果——给 MCP / CLI 加一层本地语音入口。
本地语音控制台:STT 识别 → 意图解析 → 安全门 → 工具执行 → TTS 播报。以 MCP Server 形态提供 5 个工具,可被任意 MCP 客户端调用。
安全边界说明:本工具可执行本机命令(
subprocess.run+shell=False)。安全门包含 40+ 拒绝前缀、shell 元字符拦截、空白规范化。Web UI 绑定127.0.0.1:8765,内置 CSRF/DNS-rebinding 防护。命令分类采用默认拒绝策略(未知命令需确认)。请勿在不受信任的环境中运行。
功能特性
能力 | 说明 |
MCP Server | 标准 stdio 传输,5 个工具( |
本地语音链路 | faster-whisper 本地 STT(无 key 可用)+ edge-tts 播报(自动降级系统 TTS) |
安全门 | 黑/白名单 + 注入字符拦截 + 二阶段语音确认(30s 超时自动拒绝) |
三种入口 | 热键语音循环 / |
零依赖 Web UI | 标准库 |
Related MCP server: computer-use-windows
快速开始
# 安装依赖(mcp / faster-whisper / edge-tts / keyboard / sounddevice ...)
pip install -r requirements.txt
# 方式 1:作为 MCP Server(任意 MCP 客户端 stdio 调用)
python -m voiceconsole
# 方式 2:本地热键语音循环(Windows 需管理员运行)
python main.py
# 方式 3:免麦克风/免管理员:交互文本模式
python main.py --text
# 方式 4:本地 Web 控制台(浏览器打开 http://127.0.0.1:8765)
python -m voiceconsole.webui --port 8765热键:Ctrl+Shift+Space 开始/停止录音 · Ctrl+Shift+Q 退出。
MCP 工具清单
工具 | 输入 | 说明 |
|
| 白名单执行;危险命令抛错,其余需语音确认 |
|
| 按文件名模糊搜索 |
|
| 系统文件管理器打开 |
|
| TTS 播报 |
|
| 发起并等待语音确认,超时默认拒绝 |
项目结构
main.py 热键监听 + 全局循环
voiceconsole/
__init__.py MCP server 入口(register + run)
__main__.py python -m voiceconsole(stdio)
mcp_server.py MCP SDK 工具注册与执行编排
safety.py 安全门:黑白名单 + 确认状态机(线程安全)
actions.py 真实执行体(全项目唯一 subprocess 处)
intent.py 规则意图解析 + 工具映射
stt.py / tts.py STT / TTS 引擎封装(含降级)
webui.py 本地 Web 控制台(零依赖)
tests/ pytest 测试(80 例,含真实 stdio 子进程握手)安全模型
检查顺序:空命令/注入字符(
; && | > < $(等)→ 黑名单 → 白名单 → 其余需确认黑名单默认拒绝:
rm sudo curl wget dd mkfs mv del shutdown bash passwd net user等白名单默认放行:
ls cd cat pwd dir git status git log ping ps top等未知命令默认需确认(fail-closed),不自动放行
执行默认超时 10s 防挂起;密钥一律走环境变量,绝不硬编码
Web UI 绑定
127.0.0.1,Host/Origin 校验防 CSRF/DNS-rebinding
测试
python -m pytest tests/ -v隐私与免责
语音与控制指令仅在本机处理;STT 使用本地模型或你配置的在线 API,TTS 使用本地/在线引擎。
工具可执行本机命令,请自行评估风险;确认门默认开启,危险操作需语音二次确认。
演示请运行
python demo.py(免麦克风,覆盖打开桌面/找文件/危险命令拒绝/退出全链路)。
本项目仅供学习交流与演示用途,不构成任何形式的商业服务或技术承诺。软件按「现状」提供,不作任何明示或暗示的保证,包括但不限于适销性、特定用途适用性与非侵权性。 您理解并同意:使用本项目即表示您自行承担全部风险。如您在使用过程中发现缺陷或问题,欢迎通过 GitHub Issues 反馈,但作者不因使用本软件所直接或间接产生的任何损失(包括但不限于数据丢失、业务中断、第三方索赔)承担责任。 本项目以功能演示与学习交流为主要目的,其架构设计、安全基线、容错机制与性能表现均未按生产级标准进行验证与加固,不适用于实际生产环境或关键业务场景。任何将本项目部署于生产系统、对外提供服务、或将其接入真实业务工作流的做法,均属使用者的自主决策行为;由此产生的任何直接或间接不良后果,包括但不限于服务中断、数据损坏或泄露、业务损失、合规风险、以及因依赖本软件而引发的第三方纠纷,开发者均不承担任何责任。若您确有生产级使用需求,请在充分评估与自行加固(包括但不限于安全审计、压力测试、代码审查)后,自行承担相应风险。
安全声明:本工具通过 subprocess.run(shell=False)执行命令,安全门包含 40+ 拒绝前缀和 shell 元字符拦截。命令分类采用默认拒绝策略(未知命令需确认后执行)。Web UI 绑定 127.0.0.1 并内置 CSRF/DNS-rebinding 防护,但本地其他进程仍可访问。本工具可执行本机任意白名单命令,请在可信环境中使用。
生态
voiceconsole 是标准 MCP server(mcp>=2.0,stdio 传输),可作为 lumen(24/7 Agent Runtime,内置 MCP 注册与 L2 人工确认)的语音入口插件。相关:keyvault(LLM Key 本地加密管理)· 体系地图:https://anyuer678.github.io/yuer.dev/map
License
MIT License — Copyright (c) 2026 anyuer678
Available Tools
5 toolsconfirmA
发起并等待一次语音安全确认,超时默认拒绝。例句:confirm(prompt='确认执行该操作?')
Inputs: prompt (required).
find_fileA
按文件名模糊搜索文件。例句:find_file(pattern='报告', directory='C:/Users/xxx/Desktop')
Inputs: pattern (required), directory.
open_folderA
在系统文件管理器中打开文件夹。例句:open_folder(path='C:/Users/xxx/Desktop')
Inputs: path (required).
run_cliA
执行 shell 命令(白名单内直接执行,危险命令拒绝,其余需语音确认)。例句:run_cli(command='dir')
Inputs: command (required), cwd.
speakA
TTS 播报一段文本(供工具回读结果)。例句:speak(text='已打开文件夹')
Inputs: text (required).
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
TDQS
Scored across 5 tools
Each tool has a clear primary purpose, but run_cli already includes voice confirmation for non-whitelisted commands, which overlaps with the standalone confirm tool. This creates minor ambiguity about when to use confirm explicitly.
All tool names are lowercase with underscores, and most follow a verb_noun pattern (run_cli, find_file, open_folder). The exceptions are the single-word verbs 'speak' and 'confirm', which deviate from the pattern but remain clear and consistent in style.
Five tools is a well-scoped set for a voice-controlled system assistant, covering command execution, file search, folder navigation, speech output, and safety confirmation without bloat.
The tool surface covers the core voice-console workflows, but lacks direct file operations (e.g., open_file, delete_file) and relies on run_cli for such tasks. Also, the standalone confirm tool isn't clearly integrated with run_cli's built-in confirmation, leaving a minor gap in the safety model.
Maintenance
Related MCP Connectors
Remote text-to-speech MCP server with text_to_speech and list_voices tools. Free plan.
Remote desktop MCP: let AI see, click, type and run terminal commands on your own Windows or Mac.
1A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…
AI voice generation: text-to-speech and voice cloning from any MCP client.
Related MCP Servers
- FlicenseNot gradedqualityDmaintenanceAn advanced MCP server that provides stateful voice-controlled AGI capabilities with local STT, TTS, and intent detection. It enables users to execute tools, manage memory, and conduct research through natural multi-turn dialogue with low-latency performance tracking.-
- AlicenseNot gradedqualityDmaintenanceA standalone MCP server for Windows desktop control, enabling screenshots, mouse and keyboard input, app launch, window/display management, and clipboard access via natural language.3MIT
- AlicenseNot gradedqualityCmaintenanceUniversal MCP server that wraps any CLI tool, enabling AI assistants to run commands via natural language.1MIT
- AlicenseAqualityDmaintenanceA secure local MCP server that provides AI assistants controlled filesystem access and command execution with an interactive approval system for dangerous actions.178 npmMIT