k-sync API & MCP Reference
Automate ecommerce migrations from AI assistants, agents, and CI/CD pipelines. k-sync exposes a full Model Context Protocol (MCP) server.
Quick Start
1. Get an API token
Go to Settings → API Tokens and create a token with the ks_ prefix.
2. Configure your MCP client
{
"mcpServers": {
"k-sync": {
"url": "https://sync.krokanti.com/api/mcp",
"headers": {
"Authorization": "Bearer ks_your_token_here"
}
}
}
}3. Use it in your AI assistant
Ask Claude or any MCP-compatible assistant: "List my k-sync projects" or "Start a migration for project X to my Shopify store."
Authentication
All API requests require a Bearer token. Tokens are prefixed with ks_ and can be created in your account settings.
POST /api/mcp
Authorization: Bearer ks_your_token_here
Content-Type: application/jsonThe MCP endpoint also accepts NextAuth session cookies for browser-based tooling.
MCP Tools
These tools are available when k-sync is connected as an MCP server.
Projects
list_projectsList all your migration projects.
create_projectCreate a new migration project.
Parameters
name·stringrequiredProject namedescription·stringOptional descriptionsourceType·"woocommerce" | "csv"Default: "woocommerce"get_project_statsGet product pipeline stats for a project (imported/mapped/validated/pushed/error counts).
Parameters
projectId·stringrequiredProject IDConnections
list_connectionsList all your platform connections (WooCommerce and Shopify stores).
Products
list_productsList products in a project with optional filtering.
Parameters
projectId·stringrequiredProject IDstatus·"imported" | "mapped" | "validated" | "pushed" | "error" | "skipped"Filter by statuslimit·numberMax results (default 20, max 100)import_productsTrigger a product import from a WooCommerce connection into a project.
Parameters
projectId·stringrequiredProject IDconnectionId·stringrequiredWooCommerce connection IDget_import_statusPoll the status of an import job.
Parameters
jobId·stringrequiredImport job ID from import_productsMapping & Validation
apply_mappingsApply field mappings to convert normalized product data to Shopify format.
Parameters
projectId·stringrequiredProject IDvalidate_productsValidate all mapped products against Shopify requirements.
Parameters
projectId·stringrequiredProject IDMigration
start_migrationStart pushing validated products to Shopify.
Parameters
projectId·stringrequiredProject IDconnectionId·stringrequiredShopify connection ID (target)get_migration_statusPoll the status of a migration run.
Parameters
projectId·stringrequiredProject IDmigrationId·stringrequiredMigration run IDSEO & Data Quality
get_seo_auditRun an SEO audit on all products in a project. Returns title/description coverage stats and products needing attention.
Parameters
projectId·stringrequiredProject IDcheck_image_healthCheck all product image URLs for accessibility. Returns broken/missing image counts.
Parameters
projectId·stringrequiredProject IDfix_handlesAuto-fix duplicate or missing URL handles across all products in a project.
Parameters
projectId·stringrequiredProject IDdryRun·booleanPreview changes without applying (default: false)Bulk Operations
apply_price_rulesApply price transformation rules to all products (multiply, add fixed amount, round, set minimum/maximum).
Parameters
projectId·stringrequiredProject IDoperation·"multiply" | "add" | "round" | "min" | "max"requiredOperation typevalue·numberrequiredOperand valuedryRun·booleanPreview without applyingmanage_tagsRename, delete, or normalize tags across all products in a project.
Parameters
projectId·stringrequiredProject IDaction·"rename" | "delete" | "normalize"requiredAction to performtag·stringSource tag (required for rename/delete)newTag·stringReplacement tag (required for rename)manage_vendorsRename vendors or bulk-assign a vendor to products missing one.
Parameters
projectId·stringrequiredProject IDaction·"rename" | "fill-missing"requiredAction typevendor·stringSource vendor (required for rename)newVendor·stringReplacement vendor (required for rename or fill-missing)Example: Full Migration via MCP
This is the typical sequence for a complete WooCommerce → Shopify migration:
list_connectionsFind WooCommerce + Shopify connection IDscreate_projectname: "My Store Migration"import_productsPass projectId + WooCommerce connectionIdget_import_statusPoll until status = 'completed'apply_mappingsConvert WooCommerce fields → Shopify formatvalidate_productsCheck for errors before pushstart_migrationPass projectId + Shopify connectionIdget_migration_statusPoll until status = 'completed'Rate Limits
Free
10 req/min
Starter
60 req/min
Pro
300 req/min