Skip to main content
Glama
Catalog Services MCP Server

Catalog Services MCP Server

by kavingas

Catalog Services MCP Server

An MCP (Model Context Protocol) server for Adobe Commerce Catalog Services, providing tools to interact with product, category, and environment services via gRPC and REST APIs.

Proto Schemas from https://git.corp.adobe.com/magento/proto-schemas

Features

This MCP server provides the following tools:

  • Product Variants: Get product variant information (configurable product options)

  • Product Overrides: Query product price overrides by customer group and website

  • Category Permissions: Retrieve category permission information

  • Environment Details: Get environment, website, and store view information

Related MCP server: MarTech MCP Server

Prerequisites

  • Python 3.11 or higher

  • uv - Fast Python package installer and resolver

  • Cursor IDE (or any MCP-compatible client)

Installation

1. Install uv

If you don't have uv installed, install it first:

# macOS/Linux
curl -LsSf https://astral.sh/uv/install.sh | sh

# Or using pip
pip install uv

2. Clone and Setup the Project

# Clone the repository
git clone <repository-url>
cd catalog-services-mcp

# Install dependencies using uv
uv sync

3. Configure Environment Variables

Set the required environment variables for authentication:

# Adobe Commerce Catalog Service credentials
export CATALOG_SERVICE_API_KEY="your_api_key"
export CATALOG_SERVICE_PRIVATE_KEY="your_private_key"

# New Relic credentials (if using New Relic tools)
export NEW_RELIC_API_KEY="your_new_relic_api_key"

4. Configure MCP in Cursor

Add the following configuration to your Cursor MCP settings file (~/.cursor/mcp.json):

{
  "mcpServers": {
    "Catalog Services": {
      "command": "uv",
      "args": [
        "--directory",
        "/Users/YOUR_USERNAME/path/to/catalog-services-mcp",
        "run",
        "main.py"
      ]
    }
  }
}

Important: Replace /Users/YOUR_USERNAME/path/to/catalog-services-mcp with the actual path to your cloned repository.

5. Restart Cursor

After adding the configuration, restart Cursor IDE to load the MCP server.

Usage

Once configured, you can use the Catalog Services tools in Cursor by invoking them through the MCP protocol. Available tools include:

  • get_product_variants - Retrieve product variant information

  • get_product_overrides_by_website - Get product price overrides for all customer groups

  • get_category_permissions - Query category permissions

  • get_environment_details - Get environment information

  • get_environment_store_views - List all store views for an environment

  • find_store_view_codes - Find store views by website/store code

Development

Project Structure

catalog-services-mcp/
├── catalog_service/          # Main service module
│   ├── generated/           # Generated protobuf files
│   ├── proto-schemas/       # Proto schema definitions
│   ├── product_service_tool.py
│   ├── product_override_service_tool.py
│   ├── variant_service_tool.py
│   ├── category_permission_service_tool.py
│   └── environment_service_tool.py
├── main.py                  # MCP server entry point
├── pyproject.toml          # Project dependencies
└── README.md

Regenerating Protobuf Files

If you need to regenerate the protobuf files from the proto schemas:

cd catalog_service
./generate_protos.sh

Troubleshooting

MCP Server Not Starting

  1. Check that uv is installed and in your PATH:

    which uv
  2. Verify the path in mcp.json is correct and absolute

  3. Check Cursor logs for error messages

Authentication Errors

Ensure your environment variables are set correctly:

echo $CATALOG_SERVICE_API_KEY
echo $CATALOG_SERVICE_PRIVATE_KEY

Connection Issues

  • Verify network connectivity to Adobe Commerce services

  • Check that you're connected to the corporate VPN if required

  • Ensure firewall rules allow outbound connections

Contributing

  1. Fork the repository

  2. Create a feature branch

  3. Make your changes

  4. Submit a pull request

License

Internal Adobe Commerce project

Available Tools

7 tools
find_store_view_codesA
Find and filter store views by website and/or store code.

Useful for discovering available store view codes when you know the
website and store codes but need to find valid store view codes.

Args:
    environment_id: Adobe Commerce Cloud environment ID
    website_code: Optional website code to filter by
    store_code: Optional store code to filter by
    timeout: Request timeout in seconds (default: 15.0)
    
Returns:
    Dict containing:
    - status: Success or error status
    - environment_id: The queried environment ID
    - matching_store_views: List of matching store views
    - count: Number of matching store views
    
