
Talos MCP server for Talos Linux
io.github.sergelogvinovv0.2.0更新於 Oct 5, 2026
Talos MCP is an opinionated MCP server for Talos Linux
概覽
讓 AI 助理透過 Talos API 檢視 Talos Linux 叢集與節點,讀取版本、日誌、事件與探索服務成員資訊。
- 功能
- 將 MCP 用戶端連線到 Talos API(apid),並可選連線探索服務,支援多個叢集並回傳結構化資料。工具可列出已設定的叢集、描述叢集節點的角色與版本、查看最近的執行階段事件、列出探索服務成員,以及讀取節點詳細資料、服務日誌與核心日誌。明確啟用後可提供一個重新啟動節點的破壞性工具。
- 適用情境
- 適合讓助理蒐集與分析 Talos 叢集資訊,而不必手動執行大量 talosctl 指令,例如在變更基礎設施之前。它不取代 Terraform、Ansible 或 GitOps,這些工具仍是基礎設施變更的主要來源。
- 執行需求
- 以 stdio 本機程序執行(可透過 Homebrew 或容器映像安裝)。需要 talosconfig 檔案,透過 --talosconfig 或 TALOSCONFIG 指定,並為每個叢集設定憑證;加密欄位需要解鎖來源,例如 TALOSCONFIG_IDENTITY、TALOSCONFIG_PASSPHRASE_FILE 或 TALOSCONFIG_ASKPASS。需要連線到 Talos API 端點的網路。也提供 HTTP 伺服器模式。
安裝
在 SourceWeft 中
- 開啟 儀表板中的 Talos MCP server for Talos Linux,將其新增到工作區。
- 為需要使用其工具的對話啟用該服務。
Desktop only,透過 STDIO。 STDIO 服務會啟動本機處理程序,因此需要 SourceWeft 桌面主機。
其他 MCP 客戶端
參照 儲存庫 中的啟動說明。
README
Talos opinionated MCP Server
NOTE: This project is under active development.
Motivation
Modern infrastructure often uses tools such as Terraform/OpenTofu, Ansible, and GitOps. These tools deploy and configure Talos Linux nodes and Kubernetes clusters.
The Talos MCP Server does not replace these tools. It gives AI assistants and automation agents access to information about your Talos clusters.
The default tools are read-only. An optional action tool can be enabled with
--allow-destructive to reboot a node.
Instead of running many talosctl commands across nodes, you can ask an AI
assistant to collect and analyze the required information. Your existing
automation tools remain the main source for infrastructure changes.
Overview
The server connects an MCP client, such as an AI assistant, to the Talos API (apid) and, optionally, to the Talos discovery service. It supports multiple Talos clusters and returns structured data.
You can use it to:
- inspect clusters, nodes, and their Talos and Kubernetes versions
- read Talos service logs and kernel logs (dmesg) of a node
- review recent Talos runtime events
- list cluster members from the discovery service, even when the Talos API is down
- collect information before you make infrastructure changes
Keep your AI on the leash.
Talos tools
The MCP server provides the following tools:
cluster is a talosconfig context name. When it is omitted, the current
context is used. Use talos_clusters_list first to find the cluster names.
MCP clients can discover the full input and output schemas. You can also list
the tools from the command line:
When --allow-destructive is enabled and the cluster's credential has the
os:operator role, talos_node_reboot accepts cluster, node, and an
optional mode (default or powercycle). It returns once Talos accepts the
request; it does not wait for the node to come back.
The tools available on each cluster depend on the role of its client
certificate: os:reader gets the read-only tools, os:operator also gets
the reboot tool.
Installation
For a local installation with Homebrew, run:
You do not need a local installation when you use an MCP server hosted on another machine.
Configure Talos clusters
The server reads a standard talosconfig, the same file talosctl uses.
Each context is one cluster. Create a dedicated credential with the smallest
role you need:
A context may also have an optional discovery block with the cluster ID and
secret, which enables talos_clusters_members:
The private key and cluster_secret can be stored encrypted with a
passphrase, an age key, or your SSH key:
Set the talosconfig path with --talosconfig or TALOSCONFIG. The default is
~/.talos/config.
See docs/config.md for every talosconfig field, the
discovery block, credential roles, the unlock options for encrypted secrets,
the config import, encrypt, decrypt, and check commands, deployment recipes, and
troubleshooting.
Configure an MCP client
Local stdio server
For clients that use a JSON MCP configuration, add an entry like this:
If the talosconfig has encrypted fields, also set an unlock source, for
example "TALOSCONFIG_IDENTITY": "/absolute/path/to/.ssh/id_ed25519". The
mcp command never prompts for a passphrase.
Remote HTTP server
Start the streamable HTTP server with:
The MCP endpoint is http://host:8080/mcp, and a health check is served on
/healthz.
For a remote client, use an HTTPS URL that ends with /mcp:
The server does not provide user authentication for the HTTP endpoint. Every caller uses the credentials from the server's talosconfig, so protect the endpoint with a network policy or an authenticating proxy.
A Helm chart for Kubernetes is available in charts/talos-mcp.
Restart or reload the MCP client after you save its configuration.
Running
Common flags
The mcp, server, and tools commands use the following flags. Each flag
can also be set with an environment variable. A command-line flag has higher
priority than an environment variable.
The server command also accepts --listen-address (LISTEN_ADDRESS,
default 127.0.0.1:8080) and --require-all-contexts
(REQUIRE_ALL_CONTEXTS). The container image sets LISTEN_ADDRESS=:8080. The tools command accepts --output (-o) with
text, json, or yaml. Its default is text.
For example, run the stdio server with JSON logs:
Test the configuration
Check the talosconfig and its encrypted fields:
List all available tools:
Call a tool directly:
License
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Talos Linux is a trademark of Sidero Labs, Inc.
來源:README.md,提交 ed32ca8
工具
0版本歷史
1- v0.2.0最新Oct 5, 2026


