Repository navigation
feat(mesh): agents manage the mesh's nodes over MCP and in the assistant - #618
Merged
Merged
Conversation
adeelahmad
force-pushed
the
claude/project-thread-6dqeie
branch
2 times, most recently
from
October 18, 2026 15:28
48ae2ef to
c98735b
Compare
Owner
Author
|
The
Generated by Claude Code 8000 |
An admin's agent now does what Settings › Nodes and Network do. `mesh` reads the mesh: on or off, the CA's fingerprint and expiry, this machine's mesh address, every machine with how it's doing, and the join tokens not used yet, never their secrets. `add_mesh_node` makes a join token and its install line (turning the mesh on when it's off), `change_mesh_node` renames a machine or changes its namespaces, `remove_mesh_node` and `restore_mesh_node` take one off and bring it back, and `withdraw_mesh_token` withdraws a token. Over MCP every change needs an admin's write-scope token, happens at once and is audited as the web app's are. In the assistant, adding a machine and taking one off always wait for the person's yes; the rest happens at once unless the answer read outside text. An approved install line goes to the person once, on the approval card, and is kept out of the approval's stored result, the audit log and the model's context. The route, MCP and the assistant share mesh.add (token, line, turning the mesh on) and mesh.check_token, so the assistant says what's wrong with a token's terms before it asks. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GTrHPwWHtEvFJFq3M1YpH4
adeelahmad
force-pushed
the
claude/project-thread-6dqeie
branch
from
October 18, 2026 15:52
2f4fc48 to
0e0f404
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Before: only a person in Settings › Nodes, or a script calling the HTTP API, could add, rename, remove or restore a machine on the mesh. MCP clients and the assistant couldn't see the mesh.
After: MCP clients (admin only, and the write scope for changes) and the assistant (admins) have six tools:
mesh(read),add_mesh_node,change_mesh_node,remove_mesh_node,restore_mesh_nodeandwithdraw_mesh_token.add_mesh_nodeshows its install line once on the approval card, with Copy and Done buttons. The line is never kept in the approval or the audit log, and the model never sees it.meshnever shows a token's secret.How:
mesh.add,mesh.check_tokenandmesh.agent_vieware shared by the route,mcp_tools.pyandops_tools.MESH_TOOLS. A newApprovalOutcome.install_linefield carries the line, with OpenAPI and the client regenerated bymake openapi. Audit entries use the routes' action names, tagged withviaorassistant.Motivation and Context
This follows the Nebula mesh work (#546, #553, #591, #595, #602, #607, #613). It closes the agent-first gap from AGENTS.md: everything Settings › Nodes does, an agent can now do too.
Types of changes
Checklist:
test_mesh_agents.py(5),approval-install-line.test.tsx(2), and updatedtest_mcp.pyandtest_approvals.py.docs/mesh.md(new Agents section),docs/mcp.md,docs/assistant.md.changelog.d/mesh-tools.md.Done questions (AGENTS.md)
meshreads from the database.docs/requirements.mdrow, with checks.docs/mesh.md.mesh.add, and the tools reuse the existing approval flow.Generated by Claude Code