Minas Sarkisyanwebkoth.com

Open source · In production

Ads and SEO from chat

An open MCP server for three Yandex accounts - Direct, Metrika and Webmaster - with 125 tools in a single process. The assistant answers about ads, traffic and search in words, while edits to an account pass through a preview, limits and warnings.

The pain

Budgets and bids live in an account where an edit applies at once. A mistake costs a weekly budget burned over the days that are left, and a strategy’s training reset halfway.

Now

An open MCP server: 125 tools across Direct, Metrika and Webmaster. A writing call previews what would be sent, the change percentage is capped per project, and the weekend rule brings its own warning.

What the business gets

  • An answer about spend, bids and conversions is assembled from the API right now, not from yesterday’s export.
  • A budget or bid edit does not go through on the first call: what exactly will change is visible first.
  • The maximum change percentage is set per project, so a typo that multiplies a number does not pass silently.
  • One process serves several accounts: each has its own token and its own maximum change percentages.
  • Until access to the ads API is approved, the project switches to the marketplace sandbox and the whole workflow can still be checked.

From source to result

  1. A question in words
  2. The MCP server
  3. Direct · Metrika · Webmaster
  4. Preview and limits
  5. An answer or a confirmed edit

The token lives in the project settings and never reaches the conversation: the tool calls the API itself, and the assistant only sees the result of the call.

How it works

The methodology is split into two layers. Platform mechanics are hard rules that must not be broken; heuristics are starting values to be tested against the project’s own data. Some of the hard rules are wired into the server as checks rather than left to the assistant’s discipline.

Direct returns partial failures inside a successful response: a 200 code with some rows carrying errors. So the result of a writing call is summarised per item, and a partial failure shows up separately instead of hiding behind the word «applied».

The playbook is handed to the assistant as a server resource, and six workflows come as ready prompts: a campaign audit, a weekly report, a launch, budget scaling, an SEO audit and a strategy training check.

The tools cover the working surface of each account rather than one scenario: the recrawl queue and diagnostics in Webmaster, raw visit logs and offline conversion uploads in Metrika, campaigns, bids and reports in Direct.

Who maintains it now

Me. Open source under the MIT licence; the repository is published, the npm package is not out yet.

Other cases for this step

Internal system · In production

Management finance loop

Money becomes visible: balance, profit, cash gap

The pain
Nobody knew today’s real account balance or net profit for sure. Payment requests were approved in chats, and the risk of a cash gap never went away.
Now
Cash flow, budget and reconciliation on one screen, payment requests travel an approval route, and the numbers on that screen add up.
Market alternative
Verified against
the bank statement

The same system pays off across 3 more steps

Open the case

Internal system · In production

Data platform

Marketplace payouts and fees reconcile to the kopeck

The pain
Fees, logistics, storage and penalties are only visible in the marketplace’s own reports. There was nothing to check them against, so margin was taken on faith.
Now
A dedicated data mart compares our weekly totals with the totals the marketplace itself calculated. An empty result means everything matches; a row with a difference shows exactly where it does not.
Verified against
Reconciliation
runs itself, every week

The same system pays off across 2 more steps

Open the case

Own product · In production

Marketplace payout documents

You can see what will arrive and what goes to tax

The pain
The marketplace hands financial documents over as a pile of files. To work out the year’s income and the tax on it, a seller opens them one by one and adds them up.
Now
The service fetches a year of documents itself, parses PDFs and spreadsheets, lays amounts out by month and calculates the tax: 4 % from individuals, 6 % from companies.
Tax
Regime limit
2.4M ₽ a year, the remainder in plain sight
Fetching documents
pulled from the account by the service
Open the case
Type
Open source
Status
In production
Coverage
125 tools across three accounts
Maintained by
an engineer
Replaced
walking the Yandex accounts by hand
TypeScriptNode.js 22MCPzodYandex Direct APIYandex Metrika APIYandex Webmaster API