SuperAPI AI Directory

marketplace-mcp-install

Agents & models

View repository

Updated 10-15 20:08

About this skill

Installing marketplaces-mcp-ru (WB, Ozon, Yandex Market, Avito) for a non-technical seller

Skill goal: the user said "install WB and Ozon MCP for me" — and within a few minutes tools for working with the seller account appeared in their AI client, without manually editing JSON and without pip install. Dependencies are installed by serve.py itself on first launch (local venv).

Repository: https://github.com/ilyautov/marketplaces-mcp-ru (published, has Releases).

The main path is "dropped the repo → the agent installed it": the user connects the folder with the repository in Cowork (or it is already on the machine), the agent runs install.py — it copies the application to a stable location ~/.marketplace-mcp/app and points the config there. Therefore the connected/downloaded folder can later be moved or deleted — the MCP will not break. The other paths (clone it yourself, pip) are for those who want to tinker by hand.

What's inside: MCP servers wb (Wildberries Seller API), ozon (Ozon Seller API), yandex (Yandex Market Partner API), avito (Avito API for business), plus an optional ozon-perf (Ozon Performance advertising account). Keys are stored locally in ~/.marketplace-mcp/cabinets.json (chmod 600), NOT in the client config and NOT in the repository.


Step 0 — DETERMINE THE ENVIRONMENT (this is critical, do not skip)

The environment determines what you can do yourself and what you can only guide the user through by hand. Be honest about the boundary: do NOT promise what the environment physically cannot do.

