Skip to content
leehackPublic

About

Universal Tool Calling Protocol (UTCP) for Dart and Flutter: call LLM tools over HTTP, OpenAPI, MCP, CLI, WebSocket, TCP/UDP

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Repository files navigation

UTCP for Dart

pub package CI

Dart packages for the Universal Tool Calling Protocol (UTCP), an open standard that lets AI agents and LLM apps discover tools and call them directly.

A provider publishes a manual that lists its tools and how to call each one. The client calls the tool over its native protocol (HTTP, WebSocket, TCP, a CLI), with no wrapper server in between. Existing MCP servers still work through utcp_mcp.

The core works in Flutter apps on mobile, desktop and web, and has no Flutter dependency.

Quick start

dart pub add utcp
import 'package:utcp/utcp.dart';

Future<void> main() async {
  final client = await UtcpClient.create(
    config: UtcpClientConfig(
      variables: {'weather_API_KEY': 'my-key'},
      manualCallTemplates: [
        HttpCallTemplate(name: 'weather', url: 'https://api.example.com/utcp'),
      ],
    ),
  );

  final tools = await client.searchTools('current weather');
  final result = await client.callTool(tools.first.name, {'city': 'Seoul'});
  print(result);

  await client.close();
}

More in the utcp README, including a Flutter example and an LLM tool-calling loop (claude_tool_use.dart).

Packages

Package Transports
utcp Core client, http (with OpenAPI conversion), sse, streamable_http, text
utcp_mcp mcp (MCP servers over stdio, streamable HTTP and legacy HTTP+SSE)
utcp_cli cli
utcp_file file, .env variable loader
utcp_socket tcp, udp
utcp_websocket websocket

Platform support

Package Mobile and desktop (Dart VM, Flutter) Web
utcp Yes Yes
utcp_websocket Yes Yes (no handshake headers)
utcp_mcp Yes Streamable HTTP servers (stdio needs a native platform)
utcp_cli Yes No: browsers cannot spawn processes
utcp_socket Yes No: browsers cannot open raw sockets
utcp_file Yes No: browsers cannot read files by path

Spec compliance

Package UTCP spec version
utcp 1.1.0
utcp_mcp 1.1.0
utcp_cli 1.1.0
utcp_file 1.1.0
utcp_socket 1.1.0
utcp_websocket 1.1.0

Manuals are written with utcp_version set to utcpProtocolVersion. The conformance suite parses and round-trips every UTCP document in the spec and the reference SDKs. It was last verified against:

Reference Commit
UTCP specification 4a9ed93
python-utcp bb8e2f6
typescript-utcp ea4902d

Links

About

Universal Tool Calling Protocol (UTCP) for Dart and Flutter: call LLM tools over HTTP, OpenAPI, MCP, CLI, WebSocket, TCP/UDP

Topics

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages