一个提供系统工具集的 Model Context Protocol (MCP) 服务器,包含系统信息查询、时间查询、数学计算和 UUID 生成功能。
| 工具 | 描述 |
|---|---|
get_system_info |
获取详细的系统信息(操作系统、CPU、内存、网络) |
get_current_time |
获取当前时间,支持时区和格式选项 |
calculate |
执行数学计算,支持常用数学函数 |
generate_uuid |
生成 UUID v4 标识符 |
# 进入项目目录
cd system-toolbox-mcp
# 安装依赖
npm install
# 构建项目
npm run build在项目根目录创建 .mcp.json 文件:
{
"mcpServers": {
"system-toolbox": {
"command": "node",
"args": ["/你的路径/system-toolbox-mcp/dist/index.js"]
}
}
}在 VS Code 设置中配置 cline_mcp_settings.json:
{
"mcpServers": {
"system-toolbox": {
"command": "node",
"args": ["/你的路径/system-toolbox-mcp/dist/index.js"],
"disabled": false,
"alwaysAllow": []
}
}
}配置 claude_desktop_config.json(路径因操作系统而异):
- Windows:
%APPDATA%\Claude\claude_desktop_config.json - macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"system-toolbox": {
"command": "node",
"args": ["/你的路径/system-toolbox-mcp/dist/index.js"]
}
}
}获取详细的系统信息。
参数:
category(可选):"all"、"os"、"cpu"、"memory"、"network"之一,默认为"all"
示例:
{
"name": "get_system_info",
"arguments": {
"category": "memory"
}
}获取当前日期和时间。
参数:
timezone(可选):时区名称(如"Asia/Shanghai"、"America/New_York")format(可选):"iso"、"locale"、"unix"、"custom"之一,默认为"iso"locale(可选):格式化时使用的区域设置(如"zh-CN")
示例:
{
"name": "get_current_time",
"arguments": {
"timezone": "Asia/Shanghai",
"format": "locale",
"locale": "zh-CN"
}
}执行数学计算。
参数:
expression(必填):要计算的数学表达式
支持的运算:
- 基本运算:
+、-、*、/、%、^(幂) - 函数:
sqrt、abs、sin、cos、tan、log、exp、floor、ceil、round、pow、min、max - 常量:
PI、E、LN2、LN10、SQRT2
示例:
{
"name": "calculate",
"arguments": {
"expression": "sqrt(16) + pow(2, 10)"
}
}生成 UUID v4 标识符。
参数:
count(可选):要生成的 UUID 数量(1-100),默认为 1uppercase(可选):是否返回大写 UUID,默认为 false
示例:
{
"name": "generate_uuid",
"arguments": {
"count": 5,
"uppercase": true
}
}# 安装依赖
npm install
# 构建
npm run build
# 运行测试
npm test
# 开发模式
npm run devsystem-toolbox-mcp/
├── src/
│ └── index.ts # MCP 服务器主要实现
├── dist/ # 编译后的 JavaScript 输出
├── config-examples/ # 各平台配置示例
├── package.json # 项目配置
├── tsconfig.json # TypeScript 配置
├── test-mcp-client.mjs # 集成测试脚本
├── README.md # 英文文档
└── README.zh-CN.md # 中文文档
- Node.js >= 18.0.0
- npm >= 8.0.0
MIT