JSPM

  • ESM via JSPM
  • ES Module Entrypoint
  • Export Map
  • Keywords
  • License
  • Repository URL
  • TypeScript Types
  • README
  • Created
  • Published
  • Downloads 245
  • Score
    100M100P100Q95971F
  • License MIT

MCP server for Avito API β€” 139 tools across 18 domains. Give your AI agents hands and feet on Russia's largest classifieds marketplace.

Package Exports

  • avito-mcp
  • avito-mcp/dist/server.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (avito-mcp) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

avito-mcp

npm version npm downloads CI Tests TypeScript License: MIT Node MCP GitHub stars Avito API snapshot

Give your AI agents hands and feet on Avito. Local MCP server that lets Claude, Cursor, Cline and any other AI assistant do real work on Avito for you β€” answer customers, manage listings, run promotions, fulfil orders, analyse stats. 139 tools across 18 official Avito APIs, one npx command to install.

πŸ‡·πŸ‡Ί Русская вСрсия / Russian version β†’


What it does

Avito is Russia's largest classifieds marketplace (~250M monthly visits). Selling there involves dozens of repetitive operations every day: replying in chats, refreshing listings, applying paid promotion, generating shipping labels, watching stats.

avito-mcp exposes every public Avito API as a tool your AI agent can call. Plug it into your favourite MCP client and your agent can run an entire Avito storefront β€” autonomously β€” from natural language.

  • πŸ”Œ Universal β€” works with 15+ MCP clients (Claude Desktop, Cursor, Cline, Continue, Windsurf, Zed, ChatGPT, …)
  • πŸ”’ Local-only β€” stdio transport, your OAuth credentials never leave your machine
  • πŸ€– Built for autonomy β€” pairs naturally with multi-agent runtimes and cron-scheduled agents for hands-off, always-on operation
  • ⚑ Zero install β€” npx -y avito-mcp, no clone/build, no Docker

Quick start (β‰ˆ90 seconds)

1. Get OAuth credentials from the Avito Developer Portal: Client_id, Client_secret, and your Profile_id (your numeric account ID, shown on the same page).

2. Add this snippet to your MCP client's config (the JSON is the same for every client β€” only the file path differs, see the next section):

{
  "mcpServers": {
    "avito": {
      "command": "npx",
      "args": ["-y", "avito-mcp"],
      "env": {
        "Client_id": "YOUR_CLIENT_ID",
        "Client_secret": "YOUR_CLIENT_SECRET",
        "Profile_id": "YOUR_PROFILE_ID"
      }
    }
  }
}

3. Restart your client. Ask your agent:

"What's my Avito balance and how many unread chats do I have?"

Done. Two API calls, real answer.


Built for autonomous workflows

Most MCP servers are designed to be called by hand from a chat window. avito-mcp is designed to be left running β€” picked up by multi-agent runtimes and scheduled agents that operate without you watching.

Typical deployment patterns:

  • Reactive agent β€” a Claude/Cursor session permanently open, monitoring chats and replying to customers in your tone of voice.
  • Cron-scheduled agent β€” a runtime fires up your agent every N minutes to triage new orders, top up promotion budgets, refresh stats.
  • Multi-agent swarm β€” separate agents for "support", "promotion", "logistics" each holding only the tools they need.

The stdio transport keeps every credential and API response on your machine. No proxy. No SaaS in the middle.

β†’ See the full list of compatible runtimes at modelcontextprotocol.io/clients.


What's included β€” 139 tools

Every public endpoint from Avito's 18 OpenAPI specs is exposed. Click any group to expand.

Avito API snapshot date: 25 May 2026. The bundled swaggers (./swaggers/) reflect Avito's public API as of that date. Avito occasionally adds or revises endpoints β€” if you spot drift (404 on a known method, new method missing), open an issue and we'll bump the snapshot.

