AI Voice Assistant MCP Server
Provides a web search tool via DuckDuckGo (no API key required) for searching the web and summarising top results.
Uses Google Gemini API (gemini-2.0-flash) as the AI brain for a voice-enabled assistant, providing context-aware multi-turn conversation and MCP tool calling.
Click on "Install 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., "@AI Voice Assistant MCP ServerWhat's the weather in Tokyo and calculate 25 * 4?"
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.
AI Voice Assistant with MCP Tool Calling
A fully free, end-to-end voice-enabled AI assistant built with Python.
Component | Technology |
π§ AI Brain | Google Gemini API ( |
ποΈ Speech-to-Text | Google Web Speech API via |
π Text-to-Speech |
|
π οΈ Tool Calling | Model Context Protocol (MCP) β free |
π Web Search | DuckDuckGo β free, no key needed |
π€οΈ Weather | wttr.in REST API β free, no key needed |
Features
ποΈ Voice Input β speak naturally; the assistant understands you
π Voice Output β responses are read aloud via offline TTS
π€ Gemini AI β context-aware, multi-turn conversation
π οΈ 7 MCP Tools available to the AI:
Calculator β safe math expression evaluator
Web Search β DuckDuckGo (no API key)
Weather β real-time via wttr.in (no API key)
Date/Time β current date and time
Read File β read any local file
Write File β write/append to a local file
List Directory β browse local folders
π¬ Multi-turn memory β remembers conversation context
β¨οΈ Text mode β works without a microphone (
--textflag)
Related MCP server: TOOL4LM
Prerequisites
Python 3.11+
A free Gemini API key β get one at https://aistudio.google.com/app/apikey
Internet connection (for speech recognition, Gemini API, and web tools)
Microphone (optional β text mode works without one)
Installation
1. Clone / download the project
# If using git:
git clone <your-repo-url>
cd "AI voice assistant"
# Or just open the folder in your terminal
cd "C:\Users\sasid\Downloads\AI voice assistant"2. Create and activate a virtual environment (recommended)
python -m venv .venv
# Windows:
.venv\Scripts\activate
# macOS / Linux:
source .venv/bin/activate3. Install PyAudio (Windows β required for microphone)
PyAudio on Windows needs a pre-built binary. The easiest way:
pip install pipwin
pipwin install pyaudioOr download the correct .whl from https://www.lfd.uci.edu/~gohlke/pythonlibs/#pyaudio
and install with:
pip install PyAudioβ0.2.14βcpXXβcpXXβwin_amd64.whl4. Install remaining dependencies
pip install -r requirements.txt5. Set your Gemini API key
Option A β .env file (recommended):
copy .env.example .env
# Then open .env and replace "your_gemini_api_key_here" with your actual keyOption B β edit config.py directly:
Open config.py and change:
GEMINI_API_KEY: str = os.getenv("GEMINI_API_KEY", "YOUR_GEMINI_API_KEY_HERE")to:
GEMINI_API_KEY: str = "your_actual_api_key"Running
Voice mode (default β microphone + TTS)
python main.pyText-only mode (no microphone needed)
python main.py --textList available TTS voices
python main.py --list-voicesExample Interactions
You say | What happens |
"What's the weather in Tokyo?" | Calls |
"Calculate 2 to the power of 32" | Calls |
"Search for the latest Python news" | Calls |
"What day is today?" | Calls |
"Read the file notes.txt" | Calls |
"Write 'Hello World' to test.txt" | Calls |
"Reset conversation" | Clears chat history |
"Goodbye" / "Exit" | Exits the assistant |
Project Structure
AI voice assistant/
βββ main.py # Entry point β CLI, banner, main loop
βββ assistant.py # Gemini + MCP integration (agentic tool-call loop)
βββ speech.py # SpeechRecognition (STT) + pyttsx3 (TTS)
βββ mcp_server.py # MCP tool server with 7 built-in tools
βββ config.py # All settings and API key placeholder
βββ requirements.txt # Python dependencies
βββ .env.example # API key template
βββ README.md # This fileCustomisation
Change the AI's personality
Edit SYSTEM_PROMPT in config.py.
Adjust microphone sensitivity
Edit MIC_ENERGY_THRESHOLD in config.py (lower = more sensitive).
Change TTS voice or speed
Edit TTS_RATE and TTS_VOICE_PREFERENCE in config.py.
Run python main.py --list-voices to see available voice names.
Add more MCP tools
Open mcp_server.py, add a new function, then register it in list_tools() and call_tool().
Gemini Free Tier Limits
Limit | Value |
Requests per minute | 15 |
Tokens per day | 1,000,000 |
Cost | $0 |
Get your key at: https://aistudio.google.com/app/apikey
Troubleshooting
"No module named 'pyaudio'" β See PyAudio installation step above.
"Could not understand audio"
β Speak clearly; adjust MIC_ENERGY_THRESHOLD lower in config.py.
"Speech recognition service error" β Check your internet connection (Google Web Speech API requires internet).
Gemini 429 / rate limit error β You've hit the free tier limit. Wait a minute and try again.
Assistant doesn't speak / TTS silent
β Check system audio / volume. Try python main.py --list-voices to verify pyttsx3 works.
License
MIT β free to use, modify, and distribute.
This server cannot be installed
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- Alicense-qualityDmaintenanceConnects local LLMs to external tools (calculator, knowledge base) via MCP protocol, enabling automatic tool detection and execution to enhance query responses.Last updatedMIT
- FlicenseCqualityCmaintenanceA multi-tool MCP server that enhances local LLMs with web search, document reading, scholarly research, Wikipedia access, and calculator functions. Provides comprehensive tools for information retrieval and computation without requiring API keys by default.Last updated221
- Flicense-qualityDmaintenanceAn MCP server exposing calculator, file read, and file write tools for the Gemini CLI agent, enabling mathematical computations and file operations through natural language.Last updated
- Flicense-qualityDmaintenanceEnables AI agents and users to manage workspace files, monitor system metrics, take persistent notes, and retrieve weather data via MCP tools and resources.Last updated
Related MCP Connectors
OCR, transcription, file extraction, and image generation for AI agents via MCP.
A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yoβ¦
AI Reasoning Cache & Consensus Layer with 11 MCP tools via Streamable HTTP.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/Sasidhar1826/AI-voice-assistant-with-MCP-tool-calling'
If you have feedback or need assistance with the MCP directory API, please join our Discord server