Skill: russell-sketch/tolstoy-mcp (version 1.0.0)

--- name: tolstoy-mcp description: Connect OpenClaw to Tolstoy's video commerce platform via MCP. Create widgets, manage media, generate AI videos, search products, and publish to Shopify/Instagram/TikTok. Use when the user wants to work with Tolstoy, create video widgets, manage e-commerce content, or integrate with Tolstoy's platform. triggers: tolstoy, video commerce, shopper widget, product video, AI video, Shopify widget, Tolstoy platform, gotolstoy --- # Tolstoy MCP Integration Connect OpenClaw to **Tolstoy** — the video commerce platform for e-commerce brands. This skill configures OpenClaw to use Tolstoy's MCP server, giving the AI access to create and manage video widgets, media, products, and publishing. ## Prerequisites - A Tolstoy account at [platform.gotolstoy.com](https://platform.gotolstoy.com) - OpenClaw installed and configured ## Setup ### Option A: Automatic (recommended) From the skill directory, run: ```bash node setup.js ``` This adds the Tolstoy MCP server to `~/.openclaw/openclaw.json` (or `$OPENCLAW_CONFIG_PATH` if set). If the config file doesn't exist, it will be created. ### Option B: Manual Edit `~/.openclaw/openclaw.json` (or your OpenClaw config path) and add to `mcpServers`: ```json "tolstoy": { "type": "http", "url": "https://apilb.gotolstoy.com/mcp/v1/mcp", "auth": "oauth" } ``` If your OpenClaw version uses SSE transport instead, use `"type": "sse"`. ### Restart OpenClaw Restart OpenClaw (or reload config if supported) so it picks up the new MCP server. ### Authenticate When you first use a Tolstoy tool, OpenClaw will redirect you to log in to your Tolstoy account. You will: 1. Sign in at platform.gotolstoy.com (or be redirected there) 2. Select the workspace you want to connect 3. Authorize the MCP client After authorization, the connection persists for future sessions. ## Available Tools Once connected, OpenClaw has access to Tolstoy's full tool set: | Category | Tools | |----------|-------| | **Widgets** | Create, update, publish, delete player and shopper widgets | | **Media** | List, search, get media from your library | | **Products** | Search products, list catalog, get product details | | **Studio** | Generate AI images, animate images, text-to-video, edit videos | | **Templates** | List templates, run AI templates, get template details | | **Publishing** | Publish assets to Instagram, TikTok Shop, Shopify, Meta Ads | | **Analytics** | Query store and performance data | | **Brands** | Search brands and stores | ## Example Prompts - "Create a shopper widget for my product catalog" - "Generate an AI video from this product image" - "List my Tolstoy widgets and their publish status" - "Search my media library for videos tagged with 'summer'" - "Publish this asset to my Shopify store" ## Troubleshooting **Connection fails:** Ensure the URL is exactly `https://apilb.gotolstoy.com/mcp/v1/mcp` and that your OpenClaw supports OAuth for remote MCP servers. **Auth redirect fails:** Some MCP clients require configuring allowed redirect URIs. Check [Tolstoy MCP docs](https://platform.gotolstoy.com/settings/integrations/mcp) for the latest setup. **No tools available:** You must complete the OAuth flow first. Try a simple prompt like "list my Tolstoy widgets" to trigger the login redirect. ## Links - [Tolstoy Platform](https://platform.gotolstoy.com) - [MCP Settings](https://platform.gotolstoy.com/settings/integrations/mcp) — Get your MCP URL and config - [Model Context Protocol](https://modelcontextprotocol.io)

path: PUBLISH.md
content: # Publishing to ClawHub

## Prerequisites

