Python UTCP

v1.0.0โ€ขAPIsโ€ขstable

Official python implementation of UTCP. UTCP is an open standard that lets AI agents call any API directly, without extra middleware.

aiai-agentai-agent-toolsdeveloper-toolsllm
Share:
643
Stars
0
Downloads
0
Weekly
0/5

What is Python UTCP?

Python UTCP is a Model Context Protocol (MCP) server that allows AI assistants like Claude, Cursor, and VS Code to official python implementation of utcp. utcp is an open standard that lets ai agents call any api directly, without extra middleware.

Official python implementation of UTCP. UTCP is an open standard that lets AI agents call any API directly, without extra middleware.

This server falls under the APIs category on MCPgee, the world's largest MCP server directory with 33,000+ servers.

Features

  • Official python implementation of UTCP. UTCP is an open stan

Use Cases

AI agents call any API directly
No middleware required
Open standard for API access
LicenseMPL-2.0
Languagepython
Versionv1.0.0
UpdatedMay 10, 2026
Statushealthy
Maintenanceactive

Works with

ClaudeOpenAIwindowsmacoslinux

Installation

Manual Installation

npx python-utcp

Configuration

Configuration Details

Config File

claude_desktop_config.json

Performance

Response Metrics

Response Time< 200ms
ThroughputMedium

Resource Usage

Memory UsageLow
CPU UsageLow

How to Set Up and Use Python UTCP

Python UTCP is the official Python implementation of the Universal Tool Calling Protocol (UTCP), an open standard that lets AI agents call any API directly without extra middleware or custom server wrappers. It supports HTTP/REST (with automatic OpenAPI 2.0/3.0 ingestion), CLI commands, WebSocket, MCP, and text-based tool definitions through a unified plugin architecture. Developers use it to connect AI agents to real-world APIs in a standardized way, eliminating the need to write bespoke adapters for every integration.

Prerequisites

  • Python 3.9+ installed
  • pip for installing packages (utcp core and desired protocol plugins)
  • API credentials for the external services you plan to call (e.g., API keys)
  • An MCP client such as Claude Desktop, Cursor, or Claude Code to consume the server
1

Install the UTCP core and HTTP plugin

Install the utcp core package plus the communication-protocol plugin(s) you need. The HTTP plugin is the most common choice for REST APIs and includes automatic OpenAPI ingestion.

pip install utcp utcp-http
2

Install additional protocol plugins as needed

Install optional plugins for CLI commands, WebSocket, or MCP bridging depending on the APIs you want to expose to your AI agent.

pip install utcp-cli utcp-mcp utcp-text utcp-websocket
3

Create a UTCP client configuration

Define your API endpoints in a configuration object. Use the call_template_type field to select the protocol and authenticate via api_key, bearer, basic, or oauth2 auth types. Environment variables are substituted using ${VARIABLE_NAME} syntax.

from utcp.utcp_client import UtcpClient
import asyncio

async def main():
    client = await UtcpClient.create(config={
        "manual_call_templates": [{
            "name": "my_api",
            "call_template_type": "http",
            "url": "https://api.example.com/utcp",
            "auth": {
                "auth_type": "api_key",
                "api_key": "Bearer ${API_KEY}",
                "var_name": "Authorization",
                "location": "header"
            }
        }],
        "load_variables_from": [{
            "variable_loader_type": "dotenv",
            "env_file_path": ".env"
        }]
    })
    result = await client.call_tool("my_api.tool_name", {"param": "value"})
    print(result)

asyncio.run(main())
4

Ingest an OpenAPI spec automatically

Use the built-in OpenAPI converter to automatically turn any OpenAPI 2.0 or 3.0 specification into UTCP tools without modifying the target server.

from utcp_http.openapi_converter import OpenApiConverter
import json

with open("openapi.json") as f:
    openapi_spec = json.load(f)

converter = OpenApiConverter(openapi_spec)
manual = converter.convert()
# Pass `manual` into UtcpClient config as a manual_call_template
5

Expose tools to an MCP client

Install the utcp-mcp plugin and configure your MCP client to launch the UTCP bridge. The bridge translates MCP tool-call requests into UTCP calls and returns results in MCP format.

pip install utcp-mcp
6

Configure your MCP client

Add the UTCP MCP bridge to your MCP client configuration file, pointing it at your UTCP config and the API key environment variable.

Python UTCP Examples

Client configuration

Add the UTCP MCP bridge to Claude Desktop or another MCP client so AI agents can call APIs via UTCP.

{
  "mcpServers": {
    "utcp": {
      "command": "python",
      "args": ["-m", "utcp_mcp.server", "--config", "/path/to/utcp_config.json"],
      "env": {
        "API_KEY": "your-api-key-here"
      }
    }
  }
}

Prompts to try

Example prompts to use once UTCP is connected to your MCP client and pointed at a real API.

- "List all available tools from the connected API"
- "Call the search tool on my API with the query 'machine learning'"
- "Fetch the weather for New York using the weather API tool"
- "Use the REST API to create a new record with these fields: name=Test, status=active"

Troubleshooting Python UTCP

Variable substitution fails with KeyError for ${MY_VAR}

Ensure the .env file path in load_variables_from is correct and the variable name matches exactly (case-sensitive). Variables in named templates are namespaced as manual__name_VARIABLE_NAME with a double underscore.

Protocol restriction error when calling a tool from a different protocol type

By default a manual can only call tools of its own protocol type. Add the allowed_communication_protocols field to your config: {"allowed_communication_protocols": ["http", "cli", "mcp"]}.

OpenAPI ingestion skips some endpoints

Verify the spec is valid OpenAPI 2.0 or 3.0 JSON/YAML. The converter does not support OpenAPI 3.1 or custom extensions. Check that endpoint paths have operationId fields defined.

Frequently Asked Questions about Python UTCP

What is Python UTCP?

Python UTCP is a Model Context Protocol (MCP) server that official python implementation of utcp. utcp is an open standard that lets ai agents call any api directly, without extra middleware. It connects AI assistants to external tools and data sources through a standardized interface.

How do I install Python UTCP?

Follow the installation instructions on the Python UTCP GitHub repository. Clone the repo, install dependencies, and add the server config to your AI client.

Which AI clients work with Python UTCP?

Python UTCP works with all major MCP-compatible AI clients including Claude Desktop, Claude Code, Cursor, VS Code (GitHub Copilot), Windsurf, and Cline.

Is Python UTCP free to use?

Yes, Python UTCP is open source and available under the MPL-2.0 license. You can use it freely in both personal and commercial projects.

Browse More APIs MCP Servers

Explore all apis servers available in the MCPgee directory. Each server includes setup guides for Claude, Cursor, and VS Code.

Quick Config Preview

{ "mcpServers": { "python-utcp": { "command": "npx", "args": ["-y", "python-utcp"] } } }

Add this to your claude_desktop_config.json or .cursor/mcp.json

Read the full setup guide โ†’

Ready to use Python UTCP?

Browse our complete directory of 33,000+ MCP servers, read setup guides for your editor, and start building with the Model Context Protocol.

33,000+ ServersFree & Open SourceStep-by-Step Guides