能力标签
UTCP工具
🔌
MCP工具

UTCP工具

基于 Python · 让 AI 助手直接操作你的系统与工具
英文名:python-utcp
⭐ 644 Stars 🍴 45 Forks 💻 Python 📄 MPL-2.0 🏷 AI 8.0分
8.0AI 综合评分
mcpaiai-agentdeveloper-tools
✦ AI Skill Hub 推荐

UTCP工具 是 AI Skill Hub 本期精选MCP工具之一。综合评分 8.0 分,整体质量较高。我们强烈推荐将其纳入你的 AI 工具库,帮助提升工作效率。

📚 深度解析

UTCP工具 是一款基于 MCP(Model Context Protocol)标准协议的 AI 工具扩展。MCP 协议由 Anthropic 开发并开源,旨在建立 AI 模型与外部工具之间的标准化通信接口,目前已被 Claude Desktop、Claude Code、Cursor 等主流 AI 工具采纳。

通过安装 UTCP工具,你的 AI 助手将获得额外的工具调用能力,可以用自然语言直接操控该工具的功能,无需学习复杂的命令行语法。MCP 工具的核心价值在于"一次配置,永久增强"——配置完成后,每次与 AI 对话时都可以无缝调用这些工具。

在技术实现上,MCP 工具通过标准的 JSON-RPC 协议与 AI 客户端通信,工具的功能以"工具列表"的形式暴露给 AI 模型,AI 可以按需调用。UTCP工具 提供了结构化的工具调用接口,使 AI 模型能够精确地理解和使用每个功能点,显著降低 AI 在工具使用上的错误率。

与传统的 API 集成相比,MCP 工具的优势在于无需编写代码——用户只需在配置文件中添加几行 JSON,即可让 AI 获得全新能力。AI Skill Hub 将 UTCP工具 评为 AI 评分 8.0 分,属于同类工具中的优质选择。

📋 工具概览

UTCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

GitHub Stars
⭐ 644
开发语言
Python
支持平台
Windows / macOS / Linux
维护状态
正常维护,社区驱动
开源协议
MPL-2.0
AI 综合评分
8.0 分
工具类型
MCP工具
Forks
45

📖 中文文档

以下内容由 AI Skill Hub 根据项目信息自动整理,如需查看完整原始文档请访问底部「原始来源」。

UTCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。

📌 核心特色
  • 通过标准 MCP 协议与 Claude、Cursor 等主流 AI 客户端深度集成
  • 提供结构化工具调用接口,显著降低 AI 集成复杂度
  • 支持 Claude Desktop 和 Claude Code 无缝接入,开箱即用
  • 可与其他 MCP 工具组合叠加,构建完整 AI 工作站
  • 轻量无侵入设计,不影响现有系统架构
🎯 主要使用场景
  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站
以下安装命令基于项目开发语言和类型自动生成,实际以官方 README 为准。
安装命令
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/universal-tool-calling-protocol/python-utcp

# 方式二:手动配置 claude_desktop_config.json
{
  "mcpServers": {
    "utcp--": {
      "command": "npx",
      "args": ["-y", "python-utcp"]
    }
  }
}

# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
📋 安装步骤说明
  1. 确认已安装 Node.js(v18 或以上版本)
  2. 打开 Claude Desktop 或 Claude Code 的 MCP 配置文件
  3. 按「交给 Agent 安装 → Claude Desktop」标签中的 JSON 配置填入 mcpServers 字段
  4. 保存配置文件并重启 Claude 客户端
  5. 重启后,在对话中即可使用本工具
以下用法示例由 AI Skill Hub 整理,涵盖最常见的使用场景。
常用命令 / 代码示例
# 安装后在 Claude 对话中直接使用
# 示例:
用户: 请帮我用 UTCP工具 执行以下任务...
Claude: [自动调用 UTCP工具 MCP 工具处理请求]

# 查看可用工具列表
# 在 Claude 中输入:"列出所有可用的 MCP 工具"
以下配置示例基于典型使用场景生成,具体参数请参照官方文档调整。
配置示例
// claude_desktop_config.json 配置示例
{
  "mcpServers": {
    "utcp__": {
      "command": "npx",
      "args": ["-y", "python-utcp"],
      "env": {
        // "API_KEY": "your-api-key-here"
      }
    }
  }
}

// 保存后重启 Claude Desktop 生效
📑 README 深度解析 真实文档 完整度 75/100 查看 GitHub 原文 →
以下内容由系统直接从 GitHub README 解析整理,保留代码块、表格与列表结构。

Universal Tool Calling Protocol (UTCP)

