存储监控协议服务器

一个开源的Model Context Protocol (MCP)服务器,用于将IBM Storage Insights集成到Agentic-AI生态系统中,提供存储资产的监控和诊断功能。

  • by IBM
  • Python
  • 本地部署
  • 9 星标
  • 更新于
在 GitHub 查看 IBM/ibm-storageinsights-mcpserver

使用说明

IBM存储洞察MCP服务器

免责声明:这是一个由社区维护的项目,与IBM没有正式关联、认可或支持。此MCP服务器利用 IBM存储洞察 外部API。

这个开源的模型上下文协议(MCP)服务器将提供帮助 IBM存储洞察 融入Agent AI生态系统。它将帮助用户携带他们的AI代理,以便对注册的存储资产进行无缝的观察和诊断 IBM存储洞察 .

🚀 特性

  • 观察性工具:杠杆键 IBM存储洞察 通过MCP接口进行监控。
  • 可扩展设计:轻松集成其他Storage Insights API以供未来扩展。
  • Python风格的:为AI开发人员提供易用性和扩展性

🛠️ 工具

下面列出了目前在MCP服务器上公开的工具:

1. fetch_tenant_alerts

  • 描述:检索租户的警报列表。
  • 输入:
    • tenant_id_input (可选字符串):存储洞察租户id。
  • 退货:租户的警报列表。
  • 示例:
    # Example 1: Fetch alerts using default tenant ID from .env
    "Get all alerts for my tenant"
    
    # Example 2: Fetch alerts for a specific tenant
    "Show me alerts for tenant ID 01f13d45-27fd-1e2d-1234-66e2fdea0987"
    
    # Example 3: Check critical alerts
    "What are the current alerts on my storage systems?"
    

2. fetch_tenant_notifications

  • 描述:检索租户的通知列表。
  • 输入:
    • tenant_id_input (可选字符串):存储洞察租户id。
  • 退货:租户的通知列表。
  • 示例:
    # Example 1: Get all notifications using default tenant
    "Show me all notifications for my tenant"
    
    # Example 2: Fetch notifications for specific tenant
    "Get notifications for tenant 01f13d45-27fd-1e2d-1234-66e2fdea0987"
    
    # Example 3: Check recent notifications
    "What notifications do I have on my storage infrastructure?"
    

3. fetch_storage_systems

  • 描述:将所有存储系统添加到租户中以监视租户。
  • 输入:
    • tenant_id_input (可选字符串):存储洞察租户id。
  • 退货:租户上存在的存储系统列表。
  • 示例:
    # Example 1: List all storage systems
    "Show me all storage systems in my tenant"
    
    # Example 2: Get storage systems for specific tenant
    "List storage systems for tenant 01f13d45-27fd-1e2d-1234-66e2fdea0987"
    
    # Example 3: Check available systems
    "What storage systems are being monitored?"
    

4. fetch_system_notifications

  • 描述:获取租户下的系统通知。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
  • 退货:由唯一系统id表示的系统的通知列表。
  • 示例:
    # Example 1: Get notifications for a specific system
    "Show notifications for system 5249e140-3d44-11f1-8e40-a94d2a0672fd"
    
    # Example 2: Check system-specific notifications
    "What notifications exist for storage system 5249e140-3d44-11f1-8e40-a94d2a0672fd?"
    
    # Example 3: Get notifications for system in specific tenant
    "Get notifications for system 5249e140-3d44-11f1-8e40-a94d2a0672fd in tenant 01f13d45-27fd-1e2d-1234-66e2fdea0987"
    

5. fetch_system_details

  • 描述:获取租户上存在的给定系统的详细信息。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
  • 退货:由唯一系统id表示的系统的详细信息。
  • 示例:
    # Example 1: Get complete details of a system
    "Show me details for storage system 5249e140-3d44-11f1-8e40-a94d2a0672fd"
    
    # Example 2: Check system configuration
    "What are the details of system 5249e140-3d44-11f1-8e40-a94d2a0672fd?"
    
    # Example 3: Get system info for specific tenant
    "Get details for system 5249e140-3d44-11f1-8e40-a94d2a0672fd in tenant 01f13d45-27fd-1e2d-1234-66e2fdea0987"
    

6. fetch_system_io_rate

  • 描述:获取租户上存在的系统的io rate。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
    • metric_types (可选字符串列表):性能指标类型
    • duration (可选字符串):数据获取的持续时间(例如。 20m, 1h, 1d)
  • 退货:由唯一系统id表示的给定系统的请求IO速率。
  • 支持的IO速率指标
    • volume_overall_read_io_rate
    • volume_overall_write_io_rate
    • volume_overall_total_io_rate
  • 示例:
    # Example 1: Get IO rate for last hour
    "Show me IO rate for system 5249e140-3d44-11f1-8e40-a94d2a0672fd for the last 1 hour"
    
    # Example 2: Get read and write IO rates for last day
    "Get read and write IO rates for system 5249e140-3d44-11f1-8e40-a94d2a0672fd over the last day"
    
    # Example 3: Check total IO rate for last 20 minutes
    "What is the total IO rate for system 5249e140-3d44-11f1-8e40-a94d2a0672fd in the last 20 minutes?"
    

7. fetch_system_data_rate

  • 描述:获取租户上存在的系统的数据速率。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
    • metric_types (可选字符串列表):性能指标类型
    • duration (可选字符串):数据获取的持续时间(例如。 20m, 1h, 1d)
  • 退货:由唯一系统id表示的给定系统的请求数据速率。
  • 支持的IO速率指标
    • volume_read_data_rate
    • volume_write_data_rate
    • volume_total_data_rate
  • 示例:
    # Example 1: Get data rate for last hour
    "Show me data rate for system 5249e140-3d44-11f1-8e40-a94d2a0672fd for the past hour"
    
    # Example 2: Get read data rate for last day
    "What is the read data rate for system 5249e140-3d44-11f1-8e40-a94d2a0672fd over the last 24 hours?"
    
    # Example 3: Check total data throughput
    "Get total data rate for system 5249e140-3d44-11f1-8e40-a94d2a0672fd in the last 30 minutes"
    

8. fetch_system_response_time

  • 描述:获取租户上存在的系统的响应时间。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
    • metric_types (可选字符串列表):性能指标类型
    • duration (可选字符串):数据获取的持续时间(例如。 20m, 1h, 1d)
  • 退货:由唯一系统id表示的给定系统的请求响应时间。
  • 支持的IO速率指标
    • volume_read_response_time
    • volume_write_response_time
    • volume_total_response_time
  • 示例:
    # Example 1: Get response time for last hour
    "Show me response time for system 5249e140-3d44-11f1-8e40-a94d2a0672fd for the last hour"
    
    # Example 2: Check read response time
    "What is the read response time for system 5249e140-3d44-11f1-8e40-a94d2a0672fd over the last day?"
    
    # Example 3: Get total response time metrics
    "Get total response time for system 5249e140-3d44-11f1-8e40-a94d2a0672fd in the last 20 minutes"
    

9. fetch_system_transfer_size

  • 描述:获取租户上存在的系统的传输大小。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
    • metric_types (可选字符串列表):性能指标类型
    • duration (可选字符串):数据获取的持续时间(例如。 20m, 1h, 1d)
  • 退货:由唯一系统id表示的给定系统的请求传输大小。
  • 支持的IO速率指标
    • volume_read_transfer_size
    • volume_write_transfer_size
    • volume_total_transfer_size
  • 示例:
    # Example 1: Get transfer size for last hour
    "Show me transfer size for system 5249e140-3d44-11f1-8e40-a94d2a0672fd for the last hour"
    
    # Example 2: Check write transfer size
    "What is the write transfer size for system 5249e140-3d44-11f1-8e40-a94d2a0672fd over the last day?"
    
    # Example 3: Get total transfer size metrics
    "Get total transfer size for system 5249e140-3d44-11f1-8e40-a94d2a0672fd in the last 30 minutes"
    

10. fetch_system_cpu_utilization

  • 描述:获取租户上存在的系统的cpu利用率。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
    • metric_types (可选字符串列表):性能指标类型
    • duration (可选字符串):数据获取的持续时间(例如。 20m, 1h, 1d)
  • 退货:由唯一系统id表示的给定系统的请求cpu利用率。
  • 支持的IO速率指标
    • cpu_utilization
  • 示例:
    # Example 1: Get CPU utilization for last hour
    "Show me CPU utilization for system 5249e140-3d44-11f1-8e40-a94d2a0672fd for the last hour"
    
    # Example 2: Check CPU usage over last day
    "What is the CPU utilization for system 5249e140-3d44-11f1-8e40-a94d2a0672fd over the last 24 hours?"
    
    # Example 3: Monitor CPU performance
    "Get CPU utilization for system 5249e140-3d44-11f1-8e40-a94d2a0672fd in the last 20 minutes"
    

11. fetch_system_capacity

  • 描述:获取租户上存在的系统的容量。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
    • metric_types (可选字符串列表):性能指标类型
    • duration (可选字符串):数据获取的持续时间(例如。 20m, 1h, 1d)
  • 退货:由唯一系统id表示的给定系统的请求容量。
  • 支持的IO速率指标
    • used_capacity
    • available_capacity
  • 示例:
    # Example 1: Get capacity metrics for last hour
    "Show me capacity metrics for system 5249e140-3d44-11f1-8e40-a94d2a0672fd for the last hour"
    
    # Example 2: Check available capacity
    "What is the available capacity for system 5249e140-3d44-11f1-8e40-a94d2a0672fd?"
    
    # Example 3: Monitor used capacity over time
    "Get used capacity for system 5249e140-3d44-11f1-8e40-a94d2a0672fd over the last day"
    

12. fetch_system_components

  • 描述:获取租户上存在的系统的组件。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • comp_type (字符串):要获取的组件的名称。
    • tenant_id_input (可选字符串):存储洞察租户id。
  • 退货:由唯一系统id表示的给定系统的请求容量。
  • 支持的组件
    • volumes
    • pools
    • enclosures
    • drives
    • fc-ports
    • ip-ports
    • host-connections
    • io-groups
    • managed-disks
  • 示例:
    # Example 1: Get volumes for a system
    "Show me all volumes for system 5249e140-3d44-11f1-8e40-a94d2a0672fd"
    
    # Example 2: List storage pools
    "What pools are configured on system 5249e140-3d44-11f1-8e40-a94d2a0672fd?"
    
    # Example 3: Check FC ports
    "Get fc-ports for system 5249e140-3d44-11f1-8e40-a94d2a0672fd"
    

13. fetch_system_alerts

  • 描述:获取租户下的系统警报。
  • 输入:
    • system_id (字符串):系统的唯一系统id。
    • tenant_id_input (可选字符串):存储洞察租户id。
  • 退货:由唯一系统id表示的系统警报列表。
  • 示例:
    # Example 1: Get alerts for a specific system
    "Show me alerts for system 5249e140-3d44-11f1-8e40-a94d2a0672fd"
    
    # Example 2: Check system alerts
    "What alerts are active on system 5249e140-3d44-11f1-8e40-a94d2a0672fd?"
    
    # Example 3: Get alerts for system in specific tenant
    "Get alerts for system 5249e140-3d44-11f1-8e40-a94d2a0672fd in tenant tenant123"
    

💬 提示

1. morning_cup_of_coffee

  • 描述:使用相同的输入按顺序获取存储系统详细信息、警报详细信息和通知详细信息。过滤结果,仅显示处于错误状态、严重警报和通知的系统。
  • 输入:
    • tenant_id_input (可选字符串):存储洞察租户id。
  • 退货:提示执行所需工具并输出结果
  • 示例:
    # Example 1: Get morning summary with default tenant
    "Run morning cup of coffee for my tenant"
    
    # Example 2: Get daily health check
    "Give me the morning cup of coffee report"
    
    # Example 3: Get summary for specific tenant
    "Run morning cup of coffee for tenant 01f13d45-27fd-1e2d-1234-66e2fdea0987"
    

🧪 设置

设置您的环境

  • 安装紫外线:请参阅 安装UV 安装uv的部分。

存储洞察凭据

此MCP服务器中的工具调用 IBM存储洞察 API,因此需要Storage Insights租户ID和API密钥才能进行工作设置。参考 生成REST API密钥 为租户ID生成REST API密钥。

将以下值添加到 src/si_mcp_server_oss/.env 文件:

DEFAULT_SI_TENANT_ID =  <Your Storage Insights tenant ID>
DEFAULT_SI_API_KEY = <Your Storage Insights External Rest API key>
ADDITIONAL_TENANT_API_MAPPING = <Additional tenant id and API key mapping if you want the server to support multiple tenants (optional)>
LOG_FILE_PATH = <Directory path to store mcp server logs (optional)>
LOG_LEVEL = <Log level fo the configured logger (optional)>
CONFIG_FILE_PATH = <Path to the config file (optional)>

🖥️ 使用Claude Desktop

将以下配置添加到您的 claude_desktop_config.json:

MacOS: ~/Library/Application Support/Claude/claude_desktop_config.json
视窗: %APPDATA%/Claude/claude_desktop_config.json

{
  "mcpServers": {
    "si_mcp_server": {
      "command": "uv",
      "args": [
        "--directory",
        "/ABSOLUTE/PATH/TO/PARENT/FOLDER/si-mcp-server-oss/src/si_mcp_server_oss",
        "run",
        "server.py"
      ]
    }
  }
}

🐞 测试和调试

  1. 我们建议使用 MCP检查员 用于测试和调试。您可以使用以下命令运行检查器:

    npx @modelcontextprotocol/inspector uv --directory /ABSOLUTE/PATH/TO/PARENT/FOLDER/si-mcp-server-oss/src/si_mcp_server_oss run server.py
    

    检查器将提供一个URL,您可以在浏览器中打开该URL以查看日志并手动发送请求。

  2. (可选)更改 LOG_LEVEL 在.env文件中,并将其设置为 DEBUG 从服务器收集调试日志。

使用流式HTTP传输运行MCP服务器

此MCP服务器配置为通过标准输入/输出(transport=stdio)进行通信,但可以重新配置为Streamable HTTP。要设置流式HTTP,请参阅 认证 和 流式HTTP

🤝 贡献

欢迎投稿!如果您有任何建议、错误报告或改进建议,请随时打开问题或拉取请求。

📄 许可证

该项目根据 Apache许可证,版本2.0.