{"id":5851,"date":"2026-08-24T19:09:04","date_gmt":"2026-08-24T10:09:04","guid":{"rendered":"https:\/\/storecrm.com\/help\/?p=5851"},"modified":"2026-09-04T15:25:59","modified_gmt":"2026-09-04T06:25:59","slug":"ai-assistant-external-client","status":"publish","type":"post","link":"https:\/\/storecrm.com\/help\/en\/setting\/ai-assistant-external-client\/","title":{"rendered":"Use StoreCRM from Codex or Claude Code"},"content":{"rendered":"<p>With the StoreCRM Skill, you can ask Codex or Claude Code to retrieve, analyze, and validate StoreCRM data and create drafts. This integration does not register an MCP server. It uses an AI API Credential issued by StoreCRM together with the dedicated Skill.<\/p>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-external-ai-connection-overview-20260904.png' alt='Overview of connecting Codex or Claude Code using the StoreCRM Skill and an AI API Credential instead of MCP' class=\"wp-image-6255\"\/><\/figure>\n<h2>Supported AI tools<\/h2>\n<ul>\n<li><strong>Codex\uff1a<\/strong>Codex environments that support Codex CLI, IDE extensions, and local Skills<\/li>\n<li><strong>Claude Code\uff1a<\/strong>Claude Code with shell and local Skill support<\/li>\n<\/ul>\n<p>StoreCRM cannot be operated by simply pasting the Skill file into Claude Web or Claude Desktop. You also cannot connect by registering a StoreCRM URL in the \"MCP server URL\" field of a general-purpose MCP client.<\/p>\n<h2>Before you begin<\/h2>\n<ul>\n<li>Permission to open [Settings] \u2192 [AI settings] in StoreCRM<\/li>\n<li>A device that can run Codex or Claude Code<\/li>\n<li>A folder where the Skill can be saved and a network that can connect to the StoreCRM API<\/li>\n<li>Environment variables or secret management that can store the token securely<\/li>\n<\/ul>\n<h2>1. Download the StoreCRM Skill<\/h2>\n<p><a class=\"wp-block-button__link\" href=\"https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/storecrm-ai-assistant.zip\" download>Download storecrm-ai-assistant.zip<\/a><\/p>\n<p>The ZIP file contains<code>SKILL.md<\/code>. After extraction, make sure its location is<code>storecrm-ai-assistant\/SKILL.md<\/code>. Do not write the token in the Skill file.<\/p>\n<h2>2. Create an AI API Credential<\/h2>\n<ol>\n<li>In StoreCRM, open [Settings] \u2192 [AI Settings].<\/li>\n<li>Enter a name that identifies the device, such as Codex local or Claude Code PC.<\/li>\n<li>Select a scope. For your first use, we recommend<code>draft_only<\/code>.<\/li>\n<li>Set an expiration date if needed, then click [Create token].<\/li>\n<\/ol>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-ai-api-credential-create-20260904.png' alt='AI settings screen for configuring an AI API Credential name, scope, and expiration date' class=\"wp-image-6257\"\/><\/figure>\n<h3>Choosing a scope<\/h3>\n<ul>\n<li><strong>read_only\uff1a<\/strong>Retrieve, explain, analyze, and validate data, including masked information.<\/li>\n<li><strong>draft_only (recommended):<\/strong>Includes read_only access and allows safe draft creation and updates. It does not send, schedule, enable, publish, delete, or perform bulk updates.<\/li>\n<li><strong>elevated\uff1a<\/strong>Allows creation of operation requests for high-risk actions. This is not recommended for production stores. Neither the settings screen nor the AI directly performs sending or deletion.<\/li>\n<\/ul>\n<h2>3. Save the connection details shown only once<\/h2>\n<p>Immediately after creation, the raw token and three environment variables are displayed only once. Save them securely before closing the screen.<\/p>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-ai-api-token-once-20260904.png' alt='Token and environment variables displayed once after creating an AI API credential' class=\"wp-image-6259\"\/><\/figure>\n<pre class='wp-block-code'><code>STORECRM_AI_API_BASE_URL=...\nSTORECRM_AI_API_TOKEN=...\nSTORECRM_TENANT_ID=...<\/code><\/pre>\n<p><strong>Important:<\/strong>Do not paste the token into a Skill file, chat message, Git, Jira, URL, log, or screenshot. If it is lost, revoke the old Credential and create a new one.<\/p>\n<h2>4. Install the Skill in Codex<\/h2>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-external-ai-codex-skill-install-20260904.png' alt='Steps for installing the StoreCRM Skill in a personal or project skills folder for Codex' class=\"wp-image-6261\"\/><\/figure>\n<h3>Use it for all personal work<\/h3>\n<pre class='wp-block-code'><code># Windows PowerShell\nNew-Item -ItemType Directory -Force \"$HOME\\.agents\\skills\\storecrm-ai-assistant\"\nExpand-Archive \".\\storecrm-ai-assistant.zip\" \"$HOME\\.agents\\skills\\storecrm-ai-assistant\" -Force<\/code><\/pre>\n<pre class='wp-block-code'><code># macOS \/ Linux\nmkdir -p \"$HOME\/.agents\/skills\/storecrm-ai-assistant\"\nunzip -o .\/storecrm-ai-assistant.zip -d \"$HOME\/.agents\/skills\/storecrm-ai-assistant\"<\/code><\/pre>\n<p>To use it only in a specific repository, place it in<code>.agents\/skills\/storecrm-ai-assistant\/SKILL.md<\/code>at the repository root. Start Codex and use<code>\/skills<\/code>to confirm that the Skill appears. If it does not appear, restart Codex.<\/p>\n<h2>5. Install the Skill in Claude Code<\/h2>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-external-ai-claude-code-skill-install-20260904.png' alt='Steps for installing the StoreCRM Skill in a personal or project skills folder for Claude Code' class=\"wp-image-6263\"\/><\/figure>\n<h3>Use it for all personal work<\/h3>\n<pre class='wp-block-code'><code># Windows PowerShell\nNew-Item -ItemType Directory -Force \"$HOME\\.claude\\skills\\storecrm-ai-assistant\"\nExpand-Archive \".\\storecrm-ai-assistant.zip\" \"$HOME\\.claude\\skills\\storecrm-ai-assistant\" -Force<\/code><\/pre>\n<pre class='wp-block-code'><code># macOS \/ Linux\nmkdir -p \"$HOME\/.claude\/skills\/storecrm-ai-assistant\"\nunzip -o .\/storecrm-ai-assistant.zip -d \"$HOME\/.claude\/skills\/storecrm-ai-assistant\"<\/code><\/pre>\n<p>To use it only in a specific project, place it in<code>.claude\/skills\/storecrm-ai-assistant\/SKILL.md<\/code>at the project root. In Claude Code, run<code>\/storecrm-ai-assistant<\/code>to confirm that it loads.<\/p>\n<h2>6. Set environment variables and start the AI tool<\/h2>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-external-ai-environment-variables-20260904.png' alt='Examples of setting the three StoreCRM environment variables in PowerShell or macOS and Linux' class=\"wp-image-6265\"\/><\/figure>\n<pre class='wp-block-code'><code># Windows PowerShell\n$env:STORECRM_AI_API_BASE_URL=\"Value displayed in StoreCRM\"\n$env:STORECRM_AI_API_TOKEN=\"Value displayed in StoreCRM\"\n$env:STORECRM_TENANT_ID=\"Value displayed in StoreCRM\"\ncodex # or claude<\/code><\/pre>\n<pre class='wp-block-code'><code># macOS \/ Linux\nexport STORECRM_AI_API_BASE_URL=\"Value displayed in StoreCRM\"\nexport STORECRM_AI_API_TOKEN=\"Value displayed in StoreCRM\"\nexport STORECRM_TENANT_ID=\"Value displayed in StoreCRM\"\ncodex # or claude<\/code><\/pre>\n<p>Start Codex or Claude Code from the same terminal session where you set the environment variables. If you persist them, use the secret management method specified by your operating system or organization.<\/p>\n<h2>7. Verify the connection with a read-only request<\/h2>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-external-ai-connectivity-check-20260904.png' alt='Connection checklist for the Skill, environment variables, tenant, permissions, and safe validation operations' class=\"wp-image-6267\"\/><\/figure>\n<p>Start with the following request.<\/p>\n<pre class='wp-block-code'><code>Use the StoreCRM Skill to check which StoreCRM operations are available<\/code><\/pre>\n<p>Check Skill recognition, the three environment variables, the target tenant, the scope, and the list of available tools. Do not display the token itself in the response. Then try retrieval and validation that do not send or update anything.<\/p>\n<ul>\n<li>Compare delivery metrics for the last 30 days with the previous period.<\/li>\n<li>Validate these segment conditions.<\/li>\n<li>Explain the available StoreCRM operations and the operations that are not currently permitted.<\/li>\n<\/ul>\n<h2>8. Request an operation in StoreCRM<\/h2>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-external-ai-operation-examples-20260904.png' alt='Example requests to retrieve and validate StoreCRM data and create drafts from Codex or Claude Code' class=\"wp-image-6269\"\/><\/figure>\n<h3>Example request to create a draft<\/h3>\n<pre class='wp-block-code'><code>Create draft email content and a campaign for a summer sale.\nAudience: Customers who purchased within the last 90 days and can receive email\nDiscount: 10% off the selected collection\nPeriod: Through August 31\nCTA: Store product list<\/code><\/pre>\n<p>If the request lacks required details, the AI asks about existing content, recipients, Email or LINE, discounts or target products, dates, coupons, and the CTA. If both Email and LINE are required, separate campaign drafts are created for each channel.<\/p>\n<p>Available operations are determined by the AI API Credential scope and the current StoreCRM tool catalog. If a tool is unavailable or not permitted, stop without guessing or calling a standard StoreCRM API.<\/p>\n<h2>9. When web approval is required<\/h2>\n<figure class='wp-block-image size-full'><img src='https:\/\/storecrm.com\/help\/wp-content\/uploads\/2026\/08\/main-storecrm-en-external-ai-web-approval-20260904.png' alt='Workflow for receiving an approval request in an external AI, reviewing it in StoreCRM Web, and retrying the same request' class=\"wp-image-6271\"\/><\/figure>\n<ol>\n<li>When the external AI displays<code>approval_required<\/code>together with a safe relative web URL, pause the operation.<\/li>\n<li>Open the web screen using your regular StoreCRM account. An AI API Credential is not used for web login.<\/li>\n<li>Review the target, changes, item count, and safety status, then approve or reject the request.<\/li>\n<li>After approval, return to the external AI and retry the same request without changing its contents.<\/li>\n<\/ol>\n<p>If you change the target or content after approval, it must be reviewed again as a new request. Do not add the token to an approval URL. Approval does not mean that sending is complete, so confirm the final state in StoreCRM.<\/p>\n<h2>Operations that are not executed automatically<\/h2>\n<p>Under the standard<code>read_only<\/code>\uff0f\/<code>draft_only<\/code>scope, the AI does not send, schedule, enable, publish, delete, perform bulk updates, synchronize Shopify, or call external delivery providers. Actions such as test sends might only create a confirmation request for StoreCRM Web.<\/p>\n<h2>Change or revoke a Credential<\/h2>\n<ul>\n<li><strong>Save scope:<\/strong>Review and reduce permissions to the minimum required when your operational needs change.<\/li>\n<li><strong>rotate\uff1a<\/strong>Issue a new token and update the external AI environment variables with the new value.<\/li>\n<li><strong>revoke\uff1a<\/strong>Revoke it immediately if a device is lost, a leak is suspected, or it is no longer needed.<\/li>\n<li><strong>Delete:<\/strong>Delete unused Credentials from the list.<\/li>\n<\/ul>\n<h2>If you cannot connect<\/h2>\n<ul>\n<li>Check the Skill location and the<code>SKILL.md<\/code>directory hierarchy.<\/li>\n<li>Confirm that you started Codex or Claude Code from the same terminal session where you set the environment variables.<\/li>\n<li>Check the three environment variables for extra spaces or line breaks. Do not print their values to the screen or logs.<\/li>\n<li>Check the Credential expiration date, revocation status, and scope.<\/li>\n<li>Confirm that you are not using an old token after rotation.<\/li>\n<li><code>STORECRM_TENANT_ID<\/code>matches the store that issued the Credential.<\/li>\n<li>Confirm that the device or AI tool sandbox can connect to the StoreCRM API over the network.<\/li>\n<li>If StoreCRM is registered as an MCP server, remove it and connect using the StoreCRM Skill method.<\/li>\n<\/ul>\n<h2>Related pages<\/h2>\n<p>For information about AI Assistant in StoreCRM Web, see<a href=\"https:\/\/storecrm.com\/help\/en\/setting\/ai-assistant\/\">Use AI Assistant<\/a>for detailed instructions.<\/p>","protected":false},"excerpt":{"rendered":"StoreCRM\u5c02\u7528Skill\u3092\u4f7f\u3046\u3068\u3001Codex\u307e\u305f\u306fClaude Code\u304b\u3089StoreCRM\u306e\u53c2\u7167\u30fb\u5206\u6790 [&hellip;]","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16],"tags":[],"class_list":["post-5851","post","type-post","status-publish","format-standard","hentry","category-setting"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/posts\/5851","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/comments?post=5851"}],"version-history":[{"count":3,"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/posts\/5851\/revisions"}],"predecessor-version":[{"id":6273,"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/posts\/5851\/revisions\/6273"}],"wp:attachment":[{"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/media?parent=5851"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/categories?post=5851"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/storecrm.com\/help\/en\/wp-json\/wp\/v2\/tags?post=5851"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}