AI Skill Hub 强烈推荐:UTCP工具 是一款优质的MCP工具。AI 综合评分 8.0 分,在同类工具中表现稳健。如果你正在寻找可靠的MCP工具解决方案,这是一个值得深入了解的选择。
UTCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
UTCP工具 是一款遵循 MCP(Model Context Protocol)标准协议的 AI 工具扩展。通过 MCP 协议,它可以让 Claude、Cursor 等主流 AI 客户端直接访问和操作外部工具、数据源和服务,实现 AI 能力的无缝扩展。无论是文件操作、数据库查询还是 API 调用,都可以通过自然语言在 AI 对话中直接触发,极大提升生产效率。
# 方式一:通过 Claude Code CLI 一键安装
claude skill install https://github.com/universal-tool-calling-protocol/go-utcp
# 方式二:手动配置 claude_desktop_config.json
{
"mcpServers": {
"utcp--": {
"command": "npx",
"args": ["-y", "go-utcp"]
}
}
}
# 配置文件位置
# macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
# Windows: %APPDATA%/Claude/claude_desktop_config.json
# 安装后在 Claude 对话中直接使用 # 示例: 用户: 请帮我用 UTCP工具 执行以下任务... Claude: [自动调用 UTCP工具 MCP 工具处理请求] # 查看可用工具列表 # 在 Claude 中输入:"列出所有可用的 MCP 工具"
// claude_desktop_config.json 配置示例
{
"mcpServers": {
"utcp__": {
"command": "npx",
"args": ["-y", "go-utcp"],
"env": {
// "API_KEY": "your-api-key-here"
}
}
}
}
// 保存后重启 Claude Desktop 生效