πŸ“‹ Listings β€” 11 tools (items_*)
  • items_get_items_info β€” list your listings (pagination, status, category filters)
  • items_get_item_info β€” full details of one listing
  • items_post_calls_stats β€” call statistics per item per day
  • items_post_vas_prices β€” promotion service prices for given items
  • items_post_item_stats_shallow β€” basic views/contacts/calls over a period
  • items_post_item_analytics β€” extended analytics with grouping & sorting
  • items_post_account_spendings β€” spend breakdown by service type
  • items_update_price ⚠️ β€” change listing price
  • items_put_item_vas ⚠️ β€” apply one paid VAS service
  • items_put_item_vas_package_v2 ⚠️ β€” apply a VAS package
  • items_apply_vas ⚠️ β€” apply multiple VAS slugs at once
πŸ’¬ Messenger β€” 13 tools (messenger_*)
  • messenger_get_chats_v2 β€” list chats (filters: unread, item_ids, chat_types)
  • messenger_get_chat_by_id_v2 β€” details of one chat
  • messenger_get_messages_v3 β€” message history in a chat (paginated)
  • messenger_get_voice_files β€” download URLs for voice messages
  • messenger_get_subscriptions β€” current webhook subscriptions
  • messenger_post_send_message ⚠️ β€” send a real text reply to a customer
  • messenger_post_send_image_message ⚠️ β€” send an image (use upload first)
  • messenger_upload_images β€” multipart upload, returns image_ids
  • messenger_delete_message ⚠️ β€” delete a message
  • messenger_chat_read β€” mark all unread in a chat as read
  • messenger_post_blacklist_v2 ⚠️ β€” block users (with reason codes)
  • messenger_post_webhook_v3 ⚠️ β€” subscribe to push notifications (needs public URL)
  • messenger_post_webhook_unsubscribe β€” unsubscribe
πŸ“¦ Orders β€” 12 tools (orders_*)
  • orders_get_orders β€” list orders with filters
  • orders_get_courier_delivery_range β€” available courier time slots
  • orders_download_label β€” fetch generated label PDF
  • orders_markings ⚠️ β€” submit "ЧСстный Π·Π½Π°ΠΊ" (mandatory product marking)
  • orders_accept_return_order ⚠️ β€” choose Russian Post office for return
  • orders_apply_transition ⚠️ β€” change order status (confirm/ship/cancel)
  • orders_check_confirmation_code β€” verify pickup code
  • orders_cnc_set_details ⚠️ β€” click-and-collect order details
  • orders_set_courier_delivery_range ⚠️ β€” pick a courier time slot
  • orders_set_tracking_number ⚠️ β€” set carrier tracking number
  • orders_generate_labels β€” generate labels (≀100 orders)
  • orders_generate_labels_extended β€” generate labels (≀1000 orders)
πŸ”„ Autoload β€” 17 tools (autoload_*)

XML/YML/CSV feed uploads, report retrieval, ID mapping, category schema lookup. Includes both v1 (deprecated, kept for compatibility) and v2/v3.

  • autoload_upload ⚠️ β€” trigger a feed upload (rate-limited to 1/hour)
  • autoload_get_profile_v2, autoload_create_or_update_profile_v2 ⚠️ β€” manage feed profile
  • autoload_get_reports_v2 β€” list upload reports with pagination
  • autoload_get_report_by_id_v3, autoload_get_last_completed_report_v3 β€” report details
  • autoload_get_report_items_by_id, autoload_get_report_items_fees_by_id β€” per-item results
  • autoload_get_ad_ids_by_avito_ids, autoload_get_avito_ids_by_ad_ids β€” ID mapping
  • autoload_user_docs_tree, autoload_user_docs_node_fields β€” category schema reference
    • 6 deprecated v1 endpoints, kept under their original names for compatibility
🚚 Delivery β€” 31 tools (delivery_*) Β· 3PL partner API

Avito's logistics partner API for delivery service providers. Most users will never call these β€” they're for shipping companies integrating with Avito Delivery. Includes both production endpoints and sandbox endpoints for partner testing. Full list in the source: src/domains/delivery.ts.

πŸ“ˆ Promotion & CPA β€” 25 tools (promotion_*, cpa_*, cpa_target_*, cpa_auction_*)
  • BBIP promotion (7) β€” promotion_get_bbip_forecasts_by_items_v1, promotion_create_bbip_order_for_items_v1 ⚠️, promotion_get_order_status_v1, …
  • CPA (11) β€” chats/calls by time, balance v2/v3, complaints, phone info β€” cpa_*
  • CPA target action (5) β€” cpa_target_get_bids, cpa_target_save_auto_bid ⚠️, cpa_target_save_manual_bid ⚠️, …
  • CPA auction (2) β€” cpa_auction_get_user_bids, cpa_auction_save_item_bids ⚠️
πŸ‘€ Profile, Stock, Hierarchy, Reviews β€” 14 tools
  • User (3) β€” user_get_user_info_self, user_get_user_balance, user_post_operations_history
  • Stock (2) β€” stock_get_stocks_info, stock_update_stocks ⚠️
  • Hierarchy (5) β€” sub-accounts, employees, item assignment (multi-employee setups)
  • Reviews (4) β€” reviews_get_reviews_v1, reviews_create_review_answer_v1 ⚠️, reviews_remove_review_answer_v1 ⚠️, reviews_get_ratings_info_v1
πŸ› οΈ Misc β€” 12 tools (tariffs_*, trxpromo_*, calltracking_*, msg_discounts_*)
  • Tariffs (1) β€” transport-category tariff reference
  • TrxPromo (3) β€” transactional promotion: commissions / apply / cancel
  • CallTracking (3) β€” call records and audio retrieval
  • Messenger discounts (5, beta) β€” bulk discount campaigns in chats
πŸ” Auth & Meta β€” 4 tools
  • Auth (3) β€” auth_get_access_token (debug; the server manages tokens automatically), auth_get_access_token_authorization_code, auth_refresh_access_token_authorization_code
  • Meta (1) β€” meta_get_rate_limits β€” observe X-RateLimit-* across all domains

⚠️ marks methods that spend real money or affect live data (price changes, paid promotion, customer-facing messages, blocked users). Safe read-only smoke tools: user_get_user_balance, items_get_items_info, messenger_get_chats_v2, meta_get_rate_limits.


Connect your AI client

The JSON snippet from the Quick Start section above works in every MCP-compatible client β€” only the path to the config file changes. Pick yours below:

Claude Desktop (macOS / Windows / Linux)
OS Path
macOS ~/Library/Application Support/Claude/claude_desktop_config.json
Windows %APPDATA%\Claude\claude_desktop_config.json
Linux ~/.config/Claude/claude_desktop_config.json

Create the file if it doesn't exist; otherwise add the avito entry to the existing mcpServers block. Fully quit Claude Desktop (system tray) and reopen β€” a πŸ”Œ avito indicator should appear at the bottom of the chat.

Logs: ~/Library/Logs/Claude/mcp-server-avito.log (macOS).

Claude Code (CLI)

Easiest β€” one command:

claude mcp add avito npx -y avito-mcp \
  -e Client_id=YOUR_CLIENT_ID \
  -e Client_secret=YOUR_CLIENT_SECRET \
  -e Profile_id=YOUR_PROFILE_ID

Or add .mcp.json to your project root (use the JSON from Quick Start, plus "type": "stdio"). Verify with claude mcp list.

Cursor

Path: ~/.cursor/mcp.json (global) or <project>/.cursor/mcp.json (per-project). Use the Quick Start JSON as-is. Reload window after saving (Cmd/Ctrl + Shift + P β†’ "Reload Window").

ChatGPT Desktop (Connectors / MCP)

OpenAI's Desktop app added MCP server support via the Connectors UI. Settings β†’ Connectors β†’ Add custom MCP server β†’ fill in:

  • Name: Avito
  • Type: stdio
  • Command: npx
  • Arguments: -y avito-mcp
  • Environment variables: Client_id, Client_secret, Profile_id
Windsurf (Codeium)

Path: ~/.codeium/windsurf/mcp_config.json. Use the Quick Start JSON. Alternative: Settings β†’ Cascade β†’ MCP Servers β†’ Add Server (UI).

Cline (VS Code extension)

In VS Code: Cline icon β†’ βš™οΈ β†’ MCP Servers β†’ Edit cline_mcp_settings.json.

