Summary
Let your AI analyse Yandex Metrica web analytics: counters, goals, filters and segments, table, time-series, drill-down and comparison reports on visits, sources, pages and conversions, and raw visits and hits through the Logs API.
Guided setup
Connect Yandex Metrica to Microsoft Copilot in 2 minutes
Start a free trial on AnythingMCP Cloud, connect Yandex Metrica in the guided setup, then add your MCP URL to Microsoft Copilot. No code and no server to run.
No credit card · 7-day trial · Self-host alternative available
Try asking
Example prompts for Yandex Metrica
Click any prompt to copy it. Paste into Claude, ChatGPT, Cursor, Gemini, Copilot or OpenClaw to run it against this connector.
Claude is AI and can make mistakes. Please double-check responses.
💡 No install? Use cloud.anythingmcp.com directly. Sign in, click Connectors → Yandex Metrica, paste your credentials, mint an MCP API key and you're done. No Docker, no
git clone, no local server.
Yandex Metrica + Microsoft Copilot
Let your AI analyse Yandex Metrica web analytics: counters, goals, filters and segments, table, time-series, drill-down and comparison reports on visits, sources, pages and conversions, and raw visits and hits through the Logs API.
Prerequisites
See the full setup instructions baked into the connector (visible in the in-app store when you select the connector). The required environment variables for this connector are:
YANDEX_METRICA_TOKEN
Step 1 — Get credentials
Setting up takes about 5 minutes. You need a Yandex account that owns the Metrica counters or has access to them, and an app of your own registered at oauth.yandex.com.
- Create an app at oauth.yandex.com of the kind For API access or debugging and give it the access metrika:read (Metrica statistics, counter settings, list of counters). Note its ClientID.
- Signed in with the Yandex account that owns or can see the counters, open
https://oauth.yandex.com/authorize?response_type=token&client_id=<ClientID>with your ClientID and copy the token (it starts withy0_) intoYANDEX_METRICA_TOKEN, without OAuth or Bearer in front. - Install the connector and run
yandex_metrica_list_counters: it checks the token and lists the counter ids the other tools need.
Cloud and self-hosted work the same way: you paste the token, and the connector sends it as Authorization: OAuth ... on every call. There is no redirect URL to set in AnythingMCP.
The token lasts about a year: it is extended while it is used. Read access is enough for everything here: metrika:read covers the reports, the counter settings and the Logs API requests.
Counters and goals first: the counter id goes into ids in reports and into counterId everywhere else. yandex_metrica_list_goals gives the goal ids that goal metrics embed, such as ym:s:goal123reaches and ym:s:goal123conversionRate.
Metrics, dates and filters: metrics and dimensions start with ym:s: for sessions (visits) and ym:pv: for pageviews, for example ym:s:visits, ym:s:bounceRate or ym:s:lastTrafficSource. Dates take YYYY-MM-DD, today, yesterday or 30daysAgo. Filters use ==, !=, =@ (contains) and =~ (regex), combined with AND and OR; the saved segments from yandex_metrica_list_segments can be reused as filters. Rows page with limit (default 100, at most 100,000) and offset, which starts at 1.
Sampled figures: report answers carry sampled and sample_share. When sampled is true the figures are estimates: ask for full accuracy (accuracy full) on small date ranges, or use the Logs API.
Logs API: raw, unsampled visits and hits are prepared on Yandex's side. The AI checks with yandex_metrica_evaluate_log_request whether the request can be built, creates it, waits until its status is processed and downloads each part as tab-separated text, the first line holding the field names. Date ranges cannot include today, and prepared logs count against the counter's log storage quota.
Limits: 5,000 requests a day per user, 200 report requests per 5 minutes per user, 3 parallel requests per user and 30 requests per second per IP address (10 for the Logs API). Above that Yandex answers 429: wait and try again.
Common errors: 401 means the token is wrong, expired or revoked: get a new one with your app's ClientID as in step 2. 403 means the token works, but its account has no access to that counter or the app lacks metrika:read. 400 means an invalid metric, dimension or filter, and the message names it.
What it reads: counters with site, mirrors, status, time zone, code status, owner and your permission, and the labels (folders) they are sorted into; goals with type, conditions, steps and price; data filters, URL operations, saved segments and who has access to a counter; table, time-series, drill-down and comparison reports on visits, users, bounce rate, traffic sources, pages, countries, devices and goal conversions; and raw, unsampled visits and hits from the Logs API.
Switched off at install: yandex_metrica_clean_log_request. It deletes the prepared files of a processed Logs API request to free the counter's log storage quota, and the files cannot be downloaded afterwards. Switch it on on the connector page only if you need it; the AI asks you to confirm every change first. yandex_metrica_create_log_request and yandex_metrica_cancel_log_request are switched on: they only start or stop the preparation of a raw-data export on Yandex's side and change no counter, goal or setting.
Not covered: creating or editing counters, goals, filters and access, and uploading offline conversions, calls, expenses, user parameters or CRM data.
Step 2 — Install the adapter
curl -fsSL https://raw.githubusercontent.com/HelpCode-ai/anythingmcp/main/docker-compose.quickstart.yml -o docker-compose.yml
printf 'JWT_SECRET=%s\nENCRYPTION_KEY=%s\n' "$(openssl rand -hex 32)" "$(openssl rand -hex 32)" > .env
docker compose up -d
Step 3 — Add the connector in Microsoft Copilot
Your server URL: in AnythingMCP, open MCP Servers → the server this connector is on, and copy its URL (
https://cloud.anythingmcp.com/mcp/…). Use it wherever this guide showsYOUR_SERVER_ID.
Microsoft Copilot uses MCP servers through agents built in Copilot Studio: you add AnythingMCP to an agent as a tool, then publish the agent to Microsoft 365 Copilot and Teams. Copilot Studio connects from Microsoft's cloud over Streamable HTTP, which AnythingMCP supports.
- In Copilot Studio, open your agent (or create one), go to Tools and choose Add a tool → New tool → Model Context Protocol.
- Enter a Server name (for example
AnythingMCP), a Server description that says what the connector does, and the Server URLhttps://cloud.anythingmcp.com/mcp/YOUR_SERVER_ID. Copilot Studio uses the description to decide when to call the server. - Under authentication, choose API key, set Type to Header and the header name to
X-API-Key, then select Create. - In Add tool, choose Create a new connection, paste an MCP API key from AnythingMCP (MCP Servers → your server → API keys) and select Add to agent.
- Try it in the agent's Test pane: ask for something that needs the
Yandex Metricatools. - Select Publish, then Channels → Microsoft 365 and Microsoft Teams, keep Make agent available in Microsoft Copilot selected and choose Add channel. See agent in Teams installs it for you; in Microsoft 365 Copilot, type @ and pick the agent.
Prefer per-user sign-in? Choose OAuth 2.0 → Dynamic discovery instead of an API key: each user then signs in to AnythingMCP the first time the agent calls it.
Self-hosting? Use your instance's public HTTPS address instead of https://cloud.anythingmcp.com. Copilot Studio connects from Microsoft's cloud, so localhost does not work.
Available tools
| Tool | What it does |
|---|---|
yandex_metrica_list_counters | List the Metrica counters (tags) the token can read: id, name, site, status, owner_login, permission (own, view, edit), time zone, creation… |
yandex_metrica_get_counter | Get one counter's settings: name, site and mirrors, status, time zone, code status, webvisor and e-commerce options, owner and, with field… |
yandex_metrica_list_goals | List the goals of a counter: id, name, type (url, action, number, step, phone, email, form, messenger ...), conditions, is_retargeting and… |
yandex_metrica_get_goal | Get one goal of a counter by id: name, type, conditions, steps of a composite goal and price |
yandex_metrica_list_filters | List the data filters of a counter (include or exclude traffic by IP, URL, title, referrer ...): id, attr, type, value, action, status |
yandex_metrica_list_operations | List the URL operations of a counter (cut query parameters or fragments, merge to lowercase, replace domain): id, action, attr, value… |
yandex_metrica_list_segments | List the saved segments of a counter: segment_id, name, expression (a filter you can pass as filters in reports), status, segment_source… |
yandex_metrica_list_grants | List who has access to a counter: user_login, perm (view or edit), created_at and comment |
yandex_metrica_list_labels | List the user's counter labels (folders): id and name |
yandex_metrica_get_report | Build a table report from the Reporting API: metrics grouped by dimensions over a date range, with filters, sorting and paging |
yandex_metrica_get_report_by_time | Build a time series: the metrics per day, week, month, hour or other interval for the top rows of the dimensions |
yandex_metrica_get_drilldown | Build a tree report: the first dimension's values with their metrics, then expand one row into the next dimension with parent_id |
yandex_metrica_compare_segments | Compare two segments or periods side by side: the same metrics and dimensions for segment A (date1_a, date2_a, filters_a) and segment B… |
yandex_metrica_evaluate_log_request | Check whether a Logs API request for raw visits or hits can be created: possible (true or false) and max_possible_day_quantity |
yandex_metrica_create_log_request | Create a Logs API request that prepares raw, unsampled visits or hits for a date range on Yandex's side |
yandex_metrica_list_log_requests | List the Logs API requests of a counter: request_id, source, fields, attribution, status (created, processed, canceled, processing_failed… |
yandex_metrica_get_log_request | Get one Logs API request: status and, once processed, the parts (part_number and size) to download |
yandex_metrica_download_log_part | Download one part of a processed Logs API request as tab-separated text, the first line holding the field names |
yandex_metrica_cancel_log_request | Cancel a Logs API request that is still being prepared (status created) |
yandex_metrica_clean_log_request | Delete the prepared files of a processed Logs API request to free the counter's log storage quota |
Example prompts
- "Which traffic sources brought the most visits last month, and what were their bounce rates?"
- "How did the conversion rate of my order goal change week by week over the last three months?"
- "Compare visits and goal reaches by traffic source between October and September."
- "Which pages had the most pageviews yesterday, and on which devices?"
- "Get last week's raw, unsampled visits through the Logs API and count them by region."
FAQ
Which Copilot is this for? Microsoft 365 Copilot at work, through agents built in Copilot Studio. The Microsoft Copilot app for personal accounts has no option to add your own MCP server.
What do I need? A work account with access to Copilot Studio (a license or a trial) to build the agent. People who use it in Microsoft 365 Copilot or Teams need access to the agent: share it with them, or ask an admin to publish it to the organization. If your organization applies data policies to Power Platform connectors, they cover MCP servers too.
The agent doesn't call the tools. Check that the header name is exactly X-API-Key and that the key belongs to the same MCP server as the URL, and make the server description specific: Copilot Studio uses it to decide when to call the server. Publish the agent again after each change; in an open chat, type "start over" to get the new version.
Next steps
Was this guide helpful?