Installation
Relevant source files
The following files were used as context for generating this wiki page:- README.md
- core/README.md
- plugins/communication_protocols/http/pyproject.toml
- plugins/communication_protocols/cli/README.md
- plugins/communication_protocols/mcp/README.md
- plugins/communication_protocols/text/README.md
- plugins/communication_protocols/websocket/README.md
- CLAUDE.md
- plugins/communication_protocols/text/pyproject.toml
- plugins/communication_protocols/mcp/pyproject.toml
- plugins/communication_protocols/gql/pyproject.toml
The Universal Tool Calling Protocol (UTCP) for Python is designed with a modular, plugin-based architecture. Installation involves installing the core utcp library and then adding one or more protocol-specific plugins based on your needs. This approach keeps the core library lightweight and allows users to only install the components they require.
This document covers two primary installation methods: standard installation from PyPI for end-users and development installation from the source repository for contributors.
Sources: README.md:13-19, core/README.md:13-19
Standard Installation (from PyPI)
The standard installation method uses pip to install packages from the Python Package Index (PyPI). You must install the core utcp package, and then install the package for each communication protocol you intend to use.
Sources: README.md:55-63, core/README.md:55-63
Installation Steps
The following diagram illustrates the modular installation process.
This diagram shows that the utcp core package is the foundation, with various protocol plugins installed on top of it.
Sources: README.md:58-62
Core Library
First, install the core utcp package.
pip install utcp
Sources: README.md:59
Protocol Plugins
After installing the core library, install the required protocol plugins. Each plugin is a separate package on PyPI.
| Plugin | PyPI Package | Status | Installation Command |
|---|---|---|---|
| HTTP | utcp-http | ✅ Stable | pip install utcp-http |
| CLI | utcp-cli | ✅ Stable | pip install utcp-cli |
| MCP | utcp-mcp | ✅ Stable | pip install utcp-mcp |
| Text | utcp-text | ✅ Stable | pip install utcp-text |
| WebSocket | utcp-websocket | ✅ Stable | pip install utcp-websocket |
| Socket | utcp-socket | 🚧 In Progress | N/A |
| GraphQL | utcp-gql | 🚧 In Progress | pip install utcp-gql |
You can install the core package and plugins in a single command. For example, to install the core library with the HTTP and CLI plugins:
# Install core + HTTP plugin (most common)
pip install utcp utcp-http
# Install additional plugins as needed
pip install utcp-cli utcp-mcp utcp-text
Sources: README.md:58-62, README.md:70-78, plugins/communication_protocols/http/README.md:17, plugins/communication_protocols/cli/README.md:17, plugins/communication_protocols/mcp/README.md:17, plugins/communication_protocols/text/README.md:17, plugins/communication_protocols/websocket/README.md:27
Dependencies
Each plugin package explicitly depends on the core utcp package. This ensures that installing a plugin will also automatically install the correct version of the core library if it's not already present.
The diagram below shows the dependency relationship between the core package and several plugins.
This dependency structure is defined in each plugin's pyproject.toml file. For example, the utcp-http plugin lists utcp>=1.0 as a dependency.
Sources: plugins/communication_protocols/http/pyproject.toml:13, plugins/communication_protocols/mcp/pyproject.toml:12, plugins/communication_protocols/text/pyproject.toml:13
Development Installation (from Source)
For developers contributing to python-utcp or needing the latest unreleased changes, installation from the source code is recommended. This involves cloning the repository and installing packages in "editable" mode.
Sources: README.md:80-88, CLAUDE.md:12-16
Setup Flow
The typical development setup follows these steps:
Sources: CLAUDE.md:12-16, README.md:81-88
Step-by-Step Commands
-
Clone the repository:
git clone https://github.com/universal-tool-calling-protocol/python-utcp.git cd python-utcpSources: README.md:82-83
-
Create and activate a virtual environment:
# Example using conda conda create --name utcp python=3.10 conda activate utcpSources: CLAUDE.md:13-14
-
Install the core package in editable mode:
This command installs the core package and its development dependencies (pytest,build, etc.).pip install -e "core[dev]"Sources: README.md:86, core/README.md:86
-
Install specific protocol plugins in editable mode:
Navigate to the plugin's directory to install it.pip install -e plugins/communication_protocols/httpSources: README.md:88, core/README.md:88
Build Process
To build distributable files (.whl and .tar.gz) from the source, you can use the build package. The build process is handled separately for each package (core and each plugin).
- Install build dependencies:
pip install build. - Navigate to the package directory (e.g.,
cd core). - Run the build:
python -m build. - The distributable files will be created in the
dist/directory.
Sources: README.md:437-446, CLAUDE.md:18