adk_mcp_client (erlang_adk v0.2.1)

View Source

adk_mcp_client - Client for connecting to Model Context Protocol servers.

Connects to an external MCP server (e.g. over SSE or Stdio) to discover and execute tools provided by the server.

Summary

Functions

Close the connection.

Connect to an MCP server.

Execute a tool on the remote server.

List tools available on the connected server.

Functions

close(Client)

-spec close(Client :: map()) -> ok.

Close the connection.

connect(Transport, Target)

-spec connect(Transport :: binary(), Target :: binary()) -> {ok, pid() | map()} | {error, term()}.

Connect to an MCP server.

execute_tool(Client, ToolName, Args)

-spec execute_tool(Client :: map(), ToolName :: binary(), Args :: map()) ->
                      {ok, term()} | {error, term()}.

Execute a tool on the remote server.

list_tools(Client)

-spec list_tools(Client :: map()) -> {ok, [map()]} | {error, term()}.

List tools available on the connected server.