Token导航 LogoToken导航

MCP Server · AI代理

LiveKit MCP client

一个基于LiveKit Agents构建的自然语音助手,无缝集成任何模型上下文协议(MCP)服务器,支持LLM生成的对话响应、智能进度通知和长时间运行操作。

stdio官方级别未说明来源级核验工具 0
实时通信Python自然语言处理

快速开始

作者 / 组织
inmydata
提供方
inmydata

工具数量

0

来源目录标注

资源数量

0

来源目录标注

提示词数量

0

来源目录标注

GitHub Star

0

仓库热度

收录来源

1 个

MCP World

选型结论

LiveKit MCP client 属于AI代理类 MCP Server,公开资料标注 0 个工具,通过stdio 本地进程接入,客户端适配情况以官方文档为准,有可以直接复制的安装命令;接入前先确认权限范围。

分类

AI代理

传输方式

stdio

认证方式

无需认证

部署方式

公开资料未说明

安装与配置

安装命令

pip install -r requirements.txt

公开命令不是通用的启动方式,拼不出可靠配置示例;请在客户端 MCP 配置里按官方文档填写 command 和 args。

上手步骤

  1. 1

    准备运行环境

    stdio 服务在本地起进程,需要先装好 对应的运行时,再按安装命令拉取依赖。

  2. 2

    安装服务

    复制下面的安装命令执行;命令里带占位符的位置换成自己的密钥或路径。

  3. 3

    写入客户端配置

    在客户端的 MCP 配置里填启动命令和参数,保存后完全退出客户端再打开,让新配置生效。

  4. 4

    验证是否可用

    连接成功后客户端会列出 0 个工具,随便调一个只读工具确认能返回结果。

接入前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

详细介绍

LiveKit Voice Agent with MCP Integration

A natural-sounding voice assistant built with LiveKit Agents that seamlessly integrates with any Model Context Protocol (MCP) server. Features LLM-generated conversational responses, intelligent progress announcements, and support for long-running operations.

Key Features

  • Universal MCP Support: Works with any MCP server (SSE, HTTP, stdio transports)
  • Natural Conversation: LLM-generated tool announcements that sound human
  • Smart Progress Updates: Queued, non-repetitive progress announcements
  • Long Operation Support: Handles operations up to 5 minutes with streaming progress
  • Automatic Result Unwrapping: Clean JSON data extracted from MCP responses
  • Voice-First Design: Optimized for spoken interaction

How It Works

Natural Language Tool Announcements

Instead of robotic phrases like "Let me fetch that data", the agent uses GPT-4o-mini to generate contextual, conversational responses:

User: "Which store had the best sales last year?"
Agent: "I'll look up last year's sales for you"    ← Natural, contextual
Agent: "Just pulling up the rankings"              ← Different each time
Agent: "Let me find which store performed best"    ← Relevant to question

Intelligent Progress Management

Long-running operations provide streaming progress updates that:

  • Are spoken naturally ("I'm analyzing the data now")
  • Never repeat the same phrase twice
  • Stop immediately when the operation completes
  • Don't speak stale updates after the answer is ready

Architecture

User Voice Input
    ↓
Deepgram STT
    ↓
GPT-4o LLM (decides to use tools)
    ↓
Tool Announcement (GPT-4o-mini generates natural phrase)
    ↓
MCP Server (via wrapper)
    ↓ (progress updates)
Progress Queue → Natural Rephrasing → Speech
    ↓ (on completion, clear queue)
Clean Result → GPT-4o → OpenAI TTS
    ↓
User Hears Answer

Installation

Prerequisites

  • Python 3.10+
  • API keys for OpenAI and Deepgram
  • An MCP server endpoint

Setup

  1. Clone this repository:
   git clone 
   cd LiveKit_mcp_client
  1. Install dependencies:
   pip install -r requirements.txt
  1. Create a .env file:
   # API Keys
   OPENAI_API_KEY=your_openai_api_key
   DEEPGRAM_API_KEY=your_deepgram_api_key

   # LiveKit Configuration
   LIVEKIT_URL=wss://your-livekit-server.livekit.cloud
   LIVEKIT_API_KEY=your_livekit_api_key
   LIVEKIT_API_SECRET=your_livekit_api_secret

   # MCP Server
   MCP_SERVER_URL=https://your-mcp-server.com/mcp

Usage

Running the Agent

Development mode (with file watching):

python agent.py dev

Production mode:

python agent.py start

Configuration

The agent supports three MCP transport types:

HTTP (Streamable):

MCPServerConfig(
    transport="streamable_http",
    url="https://mcp.example.com/mcp",
    client_session_timeout=300.0  # 5 minutes for slow operations
)

SSE (Server-Sent Events):

MCPServerConfig(
    transport="sse",
    url="https://mcp.example.com/sse",
    sse_read_timeout=300.0
)

Stdio (Local Process):

MCPServerConfig(
    transport="stdio",
    command="uvx",
    args=["mcp-server-sqlite", "--db-path", "/path/to/db.sqlite"]
)

Project Structure

LiveKit_mcp_client/
├── agent.py                    # Main agent with natural response generation
├── mcp_client/
│   ├── __init__.py            # Public API exports
│   ├── server.py              # MCP server configuration and factory
│   └── wrapper.py             # Result unwrapping and progress handling
├── requirements.txt
├── .env.example
└── README.md

Technical Details

MCP Server Wrapper

Wraps LiveKit's MCPServer to:

  1. Unwrap Results: Extracts clean JSON from {"type":"text","text":"data"} format
  2. Progress Callbacks: Intercepts MCP progress updates and queues them
  3. Completion Signals: Notifies when tools finish to clear queues

Natural Response Generation

