Skip to main content

MCP Server for Dell PowerStore with automatic OpenAPI tool generation - Credential-free mode

Project description

Dell PowerStore MCP Server

CI Python Version License: MIT Code style: black Ruff

A Model Context Protocol (MCP) server for Dell PowerStore that automatically generates tools from OpenAPI specifications with a credential-free architecture. Enables AI assistants like Claude and automation platforms like n8n to interact with PowerStore storage arrays.

โœจ Features

Feature Description
๐Ÿ”„ Automatic Tool Generation Dynamically generates 262+ MCP tools from Dell PowerStore OpenAPI specs
๐Ÿ” Credential-Free Architecture No stored credentials - pass host/username/password with each tool call
๐ŸŒ Multi-Host Support Manage multiple PowerStore instances from a single server
๐Ÿ›ก๏ธ Safe Operations GET-only operations for read-only PowerStore access
๐Ÿ”Œ Multiple Transports HTTP/SSE for n8n, stdio for Claude Desktop
๐Ÿ“Š Health Monitoring Built-in health checks and metrics endpoints
๐Ÿณ Docker Ready Production-ready container images

๐Ÿ“‹ Table of Contents

๐Ÿš€ Quick Start

# Clone and install
git clone https://github.com/sachdev27/powerstore-mcp-server.git
cd powerstore-mcp-server
pip install -e .

# Run HTTP/SSE server (for n8n)
powerstore-mcp-http

# Or run stdio server (for Claude Desktop)
powerstore-mcp

๐Ÿ“ฆ Installation

From PyPI (Recommended)

pip install powerstore-mcp-server

From Source

# Clone the repository
git clone https://github.com/sachdev27/powerstore-mcp-server.git
cd powerstore-mcp-server

# Create virtual environment
python -m venv .venv
source .venv/bin/activate  # On macOS/Linux
# .venv\Scripts\activate   # On Windows

# Install in development mode
pip install -e ".[dev]"

Using Docker

docker pull ghcr.io/sachdev27/powerstore-mcp-server:latest

# Run with SSE transport
docker run -p 3000:3000 ghcr.io/sachdev27/powerstore-mcp-server:latest

Requirements

  • Python: 3.10, 3.11, 3.12, or 3.13
  • Dell PowerStore: Any supported version (for actual operations)

โš™๏ธ Configuration

Environment Variables

Variable Description Default
LOG_LEVEL Logging level (debug, info, warning, error) info
LOG_FORMAT Log format (text, json) text
OPENAPI_SPEC_PATH Path to OpenAPI specification ./openapi.json
HTTP_PORT HTTP server port 3000
HTTP_HOST HTTP server host 0.0.0.0

Example .env File

LOG_LEVEL=info
LOG_FORMAT=json
HTTP_PORT=3000

โš ๏ธ Important: PowerStore credentials are NOT stored in configuration. They are passed securely with each tool call.

๐Ÿ“– Usage

HTTP/SSE Mode (for n8n and Web Clients)

# Using the CLI
powerstore-mcp-http

# Using uvicorn directly
uvicorn powerstore_mcp.http_server:app --host 0.0.0.0 --port 3000

# Using the start script
./start-http.sh

The server provides:

  • SSE Endpoint: http://localhost:3000/sse
  • Health Check: http://localhost:3000/health
  • Metrics: http://localhost:3000/health (detailed JSON response)

stdio Mode (for Claude Desktop)

# Using the CLI
powerstore-mcp

# Using Python module
python -m powerstore_mcp.main

# Using the start script
./start-python.sh

Docker Compose

# Start the server
docker-compose up -d

# View logs
docker-compose logs -f

# Stop the server
docker-compose down

๐Ÿ”— Integration

n8n AI Agent

  1. Add an MCP Client node to your n8n workflow
  2. Configure the connection:
    • Transport: SSE
    • URL: http://localhost:3000/sse
  3. The 262 PowerStore tools will be available to AI agents

Claude Desktop

Add to your Claude Desktop configuration (claude_desktop_config.json):

{
  "mcpServers": {
    "dell-powerstore": {
      "command": "powerstore-mcp",
      "args": []
    }
  }
}

Or with explicit Python path:

{
  "mcpServers": {
    "dell-powerstore": {
      "command": "/path/to/venv/bin/python",
      "args": ["-m", "powerstore_mcp.main"]
    }
  }
}

Custom MCP Clients

import asyncio
from mcp import ClientSession
from mcp.client.sse import sse_client

async def main():
    async with sse_client("http://localhost:3000/sse") as (read, write):
        async with ClientSession(read, write) as session:
            await session.initialize()

            # List available tools
            tools = await session.list_tools()
            print(f"Found {len(tools.tools)} tools")

            # Call a tool
            result = await session.call_tool("getAppliance", {
                "host": "powerstore.example.com",
                "username": "admin",
                "password": "password"
            })
            print(result)

