本指南将详细介绍工具Hive的安装与使用方法,帮助你快速上手并充分利用其功能。
工具Hive是一款功能强大的工具,能帮助你高效运行MCP服务器等任务。下面将为你介绍其安装和基本使用方法。
通过以下命令可快速安装工具Hive:
curl -L https://github.com/stacklok/toolhive/releases/download/v0.1.0/toolhive-linux-amd64.gz | zcat > /usr/local/bin/toolhive && chmod +x /usr/local/bin/toolhive
工具Hive 支持通过以下命令运行 MCP 服务器:
toolhive run --transport stdio --name my-mcp-server --port 8080 ./mcp_server.py
或者使用协议方案直接运行:
toolhive run uvx://awslabs.core-mcp-server@latest
工具Hive 提供了基于 JSON 的权限配置文件,可以通过 --permission-profile
标志指定。例如:
{
"read": ["/var/run/mcp.sock"],
"write": ["/var/run/mcp.sock"],
"network": {
"outbound": {
"insecure_allow_all": false,
"allow_transport": ["tcp", "udp"],
"allow_host": ["localhost", "google.com"],
"allow_port": [80, 443]
}
}
}
工具Hive 支持在 Kubernetes 集群中部署 MCP 服务器。更多详细信息请参考: 使用 kind 集群运行工具Hive
工具Hive 支持通过协议方案直接运行从包管理器拉取的 MCP 服务器:
uvx://
:用于基于 Python 的 MCP 服务器npx://
:用于基于 Node.js 的 MCP 服务器go://
:用于基于 Go 的 MCP 服务器例如:
toolhive run go://github.com/example/go-mcp-server@latest
工具Hive 提供了丰富的高级功能,包括:
我们欢迎社区贡献!请参考 CONTRIBUTING.md 了解如何参与。
本项目采用 Apache 2.0 许可证。详细信息请参阅 LICENSE 文件。