Claude and MCP
The integration works both ways: Claude Code reads and edits the canvas through MCP, and a node on the canvas asks Claude a question through the agent.
Claude reads and edits the canvas
The tools/dev/mcp_claude.sh script from the repository connects the myetern MCP server to Claude Code. In the cloud it needs the API address and the user's ws token, the permissions match the app: reading by membership, writing by write access.
Tools: list workspaces, the scene and single nodes, node text, types, adding and editing nodes and edges, deletion, running a flow by webhook and putting a code schema on the canvas. Edits work as "read the bundle, change it, send it back": the server merges them as a delta, teammates' edits are not overwritten, subscribers receive the change at once.
Resources myetern://<ws>, /bundle, /node/<key> and /node/<key>/text can be read and subscribed to. The subscription goes through the server room over WebSocket, notifications arrive when the workspace changes. Prompts code_schema, extend_screen and review_scene embed canvas data into the message.
There is deliberately no PNG snapshot and no direct SQL or commands in MCP: Claude places nodes, and actions with external effects are started by a person with the ▶ button.
The "Ask Claude" node
"Flow → 🤖 Claude": fields agent, prompt, context and model. The context is assembled by edges from neighbouring nodes. "Ask" sends the agent a claude -p command with the prompt and context, which needs claude * allowed in agent.json and a signed-in Claude on the agent machine. The answer lands in the "answer" field and can be passed along edges anywhere. Claude keys never leave the user's machine, the server is a transit under write access and the cap.shell capability.
← Database schema, migrations and the grid with writes Workplace: modes, layouts, profiles →