$git clone https://github.com/universal-tool-calling-protocol/python-utcpThe Universal Tool Calling Protocol (UTCP) is a secure, scalable standard for defining and interacting with tools across a wide variety of communication protocols. UTCP 1.0.0 introduces a modular core with a plugin-based architecture, making it more extensible, testable, and easi
| 1 | # Universal Tool Calling Protocol (UTCP) |
| 2 | |
| 3 | [](https://github.com/universal-tool-calling-protocol) |
| 4 | [](https://pepy.tech/projects/utcp) |
| 5 | [](https://github.com/universal-tool-calling-protocol/python-utcp/blob/main/LICENSE) |
| 6 | [](https://cdtm.com/) |
| 7 | |
| 8 | ## Introduction |
| 9 | |
| 10 | The Universal Tool Calling Protocol (UTCP) is a secure, scalable standard for defining and interacting with tools across a wide variety of communication protocols. UTCP 1.0.0 introduces a modular core with a plugin-based architecture, making it more extensible, testable, and easier to package. |
| 11 | |
| 12 | In contrast to other protocols, UTCP places a strong emphasis on: |
| 13 | |
| 14 | * **Scalability**: UTCP is designed to handle a large number of tools and providers without compromising performance. |
| 15 | * **Extensibility**: A pluggable architecture allows developers to easily add new communication protocols, tool storage mechanisms, and search strategies without modifying the core library. |
| 16 | * **Interoperability**: With a growing ecosystem of protocol plugins (including HTTP, SSE, CLI, and more), UTCP can integrate with almost any existing service or infrastructure. |
| 17 | * **Ease of Use**: The protocol is built on simple, well-defined Pydantic models, making it easy for developers to implement and use. |
| 18 | |
| 19 | |
| 20 |  |
| 21 | |
| 22 | ## Repository Structure |
| 23 | |
| 24 | This repository contains the complete UTCP Python implementation: |
| 25 | |
| 26 | - **[`core/`](core/)** - Core `utcp` package with foundational components ([README](core/README.md)) |
| 27 | - **[`plugins/communication_protocols/`](plugins/communication_protocols/)** - Protocol-specific plugins: |
| 28 | - [`http/`](plugins/communication_protocols/http/) - HTTP/REST, SSE, streaming, OpenAPI ([README](plugins/communication_protocols/http/README.md)) |
| 29 | - [`cli/`](plugins/communication_protocols/cli/) - Command-line tools ([README](plugins/communication_protocols/cli/README.md)) |
| 30 | - [`mcp/`](plugins/communication_protocols/mcp/) - Model Context Protocol ([README](plugins/communication_protocols/mcp/README.md)) |
| 31 | - [`text/`](plugins/communication_protocols/text/) - File-based tools ([README](plugins/communication_protocols/text/README.md)) |
| 32 | - [`socket/`](plugins/communication_protocols/socket/) - TCP/UDP (🚧 In Progress) |
| 33 | - [`gql/`](plugins/communication_protocols/gql/) - GraphQL (🚧 In Progress) |
| 34 | |
| 35 | ## Architecture Overview |
| 36 | |
| 37 | UTCP uses a modular architecture with a core library and protocol plugins: |
| 38 | |
| 39 | ### Core Package (`utcp`) |
| 40 | |
| 41 | The [`core/`](core/) directory contains the foundational components: |
| 42 | - **Data Models**: Pydantic models for `Tool`, `CallTemplate`, `UtcpManual`, and `Auth` |
| 43 | - **Client Interface**: Main `UtcpClient` for tool interaction |
| 44 | - **Plugin System**: Extensible interfaces for protocols, repositories, and search |
| 45 | - **Default Implementations**: Built-in tool storage and search strategies |
| 46 | |
| 47 | ## Quick Start |
| 48 | |
| 49 | ### Installation |
| 50 | |
| 51 | Install the core library and any required protocol plugins: |
| 52 | |
| 53 | ```bash |
| 54 | # Install core + HTTP plugin (most common) |
| 55 | pip install utcp utcp-http |
| 56 | |
| 57 | # Install additional plugins as needed |
| 58 | pip install utcp-cli utcp-mcp utcp-text |
| 59 | ``` |
| 60 | |
| 61 | ### Basic Usage |
| 62 | |
| 63 | ```python |
| 64 | from utcp.utcp_client import UtcpClient |
| 65 | |
| 66 | # Create client with HTTP API |
| 67 | client = await UtcpClient.create(config={ |
| 68 | "manual_call_templates": [{ |
| 69 | "name": "my_api", |
| 70 | "call_template_type": "http", |
| 71 | "url": "https://api.example.com/utcp" |
| 72 | }] |
| 73 | }) |
| 74 | |
| 75 | # Call a tool |
| 76 | result = await client.call_tool("my_api.get_data", {"id": "123"}) |
| 77 | ``` |
| 78 | |
| 79 | ## Protocol Plugins |
| 80 | |
| 81 | UTCP supports multiple communication protocols through dedicated plugins: |
| 82 | |
| 83 | | Plugin | Description | Status | Documentation | |
| 84 | |--------|-------------|--------|- |