asyncio.run(main())

๐Ÿ”ง Available Tools

The server dynamically generates 262 tools from the PowerStore OpenAPI specification.

Authentication Parameters

Every tool requires these authentication parameters:

Parameter Type Description
host string PowerStore hostname or IP
username string PowerStore username
password string PowerStore password

Tool Categories

Category Example Tools Description
Storage getVolume, getHost, getVolume_group Volume and host management
System getAppliance, getCluster, getNode System information
Network getNetwork, getIp_port, getFc_port Network configuration
File Services getNas_server, getFile_system, getNfs_export File storage
Protection getSnapshot_rule, getReplication_rule Data protection
Monitoring getAlert, getEvent, getPerformance_rule Alerts and events

Query Parameters

All collection endpoints support PowerStore query parameters:

{
  "host": "powerstore.example.com",
  "username": "admin",
  "password": "password",
  "select": "id,name,size",
  "limit": 100,
  "offset": 0,
  "order": "name.asc"
}

๐Ÿ—๏ธ Architecture

Credential-Free Design

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”     โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   AI Client     โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   MCP Server    โ”‚โ”€โ”€โ”€โ”€โ–ถโ”‚   PowerStore    โ”‚
โ”‚ (Claude/n8n)    โ”‚     โ”‚ (No Credentials)โ”‚     โ”‚    Array        โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜     โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
         โ”‚                      โ”‚
         โ”‚   Tool Call with     โ”‚   Per-Request
         โ”‚   Credentials        โ”‚   Authentication
         โ–ผ                       โ–ผ
    {host, user, pass}      Basic Auth Header

Key Design Principles

  • No Stored Credentials: Server starts without any PowerStore connection
  • Per-Request Auth: Each tool call includes host/username/password
  • Fresh Sessions: New API client created for each request
  • Multi-Host Ready: Easily manage multiple PowerStore instances

Module Structure

powerstore_mcp/
โ”œโ”€โ”€ __init__.py          # Package initialization and version
โ”œโ”€โ”€ api_client.py        # Async PowerStore API client with retry logic
โ”œโ”€โ”€ config.py            # Configuration management with validation
โ”œโ”€โ”€ exceptions.py        # Custom exception hierarchy
โ”œโ”€โ”€ http_server.py       # HTTP/SSE transport server
โ”œโ”€โ”€ logging_config.py    # Structured logging configuration
โ”œโ”€โ”€ main.py              # stdio transport entry point
โ”œโ”€โ”€ server.py            # Core MCP server with tool handlers
โ””โ”€โ”€ tool_generator.py    # OpenAPI parser and tool generator

๐Ÿงช Development

Setup Development Environment

# Clone and install with dev dependencies
git clone https://github.com/sachdev27/powerstore-mcp-server.git
cd powerstore-mcp-server
pip install -e ".[dev]"

# Install pre-commit hooks
pre-commit install

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=powerstore_mcp --cov-report=html

# Run specific test file
pytest tests/test_tool_generator.py -v

Code Quality

# Format code
black powerstore_mcp tests

# Lint code
ruff check powerstore_mcp tests

# Type checking
mypy powerstore_mcp

# Security scan
bandit -r powerstore_mcp

Building

# Build distribution packages
python -m build

# Build Docker image
docker build -t powerstore-mcp-server .

๐Ÿค Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“š Additional Resources


Made with โค๏ธ for the storage automation community

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dell_powerstore_mcp_server-1.0.0.tar.gz (46.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dell_powerstore_mcp_server-1.0.0-py3-none-any.whl (33.3 kB view details)

Uploaded Python 3

File details

Details for the file dell_powerstore_mcp_server-1.0.0.tar.gz.

File metadata

File hashes

Hashes for dell_powerstore_mcp_server-1.0.0.tar.gz
Algorithm Hash digest
SHA256 1da6ca03429a5c93e5442c76034255c3d31ae72265097c5570feda3ee629f90d
MD5 0d47a0a00945e449644bbc22b05afe6b
BLAKE2b-256 7765aaf111e2c9e807ca3d0beaf0e59e7a10d8d6cec837f700139f995b914a2f

See more details on using hashes here.

File details

Details for the file dell_powerstore_mcp_server-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dell_powerstore_mcp_server-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f71c9a66c54df8e00e2606d385efc0f874021eb13f9bb252e400c215c99ba936
MD5 2801af5ff7aab6eefd88a0c18298b949
BLAKE2b-256 6716e9d5e9313cfc3c0b991d87f6ea7d0c3ad2d7aee5a65311358b3c76f529c9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page