MCP ExplorerExplorer

Basic Mcp

@livekit-exampleson a year ago
29 MIT
FreeCommunity
AI Systems
# A Voice Assistant for AI Interaction Using LiveKit and MCP Tools

Overview

What is Basic Mcp

basic-mcp is a voice assistant application built using the LiveKit Agents framework, designed to utilize Multimodal Control Protocol (MCP) tools for interaction with external services.

Use cases

Use cases for basic-mcp include creating interactive voice assistants for customer support, developing educational applications that respond to voice commands, and implementing automated systems for voice-driven tasks in smart homes or businesses.

How to use

To use basic-mcp, clone the repository, install the required packages, set up a .env file with your API keys and MCP server URL, and run the agent using the LiveKit CLI with the command ‘python agent.py console’.

Key features

Key features include voice-based interaction with an AI assistant, integration with MCP tools, speech-to-text capabilities using Deepgram, natural language processing with OpenAI’s GPT-4o, text-to-speech functionality, and voice activity detection using Silero.

Where to use

basic-mcp can be used in various fields such as customer service, virtual assistants, educational tools, and any application that benefits from voice interaction and automation.

Content

LiveKit Agent with MCP Tools

A voice assistant application built using the LiveKit Agents framework, capable of using Multimodal Control Protocol (MCP) tools to interact with external services.

Features

  • 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

Prerequisites

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

Installation

  1. Clone this repository:

    git clone https://github.com/livekit-examples/basic-mcp.git
    cd basic-mcp
    
  2. Install the required packages:

    pip install -r requirements.txt
    
  3. 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
    

Usage

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.

Project Structure

  • agent.py: Main agent implementation and entrypoint
  • mcp_client/: Package for MCP server integration
    • server.py: MCP server connection handlers
    • agent_tools.py: Integration of MCP tools with LiveKit agents
    • util.py: Utility functions for MCP client

Acknowledgements

  • LiveKit for the underlying real-time communication infrastructure
  • OpenAI for GPT-4o and text-to-speech
  • Deepgram for speech-to-text
  • Silero for Voice Activity Detection

Tools

No tools

Comments

Recommend MCP Servers

View All MCP Servers