go-utcp is the Go implementation of the Universal Tool Calling Protocol (UTCP). It provides a single client-side abstraction for discovering, describing, searching, invoking, and streaming tools exposed through heterogeneous providers and transports.
The project is designed for applications that need to connect an agent, service, workflow engine, or automation runtime to many kinds of tools without coupling application logic to every transport individually.
Application code should not have to understand every transport implementation.
.env loading.Check the module and examples for transport-specific requirements before deploying a particular provider.
Install the library with:
go get github.com/universal-tool-calling-protocol/go-utcp@latest
Then import it from Go:
import utcp "github.com/universal-tool-calling-protocol/go-utcp"
CodeMode is available under its plugin package:
import "github.com/universal-tool-calling-protocol/go-utcp/src/plugins/codemode"
The smallest useful example can use a local text provider, so no external server is required.
Create providers.json:
{
"providers": [
{
"provider_type": "text",
"name": "greetings",
"templates": {
"hello": "Hello, {{.name}}!"
}
}
]
}
Create a Go program:
package main
import (
"context"
"fmt"
"log"
utcp "github.com/universal-tool-calling-protocol/go-utcp"
)
func main() {
ctx := context.Background()
client, err := utcp.NewUTCPClient(ctx, &utcp.UtcpClientConfig{
ProvidersFilePath: "providers.json",
}, nil, nil)
if err != nil {
log.Fatal(err)
}
tools, err := client.SearchTools("", 10)
if err != nil {
log.Fatal(err)
}
for _, tool := range tools {
fmt.Printf("%s: %s\n", tool.Name, tool.Description)
}
result, err := client.CallTool(ctx, "greetings.hello", map[string]any{
"name": "UTCP",
})
if err != nil {
log.Fatal(err)
}
fmt.Println(result)
}
Run it with:
go run .
The important detail is the qualified tool name:
<provider>.<tool>
For the example above:
greetings.hello
Provider qualification prevents ambiguous tool names when several providers expose tools with the same local name.
import "github.com/universal-tool-calling-protocol/go-utcp/src/plugins/codemode"
cm := codemode.NewCodeModeUTCP(client, nil)
result, err := cm.Execute(ctx, codemode.CodeModeArgs{
Code: `
value, err := codemode.CallTool("greetings.hello", map[string]any{
"name": "CodeMode",
})
if err != nil {
__out = err
return
}
__out = value
`,
Timeout: 5_000,
})
The exact sandbox restrictions and supported language surface are implementation details and should be checked against the current CodeMode package.
The examples directory contains standalone examples for providers and transports.
A typical example can be run from its own directory:
cd examples/text_client
GOWORK=off go run -mod=mod .
The GOWORK=off setting is useful when an example is maintained as its own Go module and should use its own dependency graph.
Examples cover patterns such as:
Always inspect the example's local README or source before running a network example because some examples expect a local service to be running.
The examples directory is intentionally part of the documentation surface. When behavior changes, examples should be updated if their assumptions no longer match the implementation.
A good example should:
CodeMode lets a constrained Go-like program compose multiple tool calls in one execution. This is useful when an agent needs loops, branching, transformation, or multi-step orchestration.
CodeMode provides a controlled execution environment for composing multiple registered tool calls.
The motivation is simple: an agent sometimes needs more than one independent tool invocation. It may need to:
Doing every intermediate step through separate model round trips can be expensive. CodeMode moves some orchestration into a constrained program.
CodeMode snippets can use helpers including:
codemode.CallTool.codemode.CallToolStream.codemode.SearchTools.The resulting CodeModeResult contains the produced value and captured output streams.
Without CodeMode, an agent may need to repeatedly request a tool, wait for a result, send the result back to the model, and request the next tool. CodeMode can reduce this orchestration overhead for deterministic multi-step logic.
CodeMode should not be treated as unrestricted host execution. Tool access should remain bounded by the registered provider and the CodeMode execution policy.
Applications embedding CodeMode should carefully define:
No. CodeMode is an optional plugin for applications that need programmatic multi-tool composition.
CodeMode should have explicit tool and execution boundaries.
ProvidersFilePath can point at a JSON document. The loader accepts several root shapes.
For small applications, a single providers.json file can be sufficient.
For larger deployments, consider generating or assembling provider configuration from:
Keep the distinction between configuration and credentials clear.
A provider definition should describe how a capability is reached. A secret manager should provide sensitive values needed to authenticate to it.
Check:
$NAME versus ${NAME} syntax.Variables configuration..env path.Do not print secret values while debugging.
| Method | Purpose |
|---|---|
RegisterToolProvider | Discover and store tools from a provider. |
DeregisterToolProvider | Remove a provider and its tools. |
SearchTools | Search registered tools. |
CallTool | Invoke a tool synchronously. |
CallToolStream | Invoke a streaming tool. |
GetTransports | Access registered transport implementations. |
The Go API may grow as UTCP evolves. For the authoritative signatures and types, use the package documentation on pkg.go.dev and the source tree.
The HTTP integration can discover tools from OpenAPI-backed services.
OpenAPI is useful when an existing API already describes operations, parameters, request bodies, and responses through a machine-readable specification.
A practical integration flow is:
OpenAPI document
|
v
HTTP provider
|
v
UTCP discovery
|
v
Tool metadata
|
v
Agent / application
When using OpenAPI discovery, keep the generated tool surface intentionally scoped. Large APIs can expose hundreds of operations, and applications may benefit from selecting only the operations required by a particular workflow.
Check:
For production workloads, prefer narrowly defined commands over arbitrary shell execution.
A compact application generally needs only four steps:
ctx := context.Background()
client, err := utcp.NewUTCPClient(ctx, config, nil, nil)
if err != nil {
return err
}
tools, err := client.SearchTools("", 10)
if err != nil {
return err
}
_ = tools
result, err := client.CallTool(ctx, "provider.tool", map[string]any{})
if err != nil {
return err
}
_ = result
This is the core mental model of go-utcp: configure providers, discover tools, select a tool, and call it.
Network-backed integrations should be tested with deterministic local servers where possible.
Tests should cover:
Use the repository's declared Go version and module dependencies. Avoid introducing unnecessary dependencies for functionality that can be implemented with the standard library or existing project abstractions.
go-utcp can act as the tool layer underneath an agent runtime.
A common architecture is:
User
|
v
Agent
|
Tool selection
|
v
go-utcp
|
+------------+-------------+
| | |
HTTP MCP gRPC
| | |
v v v
Service Server Service
The agent can search available tools rather than hard-coding every integration.
The library should feel natural in Go applications, using contexts, errors, interfaces, maps, and standard tooling.
Before exposing a tool to an autonomous caller, ask:
These questions are especially important for filesystem, shell, database, deployment, billing, and administrative tools.
高质量的MCP工具,Go语言实现
AI Skill Hub 为第三方内容聚合平台,本页面信息基于公开数据整理,不对工具功能和质量作任何法律背书。
建议在沙箱或测试环境中充分验证后,再部署至生产环境,并做好必要的安全评估。
✅ MPL 2.0 — 文件级 Copyleft,修改的文件需开源,但可与闭源代码结合使用。
总体来看,UTCP工具 是一款质量优秀的MCP工具,在同类工具中具备一定竞争力。AI Skill Hub 将持续追踪其更新动态,建议收藏备用,结合自身场景选择合适时机引入使用。
| 原始名称 | go-utcp |
| 原始描述 | 开源MCP工具: Official Go implementation of the UTCP 。⭐119 · Go |
| Topics | mcpaigolang |
| GitHub | https://github.com/universal-tool-calling-protocol/go-utcp |
| License | MPL-2.0 |
| 语言 | Go |
收录时间:2026-07-13 · 更新时间:2026-07-13 · License:MPL-2.0 · AI Skill Hub 不对第三方内容的准确性作法律背书。
选择 Agent 类型,复制安装指令后粘贴到对应客户端