Skip to main content

Mobile, AI & integrations

CLI & AI Connectors

Command-line interface, MCP connectors, and AI workflow setup.

What You Can Do

  • Email OTP login from terminal with account, workspace, branch, permission, and quota checks
  • Inventory browsing, full-text search, reports, activity logs, and bulk operations from CLI
  • Click-connect Claude/OpenAI connectors from Settings without manually creating API keys
  • Public MCP endpoint for connector integrations with a read-first tool catalog
  • JSON/table/CSV output modes and shell piping support for automation workflows

Install and Authenticate CLI

Install the Stocklyst CLI globally from npm:

npm i -g stocklyst

Or run without installing:

npx stocklyst --help

Email OTP login:

stocklyst login
stocklyst status --format table

Core CLI Examples

stocklyst whoami --format table
stocklyst items list --category brake-parts --stock-level low --format table
stocklyst items search --query "brake pad"
stocklyst items get --sku SKU-001
stocklyst items get --barcode 012345678905
stocklyst report summary --format table
stocklyst report valuation --location "Harare-Main" --currency USD
stocklyst report movement --from 2025-01-01 --to 2025-01-31 --tier member
stocklyst report top-movers --period 30d --limit 20
stocklyst report dead-stock --days 90
stocklyst import ./items.csv --mode upsert --wait
stocklyst bulk-update ./updates.csv --dry-run true

Output and piping support:

stocklyst items list --format json | jq '.[] | select(.status == "low")'

Connector Setup (Claude + OpenAI)

For non-technical users, use click-connect in web app:

  1. Open Settings → Preferences → Integrations
  2. Click Connect on Claude or OpenAI
  3. Complete OAuth browser consent
  4. Connector starts with your active workspace and existing permissions

Use the MCP Server URL below for both ChatGPT Apps and Claude Desktop:

https://stocklyst.com/api/v1/mcp/stream

ChatGPT Apps Setup

  1. Open ChatGPT → Settings → Apps → New App
  2. Set the MCP Server URL to https://stocklyst.com/api/v1/mcp/stream
  3. Select OAuth and Dynamic Client Registration
  4. Complete the Stocklyst OAuth consent flow

Claude Desktop Setup

Add to your Claude Desktop MCP config:

{
  "mcpServers": {
    "stocklyst": {
      "url": "https://stocklyst.com/api/v1/mcp/stream"
    }
  }
}

Restart Claude Desktop and approve the OAuth prompt for your Stocklyst workspace.

Machine-Readable Guides

  • /api/v1/help/guide?format=json returns the full platform guide
  • /api/v1/help/cli-guide?format=json returns CLI commands and install steps
  • /api/v1/help/mcp-guide?format=json returns MCP connector status and runbook details
  • /api/v1/integrations/connectors returns connector availability and connection state
CLI & AI Connectors — Documentation | Stocklyst | Stocklyst