commercetools/connect-mcp-server-template
If you are the rightful owner of connect-mcp-server-template and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
This project provides a template for building a Model Context Protocol (MCP) server for commercetools Composable Commerce.
Remote MCP Server Template [Early version]
This project provides a template for building a Model Context Protocol (MCP) server for commercetools Composable Commerce. The MCP server can be hosted on commercetools Connect and is designed to be easily configurable and extensible for various commerce use cases.
Overview
The MCP server acts as a servicable channel to AI agents that enables secure, flexible, and context-aware access to commercetools APIs. It supports both public and private authentication modes and allows fine-grained control over available tools and actions.
Features
- Configurable authentication: Supports both
client_credentialsandauth_tokenauthentication. - Tool-based access control: Enable or restrict API actions using the
TOOLSconfiguration. - Admin mode: Optionally allow resource creation and editing.
- Easy deployment: Ready to be hosted on commercetools Connect.
Configuration
Configuration is managed via the connect.yaml file. Below is an explanation of each field:
standardConfiguration
| Key | Description | Default | Required |
|---|---|---|---|
AUTH_TYPE | Use client_credentials for public MCP with configured API client, or auth_token for Bearer token access. | client_credentials | No |
AUTH_URL | commercetools Composable Commerce Auth URL. | Yes | |
API_URL | commercetools Composable Commerce API URL. | Yes | |
TOOLS | Comma-separated list of tools (see documentation). Use all for all tools. | all | Yes |
IS_ADMIN | Set to true to allow resource creation and editing. Review your use case before enabling. | false | No |
securedConfiguration
| Key | Description | Required |
|---|---|---|
PROJECT_KEY | commercetools Composable Commerce project key. | Yes |
CLIENT_ID | commercetools Composable Commerce client ID. | Yes |
CLIENT_SECRET | commercetools Composable Commerce client secret. | Yes |
Authentication
- Public Mode (
client_credentials):
Uses the configured API client credentials for authentication. - Private Mode (
auth_token):
Requires anAuthorizationheader with a Bearer token in each request.
Tool Configuration
The TOOLS field controls which API actions are available.
- Use a comma-separated list (e.g.,
products.read,cart.create). - Use
allto enable all available tools. - Refer to the MCP Essentials documentation for the full list.
How to develop
-
Clone the repository:
git clone <your-repo-url> cd composable-commerce-remote-mcp -
Install dependencies:
npm install -
Configure your environment:
- Edit
connect.yamlto set your project credentials and desired configuration. - Optionally, use a
.envfile for local development.
- Edit
-
Run the MCP server locally:
npm run build npm start -
Deploy to Connect:
- Package your service and deploy using commercetools Connect documentation.
Support
For questions or issues, please contact the commercetools support team.