A collection of Model Context Protocol (MCP) servers that enable AI assistants to interact with HPE GreenLake cloud services.
The Model Context Protocol (MCP) is an open protocol that enables seamless integration between LLM applications and external data sources and tools. Whether you're building an AI-powered IDE, enhancing a chat interface, or creating custom AI workflows, MCP provides a standardized way to connect LLMs with the context they need.
Visit the HPE GreenLake MCP servers repository for an up-to-date listing of the HPE GreenLake services with MCP server support along with information on installation, configuration, and useful code samples.
An MCP server is a service that implements the Model Context Protocol to expose specific resources, tools, or data sources to AI assistants. It acts as a bridge between AI models and external systems, allowing for:
- Standardized architecture: All servers follow consistent patterns for authentication, configuration, and error handling
- OAuth2 authentication: Secure access using HPE GreenLake workspace credentials with automatic token management
- Dual tool modes: Each server supports both static (individual tools per endpoint) and dynamic (meta-tools) operation modes
- Type-safe: Built with Pydantic models for runtime validation and type safety
- Production ready: Comprehensive logging, error handling, and Docker support
- Well tested: Extensive unit and integration test coverage
At this time, HPE GreenLake MCP servers support local deployment only. The servers run on customer environment, providing secure, read-only access to HPE GreenLake cloud services.
Benefits of local MCP servers:
- Development & testing: Perfect for local development, testing, and debugging
- Data privacy: Keep sensitive credentials and workspace data on your local machine
- Low latency: Minimal network overhead for faster response times
- Resource control: Direct control over server resources and configuration
Manage and query HPE GreenLake devices in your workspace. Filter devices by type, serial number, tags, and other properties.
Key capabilities:
- Retrieve device lists with advanced filtering
- Get detailed device information by ID
- Query devices by tags, device type, serial number, and more
Interact with HPE GreenLake workspace management APIs. View workspace details and manage workspace-level configurations.
Key capabilities:
- List and query workspaces
- Retrieve workspace details and configurations
- Access workspace-level settings
Browse and query HPE GreenLake service offers, service provisions, and service managers in your workspace.
Key capabilities:
- List and filter service offers and service offer regions
- Retrieve service provision details for a workspace
- Query service managers and service manager provisions by region
Access subscription information and licensing details for your HPE GreenLake services.
Key capabilities:
- View active subscriptions
- Query subscription details and licensing
- Monitor subscription status
Query and analyze HPE GreenLake audit logs with powerful filtering capabilities.
Key capabilities:
- Search audit logs by category, user, timestamp, and more
- Filter logs using advanced query operators (eq, contains, in)
- Retrieve detailed audit log information
- Track user activities and system events
Manage user accounts and access controls in HPE GreenLake workspaces.
Key capabilities:
- List and query workspace users
- View user details and permissions
- Monitor user activity
Access HPE GreenLake reporting data and monitor report statuses for your workspace.
Key capabilities:
- Retrieve report export metadata including supported columns, filter criteria, and operators
- Fetch status of all reports for a workspace with pagination support
- Retrieve the status of a specific report by ID
HPE GreenLake MCP servers run locally on customer environment, providing secure read-only access to HPE GreenLake workspace. The servers act as a bridge between AI assistants and HPE GreenLake cloud services, allowing customers to query devices, audit logs, subscriptions, and other resources without modifying any data.
- Downloading prerequisite software
- Gathering the required credentials
- Installing an MCP server
- Configuring an MCP client
You must download and configure the following software before you can use HPE GreenLake cloud MCP servers.
- Python 3.10 or higher, see the following to download Python.
- The uv package manager, which is a fast Python package installer. See the following to get UV.
- An MCP client of your choice. See Example Clients. This documentation uses Claude Desktop as an example, but HPE GreenLake cloud MCP servers will work with all MCP clients.
- An integration development environment, such as Microsoft Visual Studio.
Prerequisites:
You need an HPE GreenLake account and workspace. See Getting started with HPE GreenLake cloud.
About this task:
Before creating your MCP server, you need to gather an HPE GreenLake workspace ID, the client ID, and the client secret from a personal API client.
If you already have and know your workspace ID, client ID, and client secret, you can skip this task.
Procedure:
- Log in to HPE GreenLake and select a workspace.
- On the HPE GreenLake cloud header, click the workspace menu and then select Manage Workspace. The Workspace ID is listed under your name. Make a note or copy this ID.
- From Manage Workspace, click Personal API clients.
- From Personal API clients, click on an existing API client to view the Client ID.
- If you do not know the client secret, there are three options to generate a new one.
- Use the UI: see Creating a personal API client or Resetting your client secret
- Use the API Client Credentials API.
Take note or copy the client ID and secret.
Prerequisites:
- Ensure you have installed the required prerequisite software.
- Complete Gathering the required credentials.
About this task:
Install and configure an MCP server for AI assistant integration.
Procedure:
Clone the MCP server with
git clone https://github.com/hewlettPackard/gl-mcp.Navigate to the directory of your chosen service.
Generic example:
cd src/{INSERT SERVICE}Subscriptions example:
cd src/subscriptionsInstall dependencies with the command
uv sync.Configure environment variables. See the example shell command below (Linux/macOS). You need to provide the specific information for the credential information (
GREENLAKE_CLIENT_ID,GREENLAKE_CLIENT_SECRET, andGREENLAKE_WORKSPACE_ID). Refer to the Environment variables for more information.cat > .env.local << EOF GREENLAKE_API_BASE_URL=https://global.api.greenlake.hpe.com GREENLAKE_CLIENT_ID={your-client-id} GREENLAKE_CLIENT_SECRET={your-client-secret} GREENLAKE_WORKSPACE_ID={your-workspace-id} EOFTest the server startup using the command
make test.Verify authentication by checking console output for successful OAuth2 token acquisition, tool registration completion, and no authentication errors. The MCP server is installed and ready for integration with AI assistants.
View the HPE GreenLake cloud MCP servers repository for specific and detailed code samples for all available services.
Prerequisites:
- Complete the steps in Installing an MCP server.
- Complete the steps in Gathering the required credentials.
- Download and install an MCP client.
About this task:
This procedure shows an example of adding an MCP server to Claude Desktop. However, HPE GreenLake cloud MCP servers will work with any MCP client (refer to their documentation).
Procedure:
Locate the Claude Desktop configuration file,
claude_desktop_config.json.Add your chosen MCP server configuration. You need to provide the specific information for
cwd(the path to your server) as well as the credential information (GREENLAKE_CLIENT_ID,GREENLAKE_CLIENT_SECRET, andGREENLAKE_WORKSPACE_ID).{ "mcpServers": { "greenlake-subscriptions": { "command": "uv", "args": ["run", "python", "__main__.py"], "cwd": "C:\\path\\to\\gl-mcp\\src\\subscriptions", "env": { "GREENLAKE_API_BASE_URL": "https://global.api.greenlake.hpe.com", "GREENLAKE_CLIENT_ID": "your-client-id", "GREENLAKE_CLIENT_SECRET": "your-client-secret", "GREENLAKE_WORKSPACE_ID": "your-workspace-id" } } } }Restart Claude Desktop by completely closing the application and restarting it.
Verify the MCP server appears in the available tools.
About this task:
Configure your MCP server to use static or dynamic tool modes based on your use case.
- Use static mode (recommended for production) for standard workflows, type-safe operations with validation, clear tool discoverability in MCP clients, and optimal performance for known operations.
- Use dynamic mode (recommended for development) for exploring new subscription API endpoints, flexible schema discovery, development and testing scenarios, and unknown or changing API requirements.
Procedure:
Set the environment variable.
- Static mode:
export MCP_TOOL_MODE=static - Dynamic mode:
export MCP_TOOL_MODE=dynamic
- Static mode:
Update configuration files by adding the mode to your MCP client configuration.
"env": { "MCP_TOOL_MODE": "static" }Restart the server.
Verify the mode change by checking available tools in your MCP client. Static mode shows the name of the API endpoints available. Dynamic mode shows
list_endpoints,get_endpoint_schema, andinvoke_dynamic_tool.
| Tool | Description |
|---|---|
list_endpoints | Used to discover available API endpoints with optional filtering |
get_endpoint_schema | Used to get detailed schema information for specific endpoints |
invoke_dynamic_tool | Execute API calls with runtime parameter validation |
| Variable | Required | Description | Example |
|---|---|---|---|
GREENLAKE_API_BASE_URL | Yes | The base URL for HPE GreenLake APIs | https://global.api.greenlake.hpe.com |
GREENLAKE_CLIENT_ID | Yes | The OAuth2 client ID | 12345678-1234-4567-8901-123456789abc |
GREENLAKE_CLIENT_SECRET | Yes | The OAuth2 client secret | 1234567890abcdef1234567890abcdef |
GREENLAKE_WORKSPACE_ID | Yes | The unique identifier of an HPE GreenLake workspace | 12345678-1234-4567-8901-123456789abc |
GREENLAKE_TOKEN_ISSUER | No | The OAuth2 token endpoint | Auto-generated if not provided |
MCP_TOOL_MODE | No | The tools operation mode | static (default) or dynamic |
GREENLAKE_LOG_LEVEL | No | The logging level for stderr output | ERROR (default), WARNING, INFO, DEBUG |
GREENLAKE_FILE_LOGGING | No | Enable file logging to disk | false (default) or true |
All servers share a common architecture:
server/
├── __main__.py # Entry point
├── auth/ # OAuth2 authentication
├── config/ # Settings and logging
├── models/ # Pydantic data models
├── server/ # MCP server core
├── tools/ # Tool implementations
│ ├── base.py # Base tool class
│ ├── registry.py # Tool registration
│ └── implementations/ # Tool implementations
├── utils/ # HTTP client and utilities
└── tests/ # Unit and integration testsAll servers use OAuth2 client credentials flow with automatic token management:
- Tokens are cached and automatically refreshed
- Thread-safe token management
- Configurable retry logic with exponential backoff
Servers use structured logging with MCP protocol compliance:
- stderr: Diagnostic logs (controlled by
GREENLAKE_LOG_LEVEL) - File logging: Optional detailed logging to
~/.hpe/mcp-logs/ - stdout: Reserved for JSON-RPC messages only
- Read-only access: All servers provide read-only API access by design
- Local operation: MCP servers run entirely on customer environment
- Credential management: Never commit credentials to version control
- Token security: OAuth2 tokens are cached in memory only
- Workspace isolation: Operations are scoped to the configured workspace
- HTTPS only: All API communications use TLS encryption
Server won't start:
- Verify all required environment variables are set
- Check that
uvis installed and dependencies are synced - Review stderr output for configuration errors
Authentication failures:
- Verify client credentials are valid for your workspace
- Ensure
GREENLAKE_WORKSPACE_IDmatches your credential scope - Check network connectivity to GreenLake APIs
MCP client connection issues:
- Verify the
cwdpath in client configuration is correct - Check that the server starts successfully when run manually
- Review client logs for specific error messages
Enable detailed logging for troubleshooting:
export GREENLAKE_LOG_LEVEL=DEBUG
export GREENLAKE_FILE_LOGGING=trueLog files are written to: ~/.hpe/mcp-logs/{service-name}/
For support, use GitHub Issues for bug reports or feature requests, and GitHub Discussions for general inquiries.
- HPE GreenLake API Documentation
- HPE GreenLake MCP servers repository
- MCP Specification
- Model Context Protocol Documentation
This project is licensed under the Apache 2.0 - see the LICENSE file for details.