A voice assistant application built using the LiveKit Agents framework, capable of using Multimodal Control Protocol (MCP) tools to interact with external services.
- Voice-based interaction with a helpful AI assistant
- Integration with MCP tools from external servers
- Speech-to-text using Deepgram
- Natural language processing using OpenAI's GPT-4o
- Text-to-speech using OpenAI
- Voice activity detection using Silero
- Python 3.9+
- API keys for OpenAI and Deepgram
- MCP server endpoint
-
Clone this repository:
git clone https://github.com/livekit-examples/basic-mcp.git cd basic-mcp
-
Install the required packages:
pip install -r requirements.txt
-
Create a
.env
file with your API keys and configuration:OPENAI_API_KEY=your_openai_api_key DEEPGRAM_API_KEY=your_deepgram_api_key ZAPIER_MCP_URL=your_mcp_server_url
Run the agent with the LiveKit CLI:
python agent.py console
The agent will connect to the specified LiveKit room and start listening for voice commands.
agent.py
: Main agent implementation and entrypointmcp_client/
: Package for MCP server integrationserver.py
: MCP server connection handlersagent_tools.py
: Integration of MCP tools with LiveKit agentsutil.py
: Utility functions for MCP client