An MCP server and toolkit for integrating with the commercetools platform APIs.
[!IMPORTANT]
Important Note: Commerce MCP is provided free of charge as an early access service. Our Service Level Agreement do not apply to Commerce MCP, and it is provided on an "as-is" basis.
This repository contains both a MCP server (which you can integrate with many MCP clients) and agent essentials that can be used from within agent frameworks.
To run the commercetools MCP server using npx, use the following command:
# To set up all available tools
npx -y @commercetools/mcp-essentials --tools=all --clientId=CLIENT_ID --clientSecret=CLIENT_SECRET --projectKey=PROJECT_KEY --authUrl=AUTH_URL --apiUrl=API_URL
# To set up all read-only tools
npx -y @commercetools/mcp-essentials --tools=all.read --clientId=CLIENT_ID --clientSecret=CLIENT_SECRET --projectKey=PROJECT_KEY --authUrl=AUTH_URL --apiUrl=API_URL
# To set up specific tools
npx -y @commercetools/mcp-essentials --tools=products.read,products.create --clientId=CLIENT_ID --clientSecret=CLIENT_SECRET --projectKey=PROJECT_KEY --authUrl=AUTH_URL --apiUrl=API_URL
Make sure to replace CLIENT_ID
, CLIENT_SECRET
, PROJECT_KEY
, AUTH_URL
, and API_URL
with your actual values. If using the customerId parameter, replace CUSTOMER_ID
with the actual customer ID. Alternatively, you could set the API_KEY in your environment variables.
Add the following to your claude_desktop_config.json
. See here for more details.
{
"mcpServers": {
"commercetools": {
"command": "npx",
"args": [
"-y",
"@commercetools/mcp-essentials@latest",
"--tools=all",
"--clientId=CLIENT_ID",
"--clientSecret=CLIENT_SECRET",
"--authUrl=AUTH_URL",
"--projectKey=PROJECT_KEY",
"--apiUrl=API_URL"
]
}
}
}
Alternative: To use only read-only tools, replace "--tools=all"
with "--tools=all.read"
Tool | Description |
---|---|
all | Enable all available tools (read, create, and update operations) |
all.read | Enable all read-only tools (safe for read-only access) |
To view information on how to develop the MCP server, see this README.
The commercetools MCP Essentials enables popular agent frameworks including LangChain, Vercel's AI SDK, and Model Context Protocol (MCP) to integrate with APIs through function calling. The library is not exhaustive of the entire commercetools API. It includes support for TypeScript and is built directly on top of the [Node][node-sdk] SDK.
Included below are basic instructions, but refer to the TypeScript package for more information.
You don't need this source code unless you want to modify the package. If you just want to use the package run:
npm install @commercetools/agent-essentials
The library needs to be configured with your commercetools project API client credentials which is available in your Merchant center.
Important: Ensure that the API client credentials have the necessary scopes aligned with the actions you configure in the agent essentials. For example, if you configure products: { read: true }
, your API client must have the view_products
scope.
Additionally, configuration
enables you to specify the types of actions that can be taken using the agent essentials.
import { CommercetoolsAgentEssentials } from "@commercetools/agent-essentials/langchain";
const commercetoolsAgentEssentials = new CommercetoolsAgentEssentials({
clientId: process.env.CLIENT_ID!,
clientSecret: process.env.CLIENT_SECRET!,
projectKey: process.env.PROJECT_KEY!,
authUrl: process.env.AUTH_URL!,
apiUrl: process.env.API_URL!,
configuration: {
actions: {
products: {
read: true,
create: true,
update: true,
},
project: {
read: true,
},
},
},
});
The agent essentials work with LangChain and Vercel's AI SDK and can be passed as a list of tools. For example:
import { AgentExecutor, createStructuredChatAgent } from "langchain/agents";
const tools = commercetoolsAgentEssentials.getTools();
const agent = await createStructuredChatAgent({
llm,
tools,
prompt,
});
const agentExecutor = new AgentExecutor({
agent,
tools,
});
The commercetools MCP Essentials also supports setting up your own MCP server. For example:
import { CommercetoolsAgentEssentials } from "@commercetools/agent-essentials/modelcontextprotocol";
import { StdioServerTransport } from "@modelcontextprotocol/sdk/server/stdio.js";
const server = new CommercetoolsAgentEssentials({
clientId: process.env.CLIENT_ID!,
clientSecret: process.env.CLIENT_SECRET!,
projectKey: process.env.PROJECT_KEY!,
authUrl: process.env.AUTH_URL!,
apiUrl: process.env.API_URL!,
configuration: {
actions: {
products: {
read: true,
},
cart: {
read: true,
create: true,
update: true,
},
},
},
});
async function main() {
const transport = new StdioServerTransport();
await server.connect(transport);
console.error("My custom commercetools MCP Server running on stdio");
}
main().catch((error) => {
console.error("Fatal error in main():", error);
process.exit(1);
});
Returns the current set of available tools that can be used with LangChain, AI SDK, or other agent frameworks:
const tools = commercetoolsAgentEssentials.getTools();
Get up-to-date EC2 pricing information with one call. Fast. Powered by a pre-parsed AWS pricing catalogue.
A remote MCP server deployable on Cloudflare Workers with OAuth login support, using Cloudflare KV for data storage.
Interact with Twelve Data APIs to access real-time and historical financial market data for your AI agents.
AniList MCP server for accessing AniList API data
Provides real-time AWS security guidance by fetching official security playbooks from the AWS Customer Playbook Framework GitHub repository.
Backs up Cloudflare projects to a specified GitHub repository.
A remote MCP server deployable on Cloudflare Workers without authentication.
Query OpenAI models directly from Claude using MCP protocol
Manage DigitalOcean resources and perform actions using the DigitalOcean API.
Interact with the RAD Security platform which provides AI-powered security insights for Kubernetes and cloud environments.