Example:
    >>> result = find_store_view_codes(
    ...     environment_id='7059bb71-341a-4ccb-b543-d7b2948b73e4',
    ...     website_code='base',
    ...     store_code='main_website_store'
    ... )
    >>> print([sv['storeViewCode'] for sv in result['matching_store_views']])

Inputs: environment_id (required), timeout, store_code, website_code. Returns: result

get_category_permissionsA
Get category permissions from Catalog Service via gRPC.

This tool calls the GetCategoryPermissions RPC method to retrieve category permission
information from the Adobe Commerce Catalog Service. Category permissions control
which customer groups can view specific categories on different websites.

Args:
    environment_id: Adobe Commerce Cloud environment ID (e.g., '3f73a49a-3137-472c-bb0d-39d0e7925d86')
    category_ids: Optional list of category IDs to retrieve permissions for. 
                 If not provided, returns permissions for all categories.
    use_tls: Whether to use TLS connection (default: True)
    timeout: Request timeout in seconds (default: 15.0)
    
Returns:
    Dict containing category permission information with keys:
    - permissions: List of permission dictionaries, each containing:
        - environment_id: Environment ID
        - category_id: Category ID
        - displayable_permission_by_website_code: Map of website codes to customer group permissions
        - created: Creation timestamp
        - updated: Last update timestamp
        - deleted: Whether the permission is deleted
    - count: Number of permissions retrieved
    - status: Success or error status
    
Example:
    >>> result = get_category_permissions(
    ...     environment_id='3f73a49a-3137-472c-bb0d-39d0e7925d86',
    ...     category_ids=['1', '2', '4']
    ... )
    >>> print(result['count'])
    3
    >>> for perm in result['permissions']:
    ...     print(f"Category {perm['category_id']}: {perm['displayable_permission_by_website_code']}")

Inputs: environment_id (required), timeout, use_tls, category_ids. Returns: result

get_environment_detailsA
Get environment details from Catalog Service via HTTP REST API.

This tool calls the /catalog/v1/environments endpoint to retrieve environment 
information including websites, store views, and export details.

Args:
    environment_ids: List of Adobe Commerce Cloud environment IDs 
                    (e.g., ['7059bb71-341a-4ccb-b543-d7b2948b73e4'])
    timeout: Request timeout in seconds (default: 15.0)
    
Returns:
    Dict containing environment information with keys:
    - status: Success or error status
    - environments: List of environment details
    - count: Number of environments retrieved
    
Example:
    >>> result = get_environment_details(
    ...     environment_ids=['7059bb71-341a-4ccb-b543-d7b2948b73e4']
    ... )
    >>> print(result['count'])
    1
    >>> print(result['environments'][0]['websites'])

Inputs: environment_ids (required), timeout. Returns: result

get_environment_store_viewsA
Get all store views for a specific environment.

This is a convenience tool that retrieves environment details and extracts
all store view information in a flattened structure for easier use.

Args:
    environment_id: Adobe Commerce Cloud environment ID
    timeout: Request timeout in seconds (default: 15.0)
    
Returns:
    Dict containing:
    - status: Success or error status
    - environment_id: The queried environment ID
    - store_views: List of all store views with their codes
    - websites: List of all websites with their codes
    - count: Number of store views found
    
Example:
    >>> result = get_environment_store_views('7059bb71-341a-4ccb-b543-d7b2948b73e4')
    >>> for sv in result['store_views']:
    ...     print(f"{sv['websiteCode']}/{sv['storeCode']}/{sv['storeViewCode']}")

Inputs: environment_id (required), timeout. Returns: result

get_product_overrides_by_websiteA
Get product overrides for all customer groups in a website.

This retrieves price overrides for all customer groups, not just one.
Useful when you need to see pricing across all customer segments.

Args:
    environment_id: Adobe Commerce Cloud environment ID
    website_code: Website code (e.g., 'base')
    skus: List of product SKUs to retrieve overrides for
    filter_virtual_cgs: Filter out virtual customer groups (default: False)
    use_tls: Whether to use TLS connection (default: True)
    timeout: Request timeout in seconds (default: 15.0)
    