OS Path
macOS ~/Library/Application Support/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json
Windows %APPDATA%\Code\User\globalStorage\saoudrizwan.claude-dev\settings\cline_mcp_settings.json
Linux ~/.config/Code/User/globalStorage/saoudrizwan.claude-dev/settings/cline_mcp_settings.json

Use the Quick Start JSON. Cline auto-reloads without VS Code restart.

Continue (VS Code / JetBrains)

Add to ~/.continue/config.json:

{
  "experimental": {
    "modelContextProtocolServers": [
      {
        "transport": {
          "type": "stdio",
          "command": "npx",
          "args": ["-y", "avito-mcp"],
          "env": { "Client_id": "...", "Client_secret": "...", "Profile_id": "..." }
        }
      }
    ]
  }
}
Zed

Open Settings (Cmd+,), find the context_servers block:

{
  "context_servers": {
    "avito": {
      "command": {
        "path": "npx",
        "args": ["-y", "avito-mcp"],
        "env": { "Client_id": "...", "Client_secret": "...", "Profile_id": "..." }
      }
    }
  }
}
VS Code (GitHub Copilot Chat with MCP)

Microsoft added MCP support to Copilot Chat in 2025. Create .vscode/mcp.json in your workspace or use the Command Palette β†’ "MCP: Add Server". Same Quick Start JSON.

Codex CLI (OpenAI)

OpenAI's CLI assistant supports MCP via ~/.codex/config.toml:

[mcp_servers.avito]
command = "npx"
args = ["-y", "avito-mcp"]
env = { Client_id = "...", Client_secret = "...", Profile_id = "..." }
JetBrains AI Assistant

Settings β†’ Tools β†’ AI Assistant β†’ MCP β†’ Add server. Fill the same fields (command npx, args -y avito-mcp, env variables). Applies to IntelliJ IDEA, PyCharm, WebStorm, GoLand, Rider.

Goose (Block)

Block's open-source CLI agent. Add via goose configure β†’ MCP server β†’ paste the Quick Start JSON. Config lives in ~/.config/goose/config.yaml.

Roo Code / Kilo Code (Cline forks, VS Code)

Both are forks of Cline and use the same config format and path patterns β€” replace saoudrizwan.claude-dev in the path with the fork's extension ID (rooveterinaryinc.roo-cline or kilocode.kilo-code). JSON is identical.

LibreChat (self-hosted ChatGPT alternative)

Edit librechat.yaml:

mcpServers:
  avito:
    type: stdio
    command: npx
    args: ["-y", "avito-mcp"]
    env:
      Client_id: "..."
      Client_secret: "..."
      Profile_id: "..."
Cherry Studio

Settings β†’ MCP Servers β†’ Add. UI fields: name avito, command npx, args -y avito-mcp, env vars same as above.

Any other MCP client

The server speaks stock stdio MCP. Universal parameters:

  • command: npx
  • args: ["-y", "avito-mcp"]
  • env: { Client_id, Client_secret, Profile_id }
  • transport: stdio

Browse the MCP clients directory for new ones.


Example prompts

Drop these into your AI client to see what's possible:

πŸ“Š Analyse

  • "What's my Avito balance and how much did I spend on promotion this month?"
  • "Top 10 listings by contacts last week β€” table with views/contacts/conversion."
  • "Find listings whose calls dropped 50%+ compared to the previous week."

πŸ’¬ Communicate

  • "Show me unread chats from the last 24 hours and reply with: 'Hi! Yes, still available, where would you like delivery?'"
  • "Read the full conversation in chat X and suggest the best next reply in my tone."

πŸ’° Promote

  • "Forecast a 1000β‚½ BBIP boost on item 12345 β€” is it worth it?"
  • "Set a manual CPA bid of 500β‚½ on top-10 listings in category 'Electronics'."

πŸ“¦ Fulfil

  • "List all orders with status ready_to_ship and generate labels in a single PDF."
  • "For order ABCD, find an available courier slot tomorrow morning."

πŸ€– Automate

  • "Every weekday at 9am, send me Telegram with: balance, new orders count, unread chats count, top promotion spends."
  • "If any chat has been unread for 6+ hours, draft a reply and ping me to approve."

