Skip to content

cap_mcp_client / cap_mcp_server

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

Server source: cap_mcp_server.ccomponents/claw_capabilities/cap_mcp_server/src/cap_mcp_server.c · header: cap_mcp_server.hcomponents/claw_capabilities/cap_mcp_server/include/cap_mcp_server.h · Skill: SKILL.mdcomponents/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 IDDescription
mcp_list_toolsList available tools on a remote MCP server
mcp_call_toolCall a specified tool on a remote MCP server
mcp_discoverDiscover MCP servers advertised on the local network
ParameterTypeRequiredDescription
server_urlstringYesMCP server URL
endpointstringMCP endpoint path
cursorstringPagination cursor
ParameterTypeRequiredDescription
server_urlstringYesMCP server URL
tool_namestringYesTool name to call
endpointstringMCP endpoint path
argumentsobjectArguments passed to the tool
ParameterTypeRequiredDescription
timeout_msintegerDiscovery timeout
include_selfbooleanWhether to include this device itself
PropertyValue
Group IDcap_mcp_client
Default LLM-visibleNo (requires Skill activation)
Tool count3

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)
PropertyValue
Group IDcap_mcp_server
Default LLM-visibleNo
Tool count0 (server only; no LLM-callable tools exposed)