Back to MCP directory
publicPublicdnsLocal runtime

utilities-box-mcp-server

一个提供多种实用工具的MCP服务器,包括时间管理、系统信息和网络工具等功能。

article

README

🚀 基于gRPC协议的MCP(微服务控制协议)工具集

本工具集基于gRPC协议,提供了一系列实用工具,可用于实现微服务和全双工通信,助力微服务开发与通信。

🚀 快速开始

本工具集提供了一组实用工具,用于实现微服务和全双工通信。以下是可用的MCP工具:

  1. 计算器工具
  2. 睡眠工具
  3. 生成UUID工具

✨ 主要特性

计算器工具

  • 允许用户在表达式中使用变量进行数值计算。
  • 支持加法、减法、乘法和除法等基本操作。

睡眠工具

  • 使服务器在指定的时间段内暂停执行。

生成UUID工具

  • 用于生成指定数量和版本的UUID(通用唯一标识符)。
  • 默认生成一个版本4的随机UUID。

💻 使用示例

计算器工具

基础用法

# 本地运行计算器服务
python calculator_server.py

# 客户端调用计算器服务进行计算
result = calculator_service.evaluate(expression="2 + 3", variables={})
print(f"结果: {result}")

睡眠工具

基础用法

# 本地运行睡眠服务
python sleep_server.py

# 客户端调用睡眠服务
response = sleep_service.sleep(time_value=5, time_unit="seconds")
print(response.message)

生成UUID工具

基础用法

# 本地运行生成UUID服务
python uuid_server.py

# 客户端调用生成UUID服务
uuids = uuid_service.generate_uuid(count=5, version="v4")
print(uuids)

🔧 技术细节

所有工具在出现错误时都会抛出相应的异常:

  • 计算器工具:如果表达式无效或变量不正确,将抛出ValueError
  • 睡眠工具:如果时间值非正或单位无效,将抛出ValueError
  • 生成UUID工具:如果版本无效或缺少命名空间/名称参数(对于v3和v5),将抛出ValueError

请参考每个工具的文档以获取更多详细信息。

help

Runtime guide

cloud

Hosted runtime

Hosted servers run from a provider-managed environment. You usually connect the MCP client to the hosted endpoint or follow the provider's authorization flow, without keeping a local process alive

  1. Open provider connection page
  2. Authorize or copy endpoint
  3. Connect from your MCP client
terminal

Local runtime / other methods

Local servers run on your own machine or infrastructure. You normally copy the server_config into your MCP client, install the required package, and provide env variables from env_schema when needed

  1. Copy server_config
  2. Install required package
  3. Fill env variables and restart client