
Product
Microsoft Teams Notifications Are Now Available in Socket
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.
greenlake-subscriptions-mcp
Advanced tools
HPE GreenLake subscriptions MCP Server provides read-only access to the HPE GreenLake subscriptions APIs through the Model Context Protocol.
This MCP server enables AI assistants and development tools to interact with HPE GreenLake subscriptions programmatically. It follows the standardized MCP server architecture with shared authentication components and HTTP client adapters.
From PyPI (recommended):
pip install greenlake-subscriptions-mcp
After installation, run the server with:
python -m greenlake_subscriptions_mcp
Set the following environment variables:
| Variable | Required | Description | Example |
|---|---|---|---|
GREENLAKE_API_BASE_URL | Yes | Base URL for GreenLake APIs | https://global.api.greenlake.hpe.com |
GREENLAKE_CLIENT_ID | Yes | OAuth2 client ID | your-client-id |
GREENLAKE_CLIENT_SECRET | Yes | OAuth2 client secret | your-client-secret |
GREENLAKE_WORKSPACE_ID | Yes | Workspace identifier (token issuer auto-generated from this) | your-workspace-id |
MCP_TOOL_MODE | No | Tool operation mode (see Tool Modes section) | static (default) or dynamic |
GREENLAKE_LOG_LEVEL | No | Logging level for stderr output | ERROR (default), WARNING, INFO, DEBUG |
GREENLAKE_FILE_LOGGING | No | Enable file logging to disk | false (default) or true |
This MCP server uses loguru for structured logging with strict MCP protocol compliance.
stderr (Default):
GREENLAKE_LOG_LEVEL (default: ERROR)File logging (Optional):
GREENLAKE_FILE_LOGGING=true~/.hpe/mcp-logs/subscriptions/subscriptions-mcp.logProduction (minimal logging):
export GREENLAKE_LOG_LEVEL=ERROR
# File logging disabled by default
Development (verbose logging):
export GREENLAKE_LOG_LEVEL=DEBUG
export GREENLAKE_FILE_LOGGING=true
Debugging specific issues:
export GREENLAKE_LOG_LEVEL=INFO
export GREENLAKE_FILE_LOGGING=true
# Check logs at: ~/.hpe/mcp-logs/subscriptions/
The server automatically filters noisy third-party library logs:
httpx, httpcore, urllib3, asyncio are limited to WARNING level and aboveThis MCP server supports two different tool operation modes that can be switched at runtime:
Tools available in dynamic mode:
list_endpoints - Discover available API endpoints with optional filteringget_endpoint_schema - Get detailed schema information for specific endpointsinvoke_dynamic_tool - Execute API calls with runtime parameter validationConfigure the MCP_TOOL_MODE environment variable in your MCP client configuration:
{
"servers": {
"subscriptions": {
"env": {
"MCP_TOOL_MODE": "static" // or "dynamic"
}
}
}
}
static - Individual tools per endpoint (default)dynamic - 3 generic meta-tools for all endpointsAdd to your .vscode/mcp.json:
Using PyPI package:
{
"servers": {
"subscriptions": {
"type": "stdio",
"command": "python",
"args": ["-m", "greenlake_subscriptions_mcp"],
"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",
"MCP_TOOL_MODE": "static",
"GREENLAKE_LOG_LEVEL": "INFO",
"GREENLAKE_FILE_LOGGING": "false"
}
}
}
}
Add to your claude_desktop_config.json:
Using PyPI package:
{
"mcpServers": {
"subscriptions": {
"command": "python",
"args": ["-m", "greenlake_subscriptions_mcp"],
"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",
"MCP_TOOL_MODE": "static",
"GREENLAKE_LOG_LEVEL": "INFO",
"GREENLAKE_FILE_LOGGING": "false"
}
}
}
}
This server provides the following MCP tools:
Description: Get subscriptions managed in a workspace. Filters can be passed to filter the subscriptions based on conditional expressions.<br><br>NOTE: You need to have view permission for the Devices and subscription service to invoke this API. <br><br> Rate limits are enforced on this API. 60 requests per minute is supported per workspace. API will result in 429 if this threshold is breached.
Method: GET /subscriptions/v1/subscriptions
Parameters:
filter (str, optional):id - subscriptionType - subscriptionStatus - key - quantity -
availableQuantity - sku - skuDescription - contract - startTime - endTime - productType - tier - tierDescription - quote - po - resellerPo - createdAt - updatedAt The following is a non-exhaustive list of possible filtering options. Examples: - subscriptionType in 'CENTRAL_STORAGE', 'CENTRAL_CONTROLLER' Return subscriptions where the property is one of multiple values. Example syntax, \<property> in \<value>,\<value>. - key eq 'STIQQ4L04' and
subscriptionType eq 'CENTRAL_STORAGE' The AND operator returns results that meet all filter queries. In the example, the query only returns subscriptions with the exact key and with the specified subscription type. Example syntax, \<property> eq \<value> and \<property> eq \<value>. - key eq 'STIQQ4L04' or subscriptionType eq 'CENTRAL_STORAGE' The OR operator returns results that meet any of the filter queries. In the example, the query returns subscriptions with the
exact key or with the specified subscription type. - key eq 'STIAPL6404' Return subscriptions where a property equals a value. Example syntax, \<property> eq \<value>. - createdAt ge '2024-01-18T19:53:51.480Z' Return subscriptions where a property is greater or equal to a value. Example syntax, \<property> ge \<value>. - updatedAt le '2024-02-18T19:53:51.480Z' Return subscriptions where a property is less than or equal to a value. Example syntax, \<property> le
\<value>. - startTime gt '2024-01-23T00:00:00.000Z' and endTime lt '2025-02-22T00:00:00.000Z' and not productType eq 'SERVICE' The AND, OR, and NOT operators can be combined to return results that satisfy all specified filter criteria. - tier ne 'BRIDGE' Return subscriptions where a property does not equate to a value. Example syntax, \<property> ne \<value>. - not key eq 'STIAPL6404' Return subscriptions where a property does not equal a value. Example syntax, not
\<property> eq \<value>. Filter Syntax: Use OData-style filters with the field names shown in the examples above. String values must be enclosed in single quotes. Field Type Hints: Quote string and date-time values. Use unquoted literals for integer, number, and boolean fields unless the examples above show a different syntax. - id: string - subscriptionType: string - subscriptionStatus: string - key: string - quantity: string - availableQuantity:
string - sku: string - skuDescription: string - contract: string - startTime: string - endTime: string - productType: string - tier: string - tierDescription: string - quote: string - po: string - resellerPo: string - createdAt: string - updatedAt: stringfilter-tags (str, optional):sort (str, optional):asc or desc. The default is ascending order.Example: key, quote desc
select (list[str], optional):availableQuantity, contract, createdAt, endTime, id, isEval, key, po, productType, quantity, quote, resellerPo, sku, skuDescription, startTime, subscriptionStatus, subscriptionType, tags, tier, tierDescription, type, updatedAt. Use only these exact property names in
select; unsupported properties can return HTTP 400 errors.limit (int, optional):offset (int, optional):Description: Get detailed information for a single subscription by id. <br><br>NOTE: You need to have the view permission of device management to invoke this API. <br><br> Rate limits are enforced on this API. 20 requests per minute is supported per workspace. The API returns 429 if this threshold is breached.
Method: GET /subscriptions/v1/subscriptions/{id}
Parameters:
id (str, required):This MCP server enables AI assistants to answer natural language questions about your HPE GreenLake subscriptions resources. Here are some example queries you can try:
Subscription Tracking:
These are just examples - you can ask questions in your own words, and the AI assistant will use the appropriate MCP tools to retrieve the information from HPE GreenLake.
This MCP server implements read-only access to the following subscriptions API endpoints:
GET /subscriptions/v1/subscriptions - Get subscriptions managed in a workspace. Filters can be passed to filter the subscriptions based on conditional expressions.<br><br>NOTE: You need to have view permission for the Devices and subscription service to invoke this API. <br><br> Rate limits are enforced on this API. 60 requests per minute is supported per workspace. API will result in 429 if this threshold is breached.GET /subscriptions/v1/subscriptions/{id} - Get detailed information for a single subscription by id. <br><br>NOTE: You need to have the view permission of device management to invoke this API. <br><br> Rate limits are enforced on this API. 20 requests per minute is supported per workspace. The API returns 429 if this threshold is breached.make help # Show available commands
make install # Install dependencies
make test # Run tests
make clean # Clean build artifacts
subscriptions/
├── pyproject.toml # Dependencies and configuration
├── README.md # This file
├── Makefile # Development commands
├── greenlake_subscriptions_mcp/ # Python package
│ ├── __init__.py
│ ├── __main__.py # Entry point
│ ├── _version.py # Version constants
│ ├── auth/ # Authentication components
│ │ ├── __init__.py
│ │ ├── oauth2_provider.py # OAuth2 client credentials
│ │ └── token_manager.py # Token lifecycle management
│ ├── config/ # Configuration management
│ │ ├── __init__.py
│ │ ├── logging.py # Logging configuration
│ │ └── settings.py # Application settings
│ ├── models/ # Data models
│ │ ├── __init__.py
│ │ └── base.py # Base model classes
│ ├── server/ # MCP server implementation
│ │ ├── __init__.py
│ │ ├── app.py # Application factory
│ │ ├── fastmcp_instance.py # FastMCP singleton
│ │ └── mcp_server.py # MCP server core
│ ├── tools/ # MCP tools
│ │ ├── __init__.py
│ │ ├── base.py # Base tool class
│ │ ├── registry.py # Tool registration
│ │ └── implementations/
│ │ └── *.py # Tool implementations
│ └── utils/ # Utility modules
│ ├── __init__.py
│ └── http_client.py # HTTP client utilities
└── tests/ # Test suite
├── conftest.py # Shared fixtures
├── shared/
│ └── http.py # Testing helpers
├── unit/
│ └── test_*.py # Unit tests
└── integration/
└── test_live_tools.py
tools/implementations/BaseTool and implement required methodstools/registry.pytests/The test suite reads credentials from environment variables. Export the following variables before running integration tests:
export GREENLAKE_CLIENT_ID=your-client-id
export GREENLAKE_CLIENT_SECRET=your-client-secret
export GREENLAKE_WORKSPACE_ID=your-workspace-id
export GREENLAKE_API_BASE_URL=https://global.api.greenlake.hpe.com
Run the full test suite (unit + integration when credentials are present):
make test
Run unit-only checks:
make test-unit
Integration smoke tests require the variables above plus any tool arguments (MCP_TEST_SUBSCRIPTIONS_<PARAM_NAME>):
make test-integration
The generated suite provides:
Server won't start:
Verify environment variables are set
Check that the package is installed: pip show greenlake-subscriptions-mcp
Review log output for specific errors
Authentication failures:
Tool execution errors:
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
FAQs
HPE GreenLake subscriptions MCP Server
The pypi package greenlake-subscriptions-mcp receives a total of 85 weekly downloads. As such, greenlake-subscriptions-mcp popularity was classified as not popular.
We found that greenlake-subscriptions-mcp demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.

Product
Socket can now send alerts and supply chain attack notifications to Microsoft Teams, with filters that route the right updates to each channel.

Security News
pnpm 12 rewrites the package manager in Rust, cutting install times by up to 90% while preserving pnpm 11 workflows and lockfiles.

Security News
Socket CTO Ahmad Nassri joins AppSec leaders at Black Hat to discuss active malware, package manager risks, and software supply chain defense.