Skip to content

add per-agent MCP config and redesign topology node cards#42

Merged
NitayRabi merged 2 commits into
mainfrom
feat/mcp-agent-config-ui
May 15, 2026
Merged

add per-agent MCP config and redesign topology node cards#42
NitayRabi merged 2 commits into
mainfrom
feat/mcp-agent-config-ui

Conversation

@NitayRabi

Copy link
Copy Markdown
Collaborator

Summary

  • Per-agent MCP config: removes the global MCP button from the TopBar and replaces it with an MCP button on each agent card. Clicking it opens a centered modal (portal to document.body) with a ready-to-paste JSON config containing the registration token and x-amesh-agent-id already filled in, scoping the MCP connection to that specific agent.
  • Registration token as MCP auth: the server now accepts the node registration token as a valid MCP Bearer token (new registration_token auth mode), so agents don't need the admin password to connect.
  • NodeCard redesign: the node is now a clearly bounded container; each agent inside is its own inset card with always-visible Chat and MCP action buttons. The ArrowRight connect button is removed — the ReactFlow handles at the left/right edges of each agent card are the drag-to-connect affordance, highlighted on hover.
  • MCP server (apps/server/src/mcp.ts): scoped MCP sessions, session management, agent visibility rules.

Test plan

  • Add a node and verify agents appear as individual cards inside the node container
  • Hover an agent card — Chat and MCP buttons should be visible; handles should highlight accent
  • Drag from one agent's right handle to another agent's left handle — allow rule should be created
  • Click MCP on an agent — centered modal appears with correct agent ID and registration token filled in; clicking the backdrop or pressing Escape closes it
  • Copy the MCP config JSON and confirm it contains Authorization: Bearer <token> and x-amesh-agent-id: <agentId>
  • Verify the TopBar no longer has a global MCP button

🤖 Generated with Claude Code

NitayRabi and others added 2 commits May 14, 2026 22:35
- Introduce MCP server (apps/server/src/mcp.ts) with scoped agent sessions
- Accept registration token as MCP Bearer auth so each agent gets its own
  scoped connection without needing the admin password
- Remove global MCP button from TopBar; replace with a per-agent MCP button
  on each agent card that opens a centered portal modal with the ready-to-paste
  config (registration token + x-amesh-agent-id already filled in)
- Redesign NodeCard: node is a container with a header; each agent is an inset
  card with always-visible Chat and MCP action buttons
- Replace the ArrowRight connect button with the ReactFlow edge handles at the
  left/right edges of each agent card as the connection affordance
- MCP modal renders via createPortal to document.body, centered over the canvas

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…back

The old test looked for a global MCP button in the TopBar (removed).
Update it to use the narrow layout fallback (which ReactFlow tests use)
and test the per-agent MCP button on the agent card instead.
Add the MCP button to NarrowFallback so the feature is reachable in
both the topology canvas and compact mobile view.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@NitayRabi NitayRabi merged commit 730e73a into main May 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant