使用说明
IBM存储规模MCP服务器
用于与IBM Storage Scale交互的模型上下文协议(MCP)服务器。
[注] 此MCP服务器支持StreamableHTTP和stdio传输。默认情况下,它在上使用StreamableHTTP传输
127.0.0.1:8000.
安装指南
先决条件
- Python 3.12或更高版本
- UV包管理器(
curl -LsSf https://astral.sh/uv/install.sh | sh) - Node.js 22和npx(可选,用于文件操作支持)
curl -fsSL https://rpm.nodesource.com/setup_22.x | sudo bash - sudo yum install -y nsolid
安装
-
克隆存储库:
git clone https://github.com/IBM/ibm-storage-scale-mcp-server.git cd ibm-storage-scale-mcp-server -
使用uv安装依赖项:
uv venv source .venv/bin/activate uv pip install . -
配置缩放连接设置:
cp config/scale_config.ini.example config/scale_config.ini编辑
config/scale_config.ini使用您的IBM Storage Scale群集详细信息:[scale_api] hostname = your-scale-cluster.example.com v2_port = 443 v3_port = 46443 timeout = 5.0 [authorization] username = your-username password = your-password allow_insecure = true [domain] domain = your-domain [ssh] # SSH connection settings for remote CLI commands hostname = your-scale-node.example.com port = 22 username = your-username password = your-ssh-password key_path = your-ssh-key # Alternative to password authentication将占位符值替换为实际的Scale群集凭据和连接详细信息。
注: 这
[ssh]对于直接在Scale节点上执行命令的基于CLI的工具(如策略操作),需要第节。您可以使用密码或SSH密钥身份验证(优先于密码身份验证)。 -
使用uv或python启动服务器:
# Using uv (default: HTTP transport on localhost:8000) uv run scale-mcp-server
用法示例
# Run with HTTP transport on default port (localhost:8000)
scale-mcp-server --transport http
# Run with HTTP transport binding to all interfaces
scale-mcp-server --transport http --host 0.0.0.0
# Run with HTTP transport on custom port
scale-mcp-server --transport http --port 3000
# Run with stdio transport
scale-mcp-server --transport stdio
# Run with custom host, port, and log level
scale-mcp-server --transport http --host 0.0.0.0 --port 3000 --log-level DEBUG
第三方集成
该服务器支持可选的第三方MCP服务器集成,以扩展IBM Storage Scale管理之外的功能。
文件操作
服务器可以选择装载 MCP文件系统服务器 提供本地文件操作以及IBM Storage Scale管理。这使得:
- 读取和写入文件
- 创建和列出目录
- 移动文件和目录
- 使用模式搜索文件
- 正在获取文件元数据
用途:
scale-mcp-server --transport http --filesystem-paths /path/to/dir1 /path/to/dir2
使用和集成
使用MCP检查器
MCP服务器可以直接使用以下工具进行测试 MCP检查员.
先决条件
跟随 安装说明 来自MCP检查员。
通过HTTP传输连接
-
启动MCP服务器:
scale-mcp-server --transport http -
连接MCP检查器:
mcp-inspector http://localhost:8000 -
测试服务器:
- MCP检查器将在您的浏览器中打开
- 您可以浏览可用的工具
- 测试工具调用并验证响应
与代理一起使用
对于更高级的对话界面,可以考虑使用 IBM存储扩展代理 它们构建在该MCP服务器之上。这些代理通过自然语言交互提供了一种直观的方式来管理IBM Storage Scale操作。
报告问题和反馈
对于问题、疑问或功能请求,请在存储库中打开问题。
贡献代码
欢迎通过Pull Requests进行贡献。请根据位于以下地址的开发商原产地证书(DCO)提交您的第一个Pull Request DCO.md 使用您的姓名和电子邮件地址。
- 分叉存储库 并为您的功能或错误修复创建一个新的分支
- 进行更改 遵循现有的代码样式和约定
- 测试您的更改 彻底确保它们按预期工作
- 提交拉取请求 清楚地描述您的更改
- 签署DCO 通过将您的姓名和电子邮件地址添加到拉取请求中的DCO.md文件中
免责声明
本软件按“原样”提供,不提供任何形式的保证,包括但不限于其安装、使用或性能。我们不对因使用它们而造成的任何损坏、费用或数据丢失负责。您有责任在任何生产环境中使用之前彻底审查和测试您运行的任何脚本。此内容如有更改,恕不另行通知。