Skip to main content
MCP server CX Codex official · Google

Agent Mesh — Claude Code MCP server: remote MCP tools over a mesh

Agent Mesh is an Claude Code MCP server that enrolls the agent as a member of a mesh and exposes five tools for locating and calling remote MCP tools.

Apache-2.0 ★ 1,209 updated 2026-11-16

Install into Claude Code · Platform CLI All methods and platforms ↓
claude mcp add --env AGENTMESH_CONTROL_PLANE_URL=<AGENTMESH_CONTROL_PLANE_URL> --env AGENTMESH_BOOTSTRAP_TOKEN_PATH=<AGENTMESH_BOOTSTRAP_TOKEN_PATH> --env AGENTMESH_JWT_PATH=<AGENTMESH_JWT_PATH> --env AGENTMESH_STATE_DIR=<AGENTMESH_STATE_DIR> --env AGENTMESH_INSECURE_CONTROL_PLANE=<AGENTMESH_INSECURE_CONTROL_PLANE> --transport stdio js -- npx -y @agentmesh-p2p/sdk
Open on GitHub

What Agent Mesh does

The agentmesh executable shipped in @agentmesh-p2p/sdk enrolls with the control plane on its first run and keeps that identity in a state directory; later runs pick up from there. Joined through a router, the member locates services and calls them, and it answers A2A requests under its own name. Five tools come with it: get_mesh_info, discover_remote_services, find_remote_tools, describe_remote_tool, call_remote_tool.

Node.js 22.18 or newer is required. AGENTMESH_CONTROL_PLANE_URL names the mesh, a token arrives as a file path through AGENTMESH_BOOTSTRAP_TOKEN_PATH or AGENTMESH_JWT_PATH (not both), and credentials are read from those files only. Identity sits in AGENTMESH_STATE_DIR, ~/.config/agentmesh/mcp unless changed. Plain http passes on loopback alone; elsewhere it takes AGENTMESH_INSECURE_CONTROL_PLANE=true.

This member publishes nothing, so no list_local_services tool exists, and a tool others should find by name belongs behind agentmesh-node. There is no HTTP proxy, /v1 endpoint or local socket either. Each request has a 10-second deadline and a search is bounded by providers, services and results, so a wide query gets narrowed by peer or service.

What it helps with

  • find a service on the mesh by name and call its tool
  • list the remote tools a provider exposes
  • read a single tool's description before calling it
  • join a mesh from the agent process without a node daemon
  • check mesh info and the session peer ID

Example prompts for the agent

  • Find the service mcp://everything on the mesh and call its echo tool with {"message": "hi"}.
  • List the remote tools that the provider mcp://everything exposes.
  • Describe the echo tool of mcp://everything, then call it.

How to install Agent Mesh

Platform CLI

claude mcp add --env AGENTMESH_CONTROL_PLANE_URL=<AGENTMESH_CONTROL_PLANE_URL> --env AGENTMESH_BOOTSTRAP_TOKEN_PATH=<AGENTMESH_BOOTSTRAP_TOKEN_PATH> --env AGENTMESH_JWT_PATH=<AGENTMESH_JWT_PATH> --env AGENTMESH_STATE_DIR=<AGENTMESH_STATE_DIR> --env AGENTMESH_INSECURE_CONTROL_PLANE=<AGENTMESH_INSECURE_CONTROL_PLANE> --transport stdio js -- npx -y @agentmesh-p2p/sdk

Replace <…> with your own values

Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more

Questions about Agent Mesh

How to install Agent Mesh in Claude Code?

With one command: `claude mcp add agentmesh -e AGENTMESH_CONTROL_PLANE_URL=<AGENTMESH_CONTROL_PLANE_URL> -e AGENTMESH_BOOTSTRAP_TOKEN_PATH=<AGENTMESH_BOOTSTRAP_TOKEN_PATH> -e AGENTMESH_JWT_PATH=<AGENTMESH_JWT_PATH> -- npx -y @agentmesh-p2p/sdk`. The mesh operator supplies the values.

What does Agent Mesh do?

It enrolls the agent with the control plane as a mesh member and gives it five tools for finding and calling remote MCP tools. It publishes no services of its own.

What do I need to run Agent Mesh?

Node.js 22.18 or newer, the control plane address in AGENTMESH_CONTROL_PLANE_URL, and a token file — bootstrap or JWT. Identity is kept in AGENTMESH_STATE_DIR.

Similar MCP servers

All MCP servers for Agent setup: memory, context, orchestration →

Project sponsors

Companies that keep this analytics open