Follow Org PyPI Downloads License CDTM S23

Introduction

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.

In contrast to other protocols, UTCP places a strong emphasis on:

  • Scalability: UTCP is designed to handle a large number of tools and providers without compromising performance.
  • Extensibility: A pluggable architecture allows developers to easily add new communication protocols, tool storage mechanisms, and search strategies without modifying the core library.
  • Interoperability: With a growing ecosystem of protocol plugins (including HTTP, SSE, CLI, and more), UTCP can integrate with almost any existing service or infrastructure.
  • Ease of Use: The protocol is built on simple, well-defined Pydantic models, making it easy for developers to implement and use.

MCP vs. UTCP

Architecture Overview

UTCP uses a modular architecture with a core library and protocol plugins:

[Contributors](https://www.utcp.io/about)

Install the core package in editable mode with dev dependencies

pip install -e "core[dev]"

Ensure you have installed all dev dependencies

python -m pytest


To run tests for a specific package (e.g., the core library):
bash python -m pytest core/tests/

To run tests for a specific plugin (e.g., HTTP):
bash python -m pytest plugins/communication_protocols/http/tests/ -v

To run tests with coverage:
bash python -m pytest --cov=utcp --cov-report=xml ```

Installation

Install the core library and any required protocol plugins:

```bash

Install core + HTTP plugin (most common)

pip install utcp utcp-http

Install additional plugins as needed

pip install utcp-cli utcp-mcp utcp-text ```

Install a specific protocol plugin in editable mode

pip install -e plugins/communication_protocols/http ```

Build

The build process now involves building each package (core and plugins) separately if needed, though they are published to PyPI independently.

  1. Create and activate a virtual environment.
  2. Install build dependencies: pip install build.
  3. Navigate to the package directory (e.g., cd core).
  4. Run the build: python -m build.
  5. The distributable files (.whl and .tar.gz) will be in the dist/ directory.

Quick Start

Basic Usage

```python from utcp.utcp_client import UtcpClient

Migration Guide from 0.x to 1.0.0

Version 1.0.0 introduces several breaking changes. Follow these steps to migrate your project.

1. Update Dependencies: Install the new utcp core package and the specific protocol plugins you use (e.g., utcp-http, utcp-cli). 2. Configuration: Configuration Object: UtcpClient is initialized with a UtcpClientConfig object, dict or a path to a JSON file containing the configuration. Manual Call Templates: The providers_file_path option is removed. Instead of a file path, you now provide a list of manual_call_templates directly within the UtcpClientConfig. Terminology: The term provider has been replaced with call_template, and provider_type is now call_template_type. Streamable HTTP: The call_template_type http_stream has been renamed to streamable_http. 3. Update Imports: Change your imports to reflect the new modular structure. For example, from utcp.client.transport_interfaces.http_transport import HttpProvider becomes from utcp_http.http_call_template import HttpCallTemplate. 4. Tool Search: If you were using the default search, the new strategy is TagAndDescriptionWordMatchStrategy. This is the new default and requires no changes unless you were implementing a custom strategy. 5. Tool Naming: Tool names are now namespaced as manual_name.tool_name. The client handles this automatically. 6. Variable Substitution Namespacing: Variables that are substituted in different call_templates, are first namespaced with the name of the manual with the _ duplicated. So a key in a tool call template called API_KEY from the manual manual_1 would be converted to manual__1_API_KEY.

Usage Examples

3. Full examples

You can find full examples in the examples repository.

Call Template Configuration Examples

Configuration examples for each protocol. Remember to replace provider_type with call_template_type.

Quick Start with OpenAPI

```python from utcp_http.openapi_converter import OpenApiConverter import aiohttp

JSON Configuration

{
  "name": "my_api",
  "call_template_type": "http",
  "url": "https://api.example.com/utcp",
  "allowed_communication_protocols": ["http", "cli", "mcp"]
}

Or use UTCP Client configuration for automatic detection

from utcp.utcp_client import UtcpClient

client = await UtcpClient.create(config={ "manual_call_templates": [{ "name": "github", "call_template_type": "http", "url": "https://api.github.com/openapi.json", "auth_tools": { # Authentication for generated tools requiring auth "auth_type": "api_key", "api_key": "Bearer ${GITHUB_TOKEN}", "var_name": "Authorization", "location": "header" } }] }) ```

Create client with HTTP API

client = await UtcpClient.create(config={ "manual_call_templates": [{ "name": "my_api", "call_template_type": "http", "url": "https://api.example.com/utcp" }] })

The discovery endpoint returns the tool manual

@app.get("/utcp") def utcp_discovery(): return UtcpManual.create_from_decorators(manual_version="1.0.0")

The actual tool endpoint

@utcp_tool(tool_call_template=HttpCallTemplate( name="get_weather", url=f"https://example.com/api/weather", http_method="GET" ), tags=["weather"]) @app.get("/api/weather") def get_weather(location: str): return {"temperature": 22.5, "conditions": "Sunny"}



No UTCP dependencies server version:
python from fastapi import FastAPI

app = FastAPI()

The discovery endpoint returns the tool manual

@app.get("/utcp") def utcp_discovery(): return { "manual_version": "1.0.0", "utcp_version": "1.0.2", "tools": [ { "name": "get_weather", "description": "Get current weather for a location", "tags": ["weather"], "inputs": { "type": "object", "properties": { "location": {"type": "string"} } }, "outputs": { "type": "object", "properties": { "temperature": {"type": "number"}, "conditions": {"type": "string"} } }, "tool_call_template": { "call_template_type": "http", "url": "https://example.com/api/weather", "http_method": "GET" } } ] }

The actual tool endpoint

@app.get("/api/weather") def get_weather(location: str): return {"temperature": 22.5, "conditions": "Sunny"} ```

CLI Call Template

{
  "name": "multi_step_cli_tool",
  "call_template_type": "cli", // Required
  "commands": [ // Required - sequential command execution
    {
      "command": "git clone UTCP_ARG_repo_url_UTCP_END temp_repo",
      "append_to_final_output": false
    },
    {
      "command": "cd temp_repo && find . -name '*.py' | wc -l"
      // Last command output returned by default
    }
  ],
  "env_vars": { // Optional
    "GIT_AUTHOR_NAME": "UTCP Bot",
    "API_KEY": "${MY_API_KEY}"
  },
  "working_dir": "/tmp", // Optional
  "auth": null // Optional (always null for CLI)
}

CLI Protocol Features: - Multi-command execution: Commands run sequentially in single subprocess - Cross-platform: PowerShell on Windows, Bash on Unix/Linux/macOS - State preservation: Directory changes (cd) persist between commands - Argument placeholders: UTCP_ARG_argname_UTCP_END format - Output referencing: Access previous outputs with $CMD_0_OUTPUT, $CMD_1_OUTPUT - Flexible output control: Choose which command outputs to include in final result

This manual can register/call both HTTP and CLI tools

multi_protocol_manual = HttpCallTemplate( name="flexible_manual", call_template_type="http", url="https://api.example.com/utcp", allowed_communication_protocols=["http", "cli"] # Explicitly allow both ) ```

Raises ValueError: Tool 'my_api.some_cli_tool' uses communication protocol 'cli'

which is not allowed by manual 'my_api'. Allowed protocols: ['http']

await client.call_tool("my_api.some_cli_tool", {"arg": "value"}) ```

OpenAPI Ingestion - Zero Infrastructure Tool Integration

🚀 Transform any existing REST API into UTCP tools without server modifications!

UTCP's OpenAPI ingestion feature automatically converts OpenAPI 2.0/3.0 specifications into UTCP tools, enabling AI agents to interact with existing APIs directly - no wrapper servers, no API changes, no additional infrastructure required.

Convert any OpenAPI spec to UTCP tools

async def convert_api(): async with aiohttp.ClientSession() as session: async with session.get("https://api.github.com/openapi.json") as response: openapi_spec = await response.json() converter = OpenApiConverter(openapi_spec) manual = converter.convert() print(f"Generated {len(manual.tools)} tools from GitHub API!") return manual

Core Package (`utcp`)

The core/ directory contains the foundational components: - Data Models: Pydantic models for Tool, CallTemplate, UtcpManual, and Auth - Client Interface: Main UtcpClient for tool interaction - Plugin System: Extensible interfaces for protocols, repositories, and search - Default Implementations: Built-in tool storage and search strategies

Protocol Plugins

UTCP supports multiple communication protocols through dedicated plugins:

PluginDescriptionStatusDocumentation
[utcp-http](plugins/communication_protocols/http/)HTTP/REST APIs, SSE, streaming✅ Stable[HTTP Plugin README](plugins/communication_protocols/http/README.md)
[utcp-cli](plugins/communication_protocols/cli/)Command-line tools✅ Stable[CLI Plugin README](plugins/communication_protocols/cli/README.md)
[utcp-mcp](plugins/communication_protocols/mcp/)Model Context Protocol✅ Stable[MCP Plugin README](plugins/communication_protocols/mcp/README.md)
[utcp-text](plugins/communication_protocols/text/)Local file-based tools✅ Stable[Text Plugin README](plugins/communication_protocols/text/README.md)
[utcp-websocket](plugins/communication_protocols/websocket/)WebSocket real-time bidirectional communication✅ Stable[WebSocket Plugin README](plugins/communication_protocols/websocket/README.md)
[utcp-socket](plugins/communication_protocols/socket/)TCP/UDP protocols🚧 In Progress[Socket Plugin README](plugins/communication_protocols/socket/README.md)
[utcp-gql](plugins/communication_protocols/gql/)GraphQL APIs🚧 In Progress[GraphQL Plugin README](plugins/communication_protocols/gql/README.md)

For development, you can install the packages in editable mode from the cloned repository:

```bash

Protocol Lifetime: Shared vs. Per-Client Instances

A protocol plugin registers itself in one of two registries, and the choice decides who its state belongs to.

An instance registered with register_communication_protocol is shared by every UtcpClient in the process, and so is any state it keeps. That is right for state that is meant to be shared — a credential cache, a registry a decorator writes into — and wrong for state that belongs to one client. A shared instance lives as long as the process; no client closes it.

A protocol whose state must not be shared between clients registers a factory instead: live sessions or connections keyed per manual, child processes — anything one client's use or close() would take away from another. Each UtcpClient calls the factory once — at creation, or on first use if it was registered later — so each client gets its own instance, its own connections, and its own teardown on close():

from utcp.plugins.discovery import register_communication_protocol_factory

register_communication_protocol_factory("custom_type", CustomCommunicationProtocol)

This is what makes "a client per tenant / per user / per pooled connection" actually isolate them, rather than every client reaching into one shared instance. A type registered as a factory wins over the same type registered as an instance, so a plugin migrates by moving its registration from one call to the other and callers change nothing.

utcp-mcp and utcp-websocket register this way — MCP sessions (and, for stdio, child processes) and per-manual WebSocket connections belong to the client that opened them. utcp-http (HTTP, SSE, streamable HTTP) and utcp-gql stay shared instances: the only state they keep is an OAuth token cache, which is meant to be reused across clients; every request opens its own session.

client.close() closes the instances the client created — every one of them, even if one fails, after which the failures are raised together as UtcpProtocolCloseError. If UtcpClient.create fails after creating them, they are closed the same way before the error is re-raised.

🇨🇳 中文文档镜像 AI 翻译 2026-06-28
英文原文章节由系统翻译为中文摘要,便于快速理解。完整原文见上方 "📑 README 深度解析"。
📌 简介

Universal Tool Calling Protocol (UTCP) 是一个安全且具备高扩展性的标准协议,旨在定义并实现跨多种通信协议的工具交互。UTCP 1.0.0 版本引入了全新的模块化核心与基于插件的架构,使其在可扩展性、可测试性以及打包便捷性方面表现卓越,能够轻松应对复杂的工具调用场景。

📋 环境依赖

在进行开发或测试前,请确保已安装所有必要的开发依赖。对于核心库的开发,建议使用可编辑模式安装 core 包。项目内置了完善的测试套件,支持使用 pytest 对 core 库或特定的插件(如 HTTP 插件)进行针对性的单元测试,以确保代码质量。

🛠 安装步骤(Docker/pip/源码)

你可以通过 pip 安装 UTCP 核心库及所需的协议插件。对于最常见的场景,请安装核心包与 HTTP 插件:`pip install utcp utcp-http`。此外,根据需求,你还可以安装 `utcp-cli`、`utcp-mcp` 或 `utcp-text` 等扩展插件来增强功能。

🚀 使用教程

本项目已完成从 0.x 到 1.0.0 版本的重大升级。开发者在迁移时需注意:首先更新依赖以安装新的 `utcp` 核心包及对应的协议插件;其次,`UtcpClient` 的初始化方式已更改,现在需要通过 `UtcpClientConfig` 对象、字典或 JSON 文件路径进行配置,以实现自动检测与安全调用。

⚙️ 配置说明(含 MCP / env)

UTCP 支持通过 JSON 文件进行配置,你可以定义工具名称、调用模板类型(如 http)以及允许的通信协议(如 http, cli, mcp)。此外,`UtcpClient` 也支持通过 `manual_call_templates` 进行手动配置,并能通过 `auth_tools` 安全地处理 API Key 等身份验证信息。

🔌 API 说明

UTCP 提供了强大的 API 支持。你可以通过 `UtcpClient.create` 结合配置快速创建客户端。服务端可以通过装饰器 `@utcp_tool` 轻松将现有的 API 接口转换为符合 UTCP 标准的工具,并利用 `UtcpManual` 自动生成工具说明文档,实现工具的自动发现与调用。

🔄 工作流/模块

项目采用模块化设计:`core` 目录包含基础组件,包括基于 Pydantic 的 Data Models(如 Tool, CallTemplate)、核心客户端接口 `UtcpClient` 以及可扩展的插件系统;通过 Protocol Plugins 机制,UTCP 可以支持多种通信协议,例如通过 `utcp-http` 插件实现对 HTTP/REST APIs 和 SSE 流式传输的支持。

🎯 aiskill88 AI 点评 A 级 2026-06-24

高质量的开源MCP工具,实现UTCP标准

📚 实用指南(长尾问题)
适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • Python 依赖冲突:建议用 venv / uv 隔离环境
部署方案
  • 云端托管:可放在 Vercel / Railway / Fly.io 等 PaaS 平台
相关搜索
python-utcp 中文教程python-utcp 安装报错怎么办python-utcp MCP 配置python-utcp Agent 工作流python-utcp 与同类工具对比python-utcp 最佳实践python-utcp 适合谁用

⚡ 核心功能

👥 适合谁
  • 需要让 Claude / Cursor 操作本地工具的 AI 工程师
  • 构建多智能体协作系统的 Agent 开发者
⭐ 最佳实践
  • 配置 MCP 服务器时建议使用 stdio 传输 + JSON-RPC,避免暴露公网
  • Agent 任务先做 dry-run 验证工具调用链,再开启自主执行
⚠️ 常见错误
  • API key 直接提交到 git 仓库(请用 .env 并加入 .gitignore)
  • MCP 配置路径拼错或权限不足,重启 Claude Desktop 才生效
  • Python 依赖冲突:建议用 venv / uv 隔离环境

👥 适合人群

Claude Desktop / Claude Code 用户AI 工具开发者需要扩展 AI 能力的专业人士自动化工程师

🎯 使用场景

  • 在 Claude Desktop 对话中直接调用本地工具,实现 AI 与系统的深度联动
  • 通过自然语言驱动复杂的多步骤自动化任务,代替繁琐手动操作
  • 将多个 MCP 工具组合使用,构建个人专属 AI 工作站

⚖️ 优点与不足

✅ 优点
  • +MPL-2.0 协议,可免费商用
  • +标准化 MCP 协议,生态互联性强
  • +与 Claude 官方生态无缝对接
  • +即插即用,配置简单快捷
⚠️ 不足
  • −依赖 Claude 客户端,非 Claude 用户无法使用
  • −MCP 协议仍在持续演进,接口可能变更
  • −需要一定的配置步骤
⚠️ 使用须知

AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。

建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。

📄 License 说明

✅ MPL 2.0 — 文件级 Copyleft,修改的文件需开源,但可与闭源代码结合使用。

🔗 相关工具推荐

📚 相关教程推荐
📰 相关 AI 新闻
🍿 AI 圈相关吃瓜
🗺️ 相关解决方案
🧩 你可能还需要
基于当前 Skill 的能力图谱,自动补全的工具组合

❓ 常见问题 FAQ

python-utcp 是一款Python开发的AI辅助工具。开源MCP工具:Official python implementation of UTCP. UTCP is an open standard that lets AI ag。⭐644 · Python 主要应用场景包括:AI代理开发。
💡 AI Skill Hub 点评

经综合评估,UTCP工具 在MCP工具赛道中表现稳健,质量优秀。如果你已有明确的使用需求,可以直接上手体验;如果还在评估阶段,建议对比同类工具后再做决策。

⬇️ 获取与下载
⬇ 下载源码 ZIP

✅ MPL-2.0 协议 · 可免费商用 · 直接从 aiskill88 服务器下载,无需跳转 GitHub

📚 深入学习 UTCP工具
查看分步骤安装教程和完整使用指南,快速上手这款工具
🌐 原始信息
原始名称 python-utcp
原始描述 开源MCP工具:Official python implementation of UTCP. UTCP is an open standard that lets AI ag。⭐644 · Python
Topics mcpaiai-agentdeveloper-tools
GitHub https://github.com/universal-tool-calling-protocol/python-utcp
License MPL-2.0
语言 Python
🔗 原始来源
🐙 GitHub 仓库  https://github.com/universal-tool-calling-protocol/python-utcp 🌐 官方网站  https://www.utcp.io/

收录时间:2026-06-24 · 更新时间:2026-06-26 · License:MPL-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。

📺 订阅 AI Skill Hub Daily Telegram 频道
每天 8 条精选 AI Skill、MCP、Agent 与自动化工具推送
加入频道 →