A voice assistant application built with the LiveKit Agents framework, capable of using Model Context Protocol (MCP) tools to interact with external services
A conversational AI agent and voice assistant application built with the LiveKit Agents framework, capable of using Model Context Protocol (MCP) tools to interact with external services for SRE and Kubernetes operations.
⚠️ WARNING: Use Caution with Real Kubernetes Clusters
This agent can create, modify, and delete resources in your Kubernetes cluster. Always review your configuration and tool restrictions before connecting to a production or sensitive environment. Test in a safe environment first.
make venv
source venv/bin/activate
make uv # (optional, for fast installs)
make install
export OPENAI_API_KEY=your_openai_api_key
export ELEVEN_API_KEY=your_elevenlabs_api_key
mcp_servers.yaml
(see below for details).make test
make run
To run a sample MCP server that only allows non-destructive tools, use the following command:
ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true ENABLE_UNSAFE_SSE_TRANSPORT=1 PORT=8092 npx mcp-server-kubernetes
ALLOW_ONLY_NON_DESTRUCTIVE_TOOLS=true
restricts the server to non-destructive tools only.ENABLE_UNSAFE_SSE_TRANSPORT=1
enables SSE transport for local testing.PORT=8092
sets the server port.You can then point your agent's mcp_servers.yaml
to http://localhost:8092/sse
.
Supergateway allows you to expose stdio-based MCP servers over SSE or WebSockets. This is useful for tools like kubectl-ai that only support stdio interfaces e.g. for kubectl-ai MCP agent (https://github.com/GoogleCloudPlatform/kubectl-ai)
To run kubectl-ai as an MCP server via Supergateway:
npx -y supergateway --stdio "kubectl-ai --llm-provider=openai --model=gpt-4.1 --mcp-server" --messagePath / --port 8008
Then add this to your mcp_servers.yaml
:
servers:
- name: kubectl-ai-mcp
url: http://localhost:8008/sse
Supergateway creates an HTTP server that:
http://localhost:8008/sse
Try these example prompts with your agent:
Show all resources in a namespace:
show me all resources in default namespace
List all pods:
list pods in dev namespace
Describe a pod:
describe pod my-app-123 in default namespace
Get recent events:
get events from the prod namespace
Scale a deployment:
scale deployment my-app to 3 replicas in dev
Get logs from a job:
get logs from job backup-job in default namespace
List all deployments:
list deployments in prod
Python 3.9+
API keys for OpenAI and ElevenLabs
At least one MCP server endpoint
npx (Node.js) is required to run the sample MCP server. If you don't have npx, install Node.js from nodejs.org.
OS-specific tips:
brew install node
sudo apt install nodejs npm
for Ubuntu/Debian) or download from nodejs.org.Edit mcp_servers.yaml
in the project root. Example:
servers:
# Example: Allow only non-destructive list and describe tools from a local Kubernetes MCP server
- name: k8s-mcp-server
url: http://localhost:8092/sse
allowed_tools:
- list_* # allow all list tools
- describe_* # allow all describe tools
- get_* # allow all get tools
The agent connects to the specified LiveKit room and loads all MCP servers/tools from your config.
The agent supports HMAC authentication for MCP servers that require it. To configure authentication:
auth
section to your server configuration in mcp_servers.yaml
:servers:
- name: secure-mcp-server
url: https://example.com/sse
allowed_tools: [*_*]
auth:
type: secret_key
env_var: MY_SECRET_KEY
env_var
:export MY_SECRET_KEY=your_secret_key_here
The authentication system:
auth
parameter in the requestFor MCP servers that use different authentication methods, you can modify the auth.py
file or extend the authentication middleware.
The agent supports connecting to A2A (Agent-to-Agent) servers, allowing you to use skills from other AI agents as tools. This is useful for integrating with external AI services or custom agents that expose their own skills.
To add an A2A agent, use the type: a2a
field in your mcp_servers.yaml
:
servers:
- name: my-a2a-agent
type: a2a
url: https://my-a2a-agent.example.com
allowed_tools: [*] # (optional) restrict which skills are available
headers:
Authorization: Bearer <token> # (optional) custom headers for auth
type: a2a
tells the agent to treat this server as an A2A agent, not a standard MCP server./\.well-known/agent.json
endpoint.allowed_tools
to restrict which skills are available to the agent.Use cases:
See the A2A protocol documentation for more details on how to implement your own A2A agent.
VoiceOps can be integrated with Kagent, an open-source framework for running agentic AI in Kubernetes environments. Kagent enables DevOps and platform engineers to automate complex operations, troubleshoot issues, and manage cloud-native resources using AI agents.
mcp_servers.yaml
, add your Kagent A2A server endpoint: - name: k8s-a2a-agent
type: a2a
url: http://a2a.mockee.me/api/a2a/kagent/k8s-agent
For more details, visit the Kagent website and explore the documentation and community resources.
main.py
: Entry point for running the agentagent_core.py
: Core agent logic and orchestrationtool_integration.py
: Integration layer for MCP toolsa2a.py
: Agent-to-Agent (A2A) protocol supportmcp_config.py
: MCP server configuration loader and utilitiestest_agent_config.py
: Unit tests for agent configurationmcp_servers.yaml
: MCP server and tool configuration fileMakefile
: Common development and setup commandssystem_prompt.txt
: System prompt and instructions for the agentexample/
: Example scripts for A2A client/server
a2a-client.py
: Example A2A client scripta2a-server.py
: Example A2A server scriptmcp_client/
: MCP client integration package
__init__.py
: Package initializeragent_tools.py
: MCP tool definitions and logicauth.py
: Authentication middleware for MCP serversserver.py
: MCP server connection handlerssse_client.py
: SSE client for MCP communicationutil.py
: MCP client utilitiesRun unit tests:
make test
If you see an error like:
aiohttp.client_exceptions.ClientConnectorCertificateError: Cannot connect to host api.elevenlabs.io:443 ssl:True [SSLCertVerificationError: (1, '[SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:1006)')]
make certs-macos
ca-certificates
is installed and updated.make certs-linux
Do NOT disable SSL verification in production.
If you encounter errors such as invalid_function_parameters
, Invalid schema for function
, or similar messages from the LLM or MCP server, it usually means your tool schema is not valid or not compatible with the LLM's requirements.
mcp_servers.yaml
or your MCP server configuration.Contributions, feedback, and ideas are welcome!
git clone https://github.com/your-username/voice-mcp.git
cd voice-mcp
git checkout -b my-feature-branch
git add .
git commit -m "Describe your change"
git push origin my-feature-branch
For major changes, please open an issue first to discuss what you would like to change.
Make sure to follow best practices and keep the codebase clean and well-documented.
Let's build something great together!
This project is licensed under the MIT License.
{ "mcpServers": { "voice-mcp-agent": { "command": "npx", "args": [ "mcp-server-kubernetes" ] } } }
Related projects feature coming soon
Will recommend related projects based on sub-categories