Uses GPT-4o-mini to generate conversational phrases:

  • Tool Announcements: Based on user query and tool name
  • Progress Updates: Rephrases technical messages naturally
  • Deduplication: Tracks previously used phrases to avoid repetition
  • Cost: ~$0.000021 per announcement (negligible)
  • Latency: ~200ms (barely noticeable)

Progress Queue System

Asynchronous queue that:

  • Stores progress messages per tool
  • Speaks them one at a time with natural pacing
  • Stops immediately when tool completes
  • Clears unspoken messages to prevent stale announcements

Configuration Options

Agent Settings:

FunctionAgent(
    llm=openai.LLM(model="gpt-4o"),         # Main conversation LLM
    max_tool_steps=10,                       # Max tool calls per turn
    client_session_timeout=300.0             # 5 min timeout for tools
)

Natural Response Settings:

generate_natural_response(
    model="gpt-4o-mini",                     # Fast, cheap rephrasing
    temperature=0.7,                         # Natural variety
    max_tokens=30                            # Brief (5-10 words)
)

Progress Settings:

DEDUP_WINDOW_SECONDS = 3.0                  # Don't repeat within 3s

Customization

Adjusting Tool Announcements

Edit the prompt in generate_natural_response() to change the tone:

prompt = f"""You are a [friendly/professional/energetic] voice assistant.
The user just asked: "{user_query}"
You're about to call a tool named "{tool_name}".

Generate a brief, [casual/formal] phrase..."""

Changing Progress Pacing

Adjust the delay between progress messages:

await asyncio.sleep(0.1)  # Default: 100ms between messages

Using Different LLMs

The agent supports any OpenAI-compatible LLM:

llm=openai.LLM(model="gpt-4o-mini")  # Faster, cheaper
# or
llm=openai.LLM(model="gpt-4")        # More capable

Troubleshooting

"Tool execution timed out"

Increase client_session_timeout:

MCPServerConfig(client_session_timeout=600.0)  # 10 minutes

"Maximum tool steps reached"

Increase max_tool_steps:

AgentSession(max_tool_steps=20)

Repetitive announcements

The agent now tracks phrases automatically, but you can adjust deduplication:

DEDUP_WINDOW_SECONDS = 5.0  # Longer window

Progress updates continue after answer

This should not happen with the queue system. Check logs for:

Tool X completed, setting stop flag
Cleared N unspoken progress messages

Performance

  • Tool Announcement Latency: ~200ms (GPT-4o-mini generation)
  • Progress Update Latency: ~200ms per message
  • Cost per Announcement: ~$0.000021
  • Cost per 1000 conversations: ~$0.05 (assuming 2-3 announcements each)

Dependencies

  • livekit-agents - Voice agent framework
  • livekit-plugins-openai - OpenAI LLM and TTS
  • livekit-plugins-deepgram - Speech-to-text
  • livekit-plugins-silero - Voice activity detection
  • openai - For natural response generation
  • mcp - Model Context Protocol client
  • python-dotenv - Environment variable management

Acknowledgements

License

MIT License - see LICENSE file for details

工具与能力

工具数量

0

资源数量

0

提示词数量

0

能力标签

语音助手Python本地部署自然语言处理MCP集成实时通信AI对话

数量来自来源目录的标注,具体工具清单以官方文档为准。

典型使用场景

多步任务编排

把拆解、检索、执行串成一条链,模型按步骤调用工具。

长期上下文

把会话、笔记和知识放到外部存储,换个会话还能接着做。

接自有流程

把内部系统和模型连起来,让助手调用已有的工作流。

选择建议

值得选的地方

  • 只提供 0 个工具,职责集中,接入后不容易误操作。
  • 有现成的安装命令,不用自己找入口,照着跑就能起服务。
  • 公开说明写得比较完整,接入前能看清能力边界。

先想清楚的地方

  • stdio 方式要求本地装好 运行环境,换机器要重新装一遍。
  • 第三方目录整理,版本更新和行为细节以官方仓库为准。

更适合

  • 需要在AI代理场景里让模型直接调用外部能力的人。
  • 想先快速试一下、能接受在本地跑服务的人。

不太适合

  • 完全不想在本地装环境的人。
  • 需要厂商级 SLA 和技术支持的生产环境。

同类对比

5 个同类
MCP Server工具数传输方式安装命令收录来源最后核验
LiveKit MCP client

MCP World · 本页

0stdio有1 个2026-05-17
Everything Claude Code

MCP World

0stdio有1 个2026-05-17
Filesystem 560c4363

MCP World

13未说明未标注2 个2026-05-17
Time 7365cb6d

MCP.so

2SSE有2 个2026-05-17
Server Everything (everything)

MCP World

11stdio有1 个2026-05-17

按同分类和工具数量挑出最接近的几条,字段以各自详情页为准。

常见问题

5 条

LiveKit MCP client 怎么安装?

公开资料给出的安装命令是 pip install -r requirements.txt,运行环境为 未标注。装完后按客户端要求写进 MCP 配置,重启客户端生效。

LiveKit MCP client 怎么在 Claude Desktop、Cursor 里配置?

它是stdio 本地进程,客户端配置里要写启动命令和参数,运行环境是 未标注;保存后完全退出客户端再打开,配置才会生效。

LiveKit MCP client 收费吗?

本站只整理公开资料,不代收费用,也没有标注具体价格。是否收费取决于服务本身和背后的接口额度,正式使用前按官方说明确认。

LiveKit MCP client 需要 API Key 吗?

公开资料标注为无需认证,装好就能连;如果实际调用时报鉴权错误,按官方文档补上凭据。

LiveKit MCP client 支持哪些客户端?

公开资料没有标注具体客户端;能配置本地 MCP 命令的客户端都能接,配置方式参照官方文档。

来源信息

继续浏览同类 MCP