What's NOT supported

Avito provides separate APIs for the following verticals β€” their swagger specs are not bundled:

Category Where to find
🏷️ Auction Avito Auction API
πŸ€– Auto-strategies (automated bidding) Avito Autostrategy API
πŸš— Autoteka (vehicle history) Avito Autoteka API
πŸ’Ό Jobs / Vacancies Avito Jobs API
πŸ“Š Real-estate reports Avito Realty Reports API
🏠 Short-term rent Avito STR API

Also out of scope: authorization_code OAuth flow (no public redirect URI on a local CLI), webhook receiver (needs a public URL), Avito sandbox (no sandbox credentials).


Security

  • Local stdio only β€” no proxy, no remote endpoints, no telemetry.
  • Credentials live in your MCP client's env block or local .env. They're never sent anywhere except api.avito.ru.
  • OAuth tokens cached in a per-user state directory (chmod 600):
    • Linux: $XDG_STATE_HOME/avito-mcp/token.json (β‰ˆ ~/.local/state/avito-mcp/token.json)
    • macOS: ~/Library/Application Support/avito-mcp/token.json
    • Windows: %APPDATA%\avito-mcp\token.json
    • Override with AVITO_TOKEN_FILE. Delete the file to force a refresh.
  • Three safety modes via AVITO_MCP_MODE (default: full_access):
    • read_only β€” only the ~79 read tools register; nothing that writes, spends, or talks to customers is even visible to the agent
    • guarded β€” adds write tools (~41 more), still hides money and public
    • full_access β€” all 139 tools, like v0.1.x. Legacy AVITO_SAFE_MODE=read-only still works as a deprecated alias for AVITO_MCP_MODE=read_only.
  • Per-tool allowlist / denylist: AVITO_MCP_ALLOW_TOOLS=foo,bar registers only those names. AVITO_MCP_DENY_TOOLS=baz hides them, deny wins over allow. Useful for building purpose-built agent personas β€” see docs/safety.md for ready-to-paste configs (analytics-only, support, listings-only, full admin).
  • Every tool is tagged with one of four risk levels (read / write / money / public), exposed both as MCP ToolAnnotations (readOnlyHint, destructiveHint) and in dist/manifest.json. Well-behaved MCP clients warn before destructive calls.
  • All 139 tools hit production β€” Avito has no sandbox. Write methods cost real money or are visible to real customers. Safe read-only tools for first runs: user_get_user_balance, items_get_items_info, messenger_get_chats_v2, meta_get_rate_limits.
  • Found a security issue? Private reporting via SECURITY.md β€” don't open a public issue.

Community & support

  • Bug? Open an issue.
  • Question or idea? Start a discussion.
  • Need help picking the right tool or setting up your client? See SUPPORT.md.
  • Want to contribute? Adding a new Avito swagger takes ~10 minutes β€” see CONTRIBUTING.md.
  • Like the project? Star the repo and tell another Avito seller who uses AI.

Install from source

For development, air-gapped installs, or when you want to modify a tool:

git clone https://github.com/elchin92/avito-mcp.git
cd avito-mcp
npm install
cp .env.example .env       # fill in your credentials
npm run build

Then point your MCP client at:

{ "command": "node", "args": ["/absolute/path/to/avito-mcp/dist/server.js"] }

A template config is in .mcp.json.example.

CLI flags

npx avito-mcp --version    # print the installed version
npx avito-mcp --help       # show env vars + usage

The server has no other flags by design β€” all knobs are env vars (see --help output).


Contributing

Adding a new Avito swagger? One file in src/domains/ plus one line in src/meta/domain-registry.ts β€” see CONTRIBUTING.md. The factory in src/core/tool-factory.ts handles HTTP, OAuth, retries, rate-limit observability, error mapping, and Profile_id auto-injection β€” you'll never write a fetch() call inside a tool.

Issues and PRs welcome.


License

MIT. Not affiliated with Avito.ru. "Avito" is a trademark of its respective owner. Use of the Avito API is subject to Avito's Terms of Service.