DatagroutConduit (DataGrout Conduit v0.5.0)

Copy Markdown View Source

Production-ready MCP client with mTLS, OAuth 2.1, and semantic discovery.

DataGrout Conduit is a client library that connects to remote MCP and JSON-RPC servers over HTTP/HTTPS, sends requests, and parses responses.

Quick Start

{:ok, client} = DatagroutConduit.Client.start_link(
  url: "https://gateway.datagrout.ai/servers/{uuid}/mcp",
  auth: {:bearer, "token"}
)

{:ok, tools} = DatagroutConduit.Client.list_tools(client)
{:ok, result} = DatagroutConduit.Client.call_tool(client, "my-tool", %{key: "value"})

Summary

Functions

Returns the canonical URL for the DataGrout CA certificate.

Returns the default endpoint for Substrate identity registration.

Extracts a %DatagroutConduit.Types.ToolMeta{} from a tool result's _meta field.

Returns true if the given URL points to a DataGrout host (datagrout.ai or datagrout.dev).

Returns the library version.

Functions

dg_ca_url()

@spec dg_ca_url() :: String.t()

Returns the canonical URL for the DataGrout CA certificate.

dg_substrate_endpoint()

@spec dg_substrate_endpoint() :: String.t()

Returns the default endpoint for Substrate identity registration.

extract_meta(arg1)

@spec extract_meta(map()) :: DatagroutConduit.Types.ToolMeta.t()

Extracts a %DatagroutConduit.Types.ToolMeta{} from a tool result's _meta field.

Returns %ToolMeta{} with receipt and credit estimate if present.

is_dg_url?(url)

@spec is_dg_url?(String.t()) :: boolean()

Returns true if the given URL points to a DataGrout host (datagrout.ai or datagrout.dev).

version()

@spec version() :: String.t()

Returns the library version.