Returns:
    Dict containing product overrides with keys:
    - overrides: List of product override dictionaries (all customer groups), each containing:
        - customer_group_code: SHA1 hash of customer group ID
          Use get_customer_group_id_from_code() to decode to numeric ID
          Common hashes:
            'b6589fc6ab0dc82cf12099d1c2d40ab994e8410c' = ID 0 (NOT LOGGED IN)
            '356a192b7913b04c54574d18c28d46e6395428ab' = ID 1 (General/Logged In)
            'da4b9237bacccdf19c0760cab7aec4a8359010b0' = ID 2 (Wholesale)
        - sku, website_code, currency, prices, tier_prices, etc.
    - count: Number of overrides retrieved
    - status: Success or error status
    
Example:
    >>> result = get_product_overrides_by_website.invoke({
    ...     'environment_id': 'abc123',
    ...     'website_code': 'base',
    ...     'skus': ['SKU123']
    ... })
    >>> # Returns overrides for all customer groups
    >>> for override in result['overrides']:
    ...     group_id = get_customer_group_id_from_code(override['customer_group_code'])
    ...     print(f"Group ID {group_id}: {override['customer_group_code']}, Price: {override['prices']}")

Inputs: skus (required), website_code (required), environment_id (required), timeout, +2 more. Returns: result

get_productsA
Get product details from Catalog Service via gRPC.

This tool calls the GetProducts RPC method to retrieve product information
from the Adobe Commerce Catalog Service.

Args:
    environment_id: Adobe Commerce Cloud environment ID (e.g., 'abc123xyz')
    store_view_code: Store view code (e.g., 'default')
    store_code: Store code (e.g., 'main_website_store')
    website_code: Website code (e.g., 'base')
    skus: List of product SKUs to retrieve
    use_tls: Whether to use TLS connection (default: True)
    timeout: Request timeout in seconds (default: 15.0)
    
Returns:
    Dict containing product information with keys:
    - products: List of product dictionaries
    - count: Number of products retrieved
    - status: Success or error status
    
Example:
    >>> result = get_products(
    ...     environment_id='abc123xyz',
    ...     store_view_code='default',
    ...     store_code='main_website_store', 
    ...     website_code='base',
    ...     skus=['SKU123', 'SKU456']
    ... )
    >>> print(result['count'])
    2

Inputs: skus (required), store_code (required), website_code (required), environment_id (required), +3 more. Returns: result

get_product_variantsA
Get product variants from Catalog Service via gRPC.

This tool calls the GetVariants RPC method to retrieve product variant information
(configurable product options and their values) from the Adobe Commerce Catalog Service.

Product variants represent the different configurations of a configurable product,
showing all available option combinations (like colors, sizes) and their corresponding
child product SKUs.

Args:
    environment_id: Adobe Commerce Cloud environment ID (e.g., '3f73a49a-3137-472c-bb0d-39d0e7925d86')
    store_view_code: Store view code (e.g., 'test')
    store_code: Store code (e.g., 'test')
    website_code: Website code (e.g., 'test')
    skus: List of parent product SKUs to retrieve variants for
    use_tls: Whether to use TLS connection (default: True)
    timeout: Request timeout in seconds (default: 15.0)
    
Returns:
    Dict containing variant information with keys:
    - variants: List of variant dictionaries, each containing:
        - id: Variant identifier
        - parent_sku: Parent product SKU
        - product_sku: Child product SKU for this variant
        - option_values: List of option values (attribute_code, uid, value_index)
    - count: Number of variants retrieved
    - status: Success or error status
    
Example:
    >>> result = get_product_variants(
    ...     environment_id='3f73a49a-3137-472c-bb0d-39d0e7925d86',
    ...     store_view_code='test',
    ...     store_code='test',
    ...     website_code='test',
    ...     skus=['CAT-249']
    ... )
    >>> print(result['count'])
    4
    >>> for variant in result['variants']:
    ...     print(f"{variant['product_sku']}: {[opt['attribute_code'] for opt in variant['option_values']]}")

Inputs: skus (required), store_code (required), website_code (required), environment_id (required), +3 more. Returns: result

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4/5.0

    Scored across 7 tools

    Disambiguation4/5

    Most tools target distinct resources (products, variants, overrides, categories, environments, store views). One pair, get_environment_details and get_environment_store_views, has overlapping functionality but is differentiated by output structure.

    Naming Consistency4/5

    All tools use snake_case with a verb-noun pattern. The slight inconsistency of 'find_' versus 'get_' for one tool is minor.

    Tool Count5/5

    With 7 tools covering environment info, store views, products, variants, overrides, and permissions, the count is well-scoped for a read-only catalog service.

    Completeness4/5

    The tool set covers key read operations for a catalog service. Missing search or mutation capabilities, but those may be out of scope for this server.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers