Skip to content

cap_mcp_client / cap_mcp_server

Client source: cap_mcp_client.c components/claw_capabilities/cap_mcp_client/src/cap_mcp_client.c · header: cap_mcp_client.h components/claw_capabilities/cap_mcp_client/include/cap_mcp_client.h · Skill: SKILL.md components/claw_capabilities/cap_mcp_client/skills/cap_mcp_client/SKILL.md

Server source: cap_mcp_server.c components/claw_capabilities/cap_mcp_server/src/cap_mcp_server.c · header: cap_mcp_server.h components/claw_capabilities/cap_mcp_server/include/cap_mcp_server.h · Skill: SKILL.md components/claw_capabilities/cap_mcp_server/skills/cap_mcp_server/SKILL.md

ESP-Claw implements Model Context Protocol (MCP) support through two components, cap_mcp_client and cap_mcp_server:

  • cap_mcp_client: allows the LLM to discover and call tools exposed by remote MCP servers
  • cap_mcp_server: exposes the device’s own Capabilities as a local MCP server for external MCP clients
Tool ID Description
mcp_list_tools List available tools on a remote MCP server
mcp_call_tool Call a specified tool on a remote MCP server
mcp_discover Discover MCP servers advertised on the local network
Parameter Type Required Description
server_url string Yes MCP server URL
endpoint string MCP endpoint path
cursor string Pagination cursor
Parameter Type Required Description
server_url string Yes MCP server URL
tool_name string Yes Tool name to call
endpoint string MCP endpoint path
arguments object Arguments passed to the tool
Parameter Type Required Description
timeout_ms integer Discovery timeout
include_self boolean Whether to include this device itself
Property Value
Group ID cap_mcp_client
Default LLM-visible No (requires Skill activation)
Tool count 3

cap_mcp_server is a CLAW_CAP_KIND_HYBRID Capability with lifecycle management. After start, it creates a local MCP server instance and exposes the device’s registered Capabilities as MCP tools for discovery and invocation by external MCP clients on the LAN, such as desktop IDEs or other ESP-Claw devices.

  • Supports MCP SSE (Server-Sent Events) transport
  • Automatically maps device Capabilities to MCP tools
  • Supports mDNS advertisement for LAN discovery
  • Provides a full lifecycle (init -> start -> stop)
Property Value
Group ID cap_mcp_server
Default LLM-visible No
Tool count 0 (server only; no LLM-callable tools exposed)