1. **ClawHub CLI** — `npm install -g clawhub`
2. **ClawHub account** — Sign up at [clawhub.ai](https://clawhub.ai)
3. **GitHub account** — Must be at least 1 week old to publish

## Publish Steps

### 1. Authenticate

```bash
clawhub login
clawhub whoami   # verify
```

### 2. Prepare Bundle (exclude .git)

ClawHub may fail if `.git` is present. Copy to a clean directory:

```bash
rsync -av --exclude=.git --exclude=node_modules \
  packages/clawhub-tolstoy-skill/ /tmp/tolstoy-mcp-skill/
```

### 3. Publish

```bash
clawhub publish /tmp/tolstoy-mcp-skill \
  --slug tolstoy-mcp \
  --name "Tolstoy MCP" \
  --version 1.0.0 \
  --changelog "Initial release - connect OpenClaw to Tolstoy's video commerce platform"
```

### 4. Known Issues

- **CLI v0.7.0** — May fail with `acceptLicenseTerms invalid value`. Try a newer CLI version or check [clawhub#660](https://github.com/openclaw/clawhub/issues/660).
- **SKILL.md required** — Ensure SKILL.md is in the root of the published directory.

## What Gets Published

The skill bundle includes:
- `SKILL.md` — AI instructions and setup (automatic + manual options)
- `setup.js` — One-command config: `node setup.js` adds Tolstoy MCP to openclaw.json
- `claw.json`, `clawhub.json`, `README.md`

## Version Updates

For subsequent releases, bump version in `claw.json`, `clawhub.json`, and `package.json`, then:

```bash
clawhub publish /tmp/tolstoy-mcp-skill \
  --slug tolstoy-mcp \
  --name "Tolstoy MCP" \
  --version 1.1.0 \
  --changelog "Describe changes"
```


path: README.md
content: # Tolstoy MCP — ClawHub Skill

Connect [OpenClaw](https://openclaw.ai) to [Tolstoy](https://gotolstoy.com), the video commerce platform for e-commerce brands.

## What This Does

This skill configures OpenClaw to use Tolstoy's MCP (Model Context Protocol) server. Once installed and authenticated, you can use natural language to:

- **Create and manage widgets** — Player widgets, shopper widgets, publish to your store
- **Work with media** — Search your library, get assets, manage video content
- **Product catalog** — Search products, list catalog, get product details
- **AI Studio** — Generate images, animate images, text-to-video, edit videos
- **Templates** — Run AI templates for marketing content
- **Publishing** — Publish to Instagram, TikTok Shop, Shopify, Meta Ads
- **Analytics** — Query store and performance data

## Installation

### 1. Install via ClawHub

```bash
clawhub install tolstoy/tolstoy-mcp
```

### 2. Run setup (automatic)

From the installed skill directory:

```bash
cd ~/.openclaw/skills/tolstoy-mcp   # or wherever clawhub installs skills
node setup.js
```

This adds the Tolstoy MCP server to your OpenClaw config. Respects `OPENCLAW_CONFIG_PATH` if set.

### 3. Manual setup (alternative)

If you prefer to edit config yourself, add to `~/.openclaw/openclaw.json`:

```json
{
  "mcpServers": {
    "tolstoy": {
      "type": "http",
      "url": "https://apilb.gotolstoy.com/mcp/v1/mcp",
      "auth": "oauth"
    }
  }
}
```

### 4. Authenticate

Restart OpenClaw. When you first use a Tolstoy tool (e.g., "list my Tolstoy widgets"), you'll be redirected to log in to your Tolstoy account. Select your workspace and authorize. The connection persists for future sessions.

## Requirements

- [Tolstoy account](https://platform.gotolstoy.com)
- OpenClaw with MCP support
- OAuth-capable MCP client

## Links

- [Tolstoy Platform](https://platform.gotolstoy.com)
- [MCP Integration Settings](https://platform.gotolstoy.com/settings/integrations/mcp)
- [Model Context Protocol](https://modelcontextprotocol.io)

## License

MIT


path: claw.json
content: {
  "name": "tolstoy-mcp",
  "version": "1.0.0",
  "description": "Connect OpenClaw to Tolstoy's video commerce platform via MCP. Create widgets, manage media, generate AI videos, and publish to Shopify/Instagram/TikTok.",
  "author": "tolstoy",
  "license": "MIT",
  "permissions": ["network"],
  "entry": "SKILL.md",
  "tags": ["mcp", "tolstoy", "video-commerce", "e-commerce", "shopify", "ai-video", "widgets"],
  "category": "integrations"
}


path: clawhub.json
content: {
  "name": "Tolstoy MCP",
  "tagline": "Connect OpenClaw to Tolstoy's video commerce platform — create widgets, AI videos, and publish to Shopify.",
  "description": "This skill configures OpenClaw to use Tolstoy's MCP server. Tolstoy is the video commerce platform for e-commerce brands, powering shopper widgets, AI-generated product videos, and publishing to Shopify, Instagram, TikTok Shop, and Meta Ads.\n\nOnce installed and authenticated via OAuth, you can use natural language to create and manage widgets, search your media library, generate AI images and videos, run templates, and publish content to your store.\n\nRequires a Tolstoy account at platform.gotolstoy.com.",
  "category": "integrations",
  "tags": ["mcp", "tolstoy", "video-commerce", "e-commerce", "shopify", "ai-video", "widgets", "oauth"],
  "version": "1.0.0",
  "license": "MIT",
  "pricing": "free",
  "support_url": "https://platform.gotolstoy.com/settings/integrations/mcp",
  "homepage": "https://gotolstoy.com"
}


path: package.json
content: name: @tolstoy/clawhub-tolstoy-skill
version: 1.0.0
private: yes
description: ClawHub skill to connect OpenClaw to Tolstoy's MCP server

path: publish-to-clawhub.sh
content: #!/bin/bash
# Publish Tolstoy MCP skill to ClawHub
# Run this AFTER: clawhub login (or clawhub login --token YOUR_TOKEN)

set -e

SKILL_DIR="$(cd "$(dirname "$0")" && pwd)"
BUNDLE_DIR="/tmp/tolstoy-mcp-skill"

echo "Preparing bundle from $SKILL_DIR..."
rm -rf "$BUNDLE_DIR"
mkdir -p "$BUNDLE_DIR"
cp -r "$SKILL_DIR"/* "$BUNDLE_DIR"/
rm -rf "$BUNDLE_DIR/node_modules" 2>/dev/null || true

echo "Publishing to ClawHub..."
clawhub publish "$BUNDLE_DIR" \
  --slug tolstoy-mcp \
  --name "Tolstoy MCP" \
  --version 1.0.0 \
  --changelog "Initial release - connect OpenClaw to Tolstoy's video commerce platform"

echo "Done. Check https://clawhub.ai for the skill."


path: setup.js
content: #!/usr/bin/env node
/**
 * Tolstoy MCP — OpenClaw setup script
 * Adds the Tolstoy MCP server to your openclaw.json config.
 *
 * Usage: node setup.js
 * Or from skill dir: node setup.js
 *
 * Respects OPENCLAW_CONFIG_PATH env var. Default: ~/.openclaw/openclaw.json
 */

const fs = require('fs');
const path = require('path');

const TOLSTOY_MCP_ENTRY = {
  type: 'http',
  url: 'https://apilb.gotolstoy.com/mcp/v1/mcp',
  auth: 'oauth',
};

function getConfigPath() {
  if (process.env.OPENCLAW_CONFIG_PATH) {
    return path.resolve(process.env.OPENCLAW_CONFIG_PATH);
  }
  const home = process.env.HOME || process.env.USERPROFILE || process.env.HOMEPATH;
  if (!home) {
    console.error('Could not determine home directory. Set OPENCLAW_CONFIG_PATH.');
    process.exit(1);
  }
  return path.join(home, '.openclaw', 'openclaw.json');
}

function main() {
  const configPath = getConfigPath();

  let config;
  try {
    const raw = fs.readFileSync(configPath, 'utf8');
    config = JSON.parse(raw);
  } catch (err) {
    if (err.code === 'ENOENT') {
      config = {};
    } else {
      console.error(`Failed to parse ${configPath}:`, err.message);
      console.error('If your config uses JSON5 (comments, trailing commas), add the Tolstoy MCP entry manually.');
      console.error('\nAdd this to mcpServers in your config:');
      console.error(JSON.stringify({ tolstoy: TOLSTOY_MCP_ENTRY }, null, 2));
      process.exit(1);
    }
  }

  config.mcpServers = config.mcpServers || {};
  if (config.mcpServers.tolstoy) {
    console.log('Tolstoy MCP already configured. Updating to latest.');
  }
  config.mcpServers.tolstoy = TOLSTOY_MCP_ENTRY;

  const dir = path.dirname(configPath);
  if (!fs.existsSync(dir)) {
    fs.mkdirSync(dir, { recursive: true });
  }

  fs.writeFileSync(configPath, JSON.stringify(config, null, 2) + '\n', 'utf8');
  console.log(`✓ Tolstoy MCP added to ${configPath}`);
  console.log('  Restart OpenClaw. On first use, you will be prompted to log in to Tolstoy.');
}

main();


Security scan verdicts — ClawScan: suspicious | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)