You are in Claude Code (or another local CLI where bash = the user's real machine)

Here bash runs ON the user's machine. You can do EVERYTHING automatically:

  • clone/download the repository,
  • run python3 install.py --client claude-code (or the required client),
  • help assemble the keys and save the account,
  • verify the installation serve.py ... --selfcheck.

Environment check: run pwd && uname -a && whoami. If this is the user's home folder on their OS (macOS/Windows/Linux), and not a container — you are local. Go through steps 1→4 yourself.

You are in Cowork (bash = isolated Linux sandbox)

CRITICAL. In Cowork your bash is a separate Linux container. It:

  • does NOT see the user's Claude Desktop config,
  • CANNOT register a host MCP server,
  • CANNOT run serve.py on the user's machine,
  • typing into the user's terminal is forbidden for security reasons.

Therefore in Cowork you do NOT install MCP on the machine yourself. Signs of the sandbox: uname -a shows a Linux container, home folder like /home/... or /sessions/..., the username does not match the real one. Your options in Cowork (in order of preference):

  1. Via Claude Code. If the user has Claude Code, this is the cleanest path. Prepare the exact commands (Steps 1-4) and ask them to run them in Claude Code, or hand the task over there.
  2. Double-click the installer + computer-use. Download/prepare the repository files into a CONNECTED folder (one that both the user and you can see). Then via computer-use (if available and the user has granted access): open the folder in Finder/Explorer and double-click install.command (macOS) / install.bat (Windows) / bash install.sh (Linux). The installer will open in the user's terminal and will ask for the keys itself.
    • ⚠️ Gatekeeper (macOS). If install.command was downloaded by the browser (and not copied), it has a quarantine flag and the double-click will silently fail ("unidentified developer"). Then: right-click → "Open" → "Open", or remove the quarantine once: xattr -d com.apple.quarantine install.command. A copied (not downloaded) file has no quarantine flag — the click will work right away.
    • In Finder, use the menu for navigation "Go → Go to Folder", not the Cmd+Shift+G shortcut (via computer-use the system sheet triggered by the shortcut is caught unreliably).
  3. Walk them through the steps in words. If there is no computer-use, give the user a short, precise checklist: which folder to open, which file to click, what to enter. Don't dump a wall of text — one step at a time.

Don't write in Cowork "I'll install it now" and don't pretend the servers have appeared. Say it straight: "I'm in a sandbox and can't set up MCP on your machine directly — let's do it via double-click / Claude Code".


Step 1 — Get the code onto the user's machine

Local sensible folder: ~/marketplace-mcp (macOS/Linux) or %USERPROFILE%\marketplace-mcp (Windows). In Cowork — the user's connected folder.

⚠️ In Cowork do NOT clone directly into the connected folder. Host FUSE mounting does not support file-locking/unlink, and git clone fails with unable to unlink '.git/config.lock': Operation not permitted. If the repo needs to be cloned — clone into the sandbox (/tmp) and copy WITHOUT .git: git clone … /tmp/mmru && rm -rf /tmp/mmru/.git && cp -R /tmp/mmru/. <папка>/. But more often cloning isn't needed — the folder with the repo is simply connected (Option C).

Option C (main) — the folder is already connected/located on the machine. Go into it, check that it contains install.py и serve.py, and go straight to Step 2. install.py will copy the application into ~/.marketplace-mcp/appitself, so no git operations on the connected folder need to be done — this is what bypasses the FUSE problem.

Option A — git clone (locally only, NOT into a Cowork mount):

cd ~ && git clone https://github.com/ilyautov/marketplaces-mcp-ru && cd marketplaces-mcp-ru

Option B — download the release zip (if git isn't available):

  • Download marketplaces-mcp-ru-v<версия>.zip from Releases, unpack.
  • macOS/Linux: cd ~ && curl -L <RELEASE_ZIP_URL> -o mm.zip && unzip mm.zip

Check Python (3.10+ required):

python3 --version   # или: py -3 --version  (Windows)

If Python isn't installed — see Troubleshooting below, install it first.


Step 2 — Run the installation for the required client

install.py breaks nothing: it finds the config for the OS, appends two (or three) server entries WITHOUT secrets, and backs up the old config. Re-running is safe — it updates the entries.

First ask the user which client they have. Commands (from the repository folder):

Client Command What it does
Claude Desktop (default) python3 install.py --client claude-desktop Writes claude_desktop_config.json, backs up the old one
Claude Code (CLI) python3 install.py --client claude-code PRINTS ready-made claude mcp add ... commands — they need to be run
Codex (CLI) python3 install.py --client codex PRINTS codex mcp add ... commands
OpenCode python3 install.py --client opencode Writes ~/.config/opencode/opencode.json

Important about CLI clients: for claude-code и codex install.py does NOT write the config itself — it prints the commands * mcp add wildberries -- ... wb etc. These lines need to actually be executed (in Claude Code you can do this yourself via bash; for Codex — run the printed commands). At the same time, the keys passed via flags (--wb-token, --ozon-client-id, --ozon-api-key, --yandex-api-key, --avito-client-id, --avito-client-secret, --ozon-perf-*), install.py SAVES into the shared cabinet store ~/.marketplace-mcp/cabinets.json and for these clients too — you can pass them right away with a single command, a separate run to save the keys is not needed.

Just view the config block without changing anything:

python3 install.py --print

After installation in Claude Desktop / OpenCode — restart the client. On first launch serve.py will itself create a venv and install dependencies (this takes a few seconds, all output goes to stderr, stdout stays clean for MCP).


Step 3 — API keys (where to get them and how to save them)

Keys are NEVER placed in the repository or in the client config. They go into the local cabinet ~/.marketplace-mcp/cabinets.json (chmod 600).

Where to get them:

  • Wildberries: seller.wildberries.ru → Settings → API access. Create a token, check the required categories (Content, Prices, Statistics, Marketplace, etc.). This is one token.
  • Ozon (Seller): seller.ozon.ru → Settings → API keys. You need Client-Id (number) and Api-Key.
  • Yandex Market (optional): one Api-Key from partner.market.yandex.ru → Settings → API access. Flag --yandex-api-key.
  • Avito (optional): client_id + client_secret from avito.ru → For business → Integrations → API (OAuth2 client_credentials). Flags --avito-client-id / --avito-client-secret.
  • Ozon Performance (advertising, OPTIONAL): separate Client-Id + Client-Secret from the ADVERTISING Ozon Performance cabinet (OAuth2). These are NOT the same keys as the Seller API. Needed only if the user wants to work with advertising. By default the interactive prompt does NOT ask for them (so the seller enters 3 fields, not 5) — add the flag --with-ads, only if advertising is actually needed.

How to save — two ways:

Way 1 — interactively via install.py (will ask for 3 fields: WB token + Ozon Client-Id + Api-Key; Enter = skip):

python3 install.py            # 3 поля
python3 install.py --with-ads # + 2 поля Ozon Performance (реклама)

Way 2 — with flags (convenient if the keys already exist; RULE: do not echo real values into the chat):

python3 install.py \
  --wb-token <WB_TOKEN> \
  --ozon-client-id <CLIENT_ID> \
  --ozon-api-key <API_KEY>
# опционально реклама:
#   --ozon-perf-client-id <ID> --ozon-perf-client-secret <SECRET>
#   --yandex-api-key <KEY> --avito-client-id <ID> --avito-client-secret <SECRET>
# несколько магазинов: добавь --cabinet shop2 (по умолчанию 'main')

Way 3 — from the chat, when the servers are already connected, via their tools:

  • wb_add_cabinet, ozon_add_cabinet — add/update cabinet: add_cabinet(name="main", credentials={"client_id":"...","api_key":"..."})
  • ozon_use_cabinet(name) — switch the active cabinet
  • ozon_list_cabinets — view cabinets and the active one
  • ozon_remove_cabinet(name) — delete

Key security (mandatory):

  • NEVER print secrets back into the chat, even partially.
  • If a key was accidentally exposed in a chat/log — immediately offer to reissue it in the seller's cabinet (revoke the old one).
  • Multiple stores → different --cabinet names, switching ozon_use_cabinet.

Step 4 — Verification

Verification standard: after restart, through the MCP tools themselves, and NOT by reading the config. The Claude Desktop config is in a protected folder that an agent from Cowork cannot read (request_cowork_directory for it returns an "internal session storage"). So don't try to verify by reading the config — check with a live tool call.

What was installed — visible without access to the config: ~/.marketplace-mcp/last_install.json (the breadcrumb written by install.py): list of servers, path to serve.py, time. There are no secrets there.

Server self-check (counts the number of tools, no keys needed). The application is copied to the canonical folder, so the path is from there:

python3 ~/.marketplace-mcp/app/serve.py ozon --selfcheck   # -> "OK: ozon ready, N tools."
python3 ~/.marketplace-mcp/app/serve.py wb --selfcheck

⚠️ Cowork: the selfcheck you run in the sandbox checks the COPY inside the container, not the user's machine. Don't present it as the final check — ask the user to run these same commands on their machine (or check with a live MCP tool call after restarting the client).

Authorization check from the chat (after restarting the client) — the tool ozon_check_auth / wb_check_auth: will show the active cabinet, what's missing, and where to get the keys. It does not echo secrets.

First live call — for example, the product list:

  • Ozon: ozon_get_products
  • WB: wb_get_stocks or wb_get_sales

If real cabinet data came back, the installation succeeded. Done. (This is the proof of success — don't trust the installer's self-report ✅ 100% until a live call has been made.)


Troubleshooting

"Python is not installed" / command not found: python3:

  • Install Python 3.10+ from https://python.org.
  • Windows: during installation be sure to check the box "Add python.exe to PATH", otherwise python/py will not be found. After installation — a new terminal.
  • macOS: python3 is usually present; if not — install from python.org or brew install python.
  • Double-click on install.bat/install.command will itself prompt if Python is not found.

Client-Id should be positive integer / token malformed / token is malformed:

  • Almost always means that an EMPTY or INCORRECT cabinet is saved, and it SHADOWS the environment variables (the active cabinet takes priority over env).
  • Check ~/.marketplace-mcp/cabinets.json: look at the active cabinet and the fields. If there is dummy/empty — re-save the real keys (install.py or *_add_cabinet), or delete the broken cabinet (*_remove_cabinet) and switch to the desired one (*_use_cabinet).
  • Ozon Client-Id — this is a NUMBER; if a string/garbage got in there — error about positive integer.

WB: authorization error, although the token is correct:

  • Known nuance: the server sends the token in the header Authorization WITHOUT the prefix Bearer (community practice). If auth fails — this is the first thing to check (see caveats in README).
  • Check that the required categories are checked in the WB token (Statistics/Prices/Content). A token without the required category will give 401/403 on these methods.

WB: rate limit (429 / "too many requests"):

  • WB Statistics API has a strict limit — around 1 request per minute for a number of methods. Don't hammer it in a row; on 429 wait ~60 seconds.

git clone fails in Cowork: Operation not permitted / could not lock config file .git/config.lock:

  • This is a FUSE mount of the host — git-locking/unlink does not work on it. Do NOT clone into the connected folder.
  • Workaround: clone into /tmp and copy without .git — git clone … /tmp/mmru && rm -rf /tmp/mmru/.git && cp -R /tmp/mmru/. <папка>/. Or just work with the already connected folder (Option C) — install.py will itself copy the application outside, git is not needed.

Tools did not appear after installation:

  • Restart the client (Claude Desktop / OpenCode read the config at startup).
  • For Claude Code / Codex check that you actually EXECUTED the printed * mcp add commands, and not just looked at them.
  • The first launch sets up venv — if it failed (no internet/permissions), run python3 ~/.marketplace-mcp/app/serve.py ozon --selfcheck manually and read stderr.
  • Check ~/.marketplace-mcp/last_install.json: whether serve_py points to an existing file. If the source folder was deleted BEFORE the version with the canonical copy — reinstall (now the config is tied to ~/.marketplace-mcp/app, not to the clone location).

Ozon: method 404 / 405 (Method Not Allowed):

  • Ozon API versions drift (list v3, prices v5, stocks v4/v2). If the catalog method returns 404 — check the version or use ozon_get_raw with the correct path.
  • Some import endpoints are marked GET, but are actually POST (405). This is a "map for reconnaissance" — verify the verb in the docs or call via *_get_raw / *_write_raw.

Cheat sheet: what depends on the environment (anti-overpromise)

  • Claude Code / local CLI → you do everything yourself, including verification.
  • Cowork → you do NOT install MCP yourself. Double-click the installer (computer-use) OR Claude Code OR a step-by-step checklist for the user. Honestly state the sandbox boundary.