MCP for AI assistants
Content Library runs a Model Context Protocol server, so assistants such as Claude can search your catalog, explain why a product is not ready for a marketplace and fix product content — with the permissions of an API key you choose.
Connect
| Setting | Value |
|---|---|
| Server URL | https://library.retailcommerceai.com/api/mcp |
| Transport | Streamable HTTP (stateless; JSON responses, no SSE stream or sessions) |
| Protocol version | 2025-06-18 |
| Authentication | Authorization: Bearer cl_live_… |
Claude Code:
bash
claude mcp add --transport http content-library https://library.retailcommerceai.com/api/mcp \
--header "Authorization: Bearer cl_live_YOUR_API_KEY"Clients configured with JSON (headers supported):
json
{
"mcpServers": {
"content-library": {
"type": "http",
"url": "https://library.retailcommerceai.com/api/mcp",
"headers": {
"Authorization": "Bearer cl_live_YOUR_API_KEY"
}
}
}
}Choose the key's scopes deliberately
The assistant can do whatever the key allows. Use a read-only key (products:read, catalog:read, channels:read) for research and reporting; add products:write only when you want the assistant to edit products. Tools the key cannot use are not offered to the assistant.
Tools
| Tool | Scope | What it does |
|---|---|---|
search_products | products:read | Find products by text, status, category, collection, brand, tag or change date |
get_product | products:read | Everything about one product by SKU; locale for translated content |
list_categories | catalog:read | The category tree with codes, paths and product counts |
list_channels | channels:read | Channels with ready, published, outdated and failing counts and top issues |
get_channel_payload | channels:read | One product on one channel: mapped values, issues and the API payload |
update_product | products:write | Change fields of a product (versioned, restorable) |
- Every tool has a JSON Schema for its arguments (returned by tools/list) and returns JSON as text and structured content.
update_producttakesskuandchanges— the same fields asPATCH /products/{sku}— plus an optionalexpectedVersion. Changes are recorded in the product history with the API key as the author.- Errors a model can fix (unknown SKU, invalid value) come back as tool results with isError, not as protocol errors.
- Calls count against the key's rate limit like REST requests.
Raw JSON-RPC
Any HTTP client can talk to the server. Each POST carries one JSON-RPC 2.0 message:
bash
curl -X POST https://library.retailcommerceai.com/api/mcp \
-H "Authorization: Bearer cl_live_YOUR_API_KEY" \
-H "Content-Type: application/json" \
-H "Accept: application/json, text/event-stream" \
-H "MCP-Protocol-Version: 2025-06-18" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"get_channel_payload","arguments":{"channel":"Amazon.ae","sku":"FR-OUD-100"}}}'Supported methods: initialize, ping, tools/list and tools/call. Notifications (such as notifications/initialized) are accepted with 202. GET and DELETE answer 405 because the server keeps no sessions.