talos-mcp-server
Provides tools for managing etcd members, snapshots, alarms, and defragmentation on Talos clusters.
Enables retrieval of kubeconfig for Kubernetes cluster access and management.
Allows interaction with Talos Linux clusters for cluster management, monitoring, hardware inspection, file system browsing, and configuration patching.
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., "@talos-mcp-servershow me the status of all Talos nodes"
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.
Talos MCP Server
An MCP (Model Context Protocol) server that provides seamless integration with Talos Linux clusters. This server enables Claude to interact with your Talos infrastructure through the native gRPC API.
Features
π MCP Resources: Direct access to node health, version, and config via URI
π MCP Prompts: Intelligent templates for diagnosing clusters and reviewing audits
π§ Cluster Management: Bootstrap, upgrade, reset, and manage node lifecycle
πΎ Disk & Hardware: Inspect disks, mounts, PCI, USB, and system devices
π Monitoring: Access logs, dmesg, services, and real-time dashboard data
π File System: Browse and read files on Talos nodes
π etcd Integration: Manage members, snapshots, alarms, and defragmentation
βΈοΈ Kubernetes Config: Retrieve kubeconfig for cluster access
βοΈ Configuration: Patches, validation, and machine config management
π‘ Resource Inspection: Query any Talos resource (similar to kubectl get)
What is Talos Linux?
Talos Linux is a modern, secure, and immutable Linux distribution designed specifically for Kubernetes. Key features:
API-Managed: Completely managed via a declarative gRPC API (no SSH)
Immutable: Read-only root filesystem for enhanced security
Minimal: Only includes components necessary to run Kubernetes
Secure by Default: Kernel hardened following KSPP recommendations
Prerequisites
Python 3.10+
uv - Fast Python package installer
talosctl - Talos CLI tool
Talos Configuration - A valid talosconfig file (usually at
~/.talos/config)
Installation
Option 1: Install from PyPI (Recommended)
pip install talos-mcp-serverOr with uv:
uv pip install talos-mcp-serverOption 2: Install from Source
git clone https://github.com/CBEPX/talos-mcp-server.git
cd talos-mcp-server
uv venv && source .venv/bin/activate
uv pip install -e .Install talosctl
# macOS
brew install siderolabs/tap/talosctl
# Linux
curl -sL https://talos.dev/install | sh4. Docker Support
You can also run the server using Docker.
# Build the image
docker build -t talos-mcp-server .
# Run the container (make sure to mount your talos config)
docker run --rm -i \
-v $HOME/.talos:/root/.talos:ro \
-e TALOSCONFIG=/root/.talos/config \
talos-mcp-serverOr using Docker Compose for development:
docker-compose up --buildConfiguration
Talos Configuration
Ensure you have a valid Talos configuration file. This is typically created when you set up your Talos cluster:
# Generate config (if setting up new cluster)
talosctl gen config my-cluster https://<control-plane-ip>:6443
# Check your current config
talosctl config info
# View available contexts
talosctl config contextsThe MCP server will automatically use your default Talos configuration from ~/.talos/config.
Client Integration
Claude Desktop
To use this MCP server with Claude Desktop, add it to your configuration:
macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
Windows: %APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"talos": {
"command": "talos-mcp-server",
"env": {
"TALOSCONFIG": "/path/to/your/.talos/config",
"TALOS_MCP_LOG_LEVEL": "INFO",
"TALOS_MCP_AUDIT_LOG_PATH": "talos_mcp_audit.log"
}
}
}
}Cursor
Open Cursor Settings
Go to Features > MCP Servers
Click + Add New MCP Server
Fill in the details:
Name:
talosType:
stdioCommand:
talos-mcp-serverEnvironment Variables: Add
TALOSCONFIGpointing to your config file
Google Antigravity / Generic JSON
For other clients supporting the Model Context Protocol (including Perplexity or generic integrations), use the standard server definition. You can configure the server using CLI arguments (Typer) or Environment Variables.
Example using CLI arguments:
{
"mcpServers": {
"talos": {
"command": "talos-mcp-server",
"args": [
"--log-level", "DEBUG",
"--readonly"
],
"env": {
"TALOSCONFIG": "${HOME}/.talos/config"
}
}
}
}Example using Environment Variables:
{
"mcpServers": {
"talos": {
"command": "talos-mcp-server",
"env": {
"TALOSCONFIG": "${HOME}/.talos/config",
"TALOS_MCP_READONLY": "true",
"TALOS_MCP_LOG_LEVEL": "INFO"
}
}
}
}Configuration Options
The server uses Typer for CLI arguments and Pydantic Settings for environment variables. You can mix and match, but CLI arguments take precedence.
Environment Variable | CLI Argument | Description | Default |
| N/A | Path to talosconfig file |
|
|
| Logging verbosity (DEBUG, INFO, etc) |
|
|
| Path to JSON audit log file |
|
|
| Enable/Disable read-only mode |
|
Available Tools
Cluster Lifecycle
talos_bootstrap: Bootstrap the cluster on a node
talos_upgrade: Upgrade Talos on a node
talos_reset: Reset a node to maintenance mode
talos_reboot: Reboot a node
talos_shutdown: Shutdown a node
talos_cluster_show: High-level cluster overview
Configuration & Management
talos_config_info: Get current Talos configuration and context
talos_apply_config / talos_apply: Apply configuration
talos_patch: Apply generic patches to resources
talos_machineconfig_patch: Patch machine configuration
talos_validate_config: Validate configuration files
talos_get_kubeconfig: Retrieve kubeconfig
System & Hardware
talos_get_version: Get Talos Linux version
talos_health: Check cluster health status
talos_get_disks: List disks
talos_devices: List PCI, USB, and System devices
talos_mounts: List mount points
talos_du: Disk usage analysis
talos_dashboard: Real-time resource usage snapshot
Network & Services
talos_get_services: Service status
talos_interfaces: List network interfaces
talos_routes: List network routes
talos_netstat: Network connections
talos_pcap: Capture packet data
talos_logs: Service/Container logs
talos_dmesg: Kernel logs
Resources & Etcd
talos_get_resources: Query any Talos resource
talos_list: List files
talos_read: Read files
talos_etcd_members: List etcd members
talos_etcd_snapshot: Take etcd snapshot
talos_etcd_alarm: Manage etcd alarms
talos_etcd_defrag: Defragment etcd storage
New Features (Talos 1.12+)
talos_cgroups: Manage cgroups
talos_volumes: Manage user volumes
talos_support: Generate support bundles
Usage Examples
With Claude Desktop
Once configured, you can ask Claude natural language questions:
"Show me the version of Talos running on my cluster"
"What services are running on node 192.168.1.10?"
"Get the logs from kubelet on my control plane nodes"
"List all disks on 192.168.1.10"
"Check the health of my Talos cluster"
"Show me the etcd members"Programmatic Usage
from talos_mcp.server import TalosClient
# Initialize client
client = TalosClient()
# Get context info
info = client.get_context_info()
print(info)
# Execute talosctl commands
result = await client.execute_talosctl(["version"])
print(result["stdout"])Development
Running Tests
# Install dev dependencies
uv pip install -e ".[dev]"
# Run unit tests
pytest
# Run integration tests (Requires Docker)
# This will provision a local Talos cluster in Docker
make test-integrationCode Quality
We use a comprehensive set of tools to ensure code quality:
# Standard development workflow using Makefile
make install # Install dependencies
make lint # Run all linters (ruff, mypy, bandit)
make test # Run tests
make verify # Verify tool registrationLogging and Auditing
The server uses loguru for structured logging.
Console: INFO level logs for general feedback.
Audit Log:
talos_mcp_audit.log(rotating) containing detailed JSON logs for debugging and auditing commands.
Architecture
βββββββββββββββββββ
β Claude Desktop β
ββββββββββ¬βββββββββ
β MCP Protocol
β
βββββββββββββββββββββββββββββββββββββββ
β MCP Server (Python) β
β ββ cli.py (CLI & Lifecycle) β
β ββ handlers.py (Protocol Handlers) β
β ββ registry.py (Auto-Discovery) β
β ββ server.py (Initialization) β
ββββββββββ¬βββββββββββββββββββββββββββββ
β subprocess
β
βββββββββββββββββββ
β talosctl CLI β
ββββββββββ¬βββββββββ
β gRPC + mTLS
β
βββββββββββββββββββ
β Talos Cluster β
β (apid API) β
βββββββββββββββββββKey Components
cli.py: Command-line interface, logging, and server lifecycle
server.py: MCP server initialization and handler registration
handlers.py: MCP protocol handlers (Resources, Prompts, Tools)
registry.py: Auto-discovery and registration of tools
core/: Client, settings, and exception handling
tools/: Modular tool implementations (auto-discovered)
Security Considerations
mTLS Authentication: Talos API uses mutual TLS for authentication
Certificate Management: Keep your talosconfig and certificates secure
Network Access: Ensure your endpoints are properly firewalled
Permissions: The MCP server has the same permissions as your talosconfig
Troubleshooting
talosctl not found
# Check if talosctl is in PATH
which talosctl
# Install talosctl if missing
curl -sL https://talos.dev/install | shConfiguration not found
# Check config location
echo $TALOSCONFIG
# Verify config exists
ls -la ~/.talos/config
# Test connectivity
talosctl versionConnection refused
# Verify endpoints in config
talosctl config info
# Check network connectivity
ping <control-plane-ip>
# Verify certificates are valid
talosctl version --nodes <node-ip>MCP Server Issues
# Test the server directly
talos-mcp-server --help
# Check Claude Desktop logs
# macOS: ~/Library/Logs/Claude/
# Windows: %APPDATA%\Claude\logs\Resources
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
License
MIT License - see LICENSE file for details
Acknowledgments
Built for the Model Context Protocol
Integrates with Talos Linux by Sidero Labs
Uses uv for fast Python package management
This server cannot be installed
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
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/CBEPX/talos-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server