OpenstatXHomeDeveloper docsOpenAPIllms.txt中文

MCP integration

Address: https://openstatx.com/mcp (Streamable HTTP, stateless; a new server instance is created for each request, and identity is never shared across requests).

Authentication

  1. API credential: request header Authorization: Bearer stk_... (create it in the dashboard under "Workspace → API credentials"; we recommend granting only summary:read and the sites you need).
  2. OAuth 2.1: generic MCP clients automatically discover /.well-known/oauth-protected-resource/mcp and use authorization code + PKCE. The consent page requires the workspace to already be open in your browser; there you can choose permissions and restrict sites and validity period.

The tool list is filtered by the credential's permissions: read-only credentials do not see management tools, and even if a hidden tool is called by hand, the server checks independently and refuses.

Tools

ToolDescriptionRead-only
discover_analyticsLists this service's metric dictionary, dimensions, reports, feature flags and classification rule version, plus the current credential's permissions and number of visible sites.yes
list_sites列出当前凭证可访问的网站(id、域名、时区、验证与采集状态),可附带今日 PV/UV/HTTP/AI 摘要(unique_visitors_method=daily_hash_estimate 表示基础隐私模式的无 Cookie UV 估算)、近 5 分钟实时在线,以及全部可见网站的合计(with_summary=true 且为第一页时返回 sites + summary).yes
get_reportRead a site's standard report (same definitions as the web dashboard).yes
query_analyticsRuns a structured query over allowlisted metrics/dimensions/filters (SQL is not accepted).yes
get_realtimePer-minute PV and HTTP requests for the last 30 minutes, active visitors in the last 5 minutes (not an exact count of live connections), and recent pages.yes
get_sessionsRead the session list, a single session timeline, or visitor details (requires details:read; visitor details are only available in the consented privacy mode).yes
get_event_detailsRead custom events / site searches / downloads / outbound clicks (kind=events, aggregated), or recent HTTP request details (kind=requests, requires details:read).yes
explain_classificationReturn the evidence, verification method, rule version and trust level behind classifying an HTTP request as human_likely / ai_verified / ai_claimed / other_automation / unknown (requires details:read).yes
compare_sitesCompares PV, per-site UV, sessions, AI referrals, AI crawls, bot requests, conversions and anomalies across multiple sites.yes
create_exportCreates a CSV/JSON/NDJSON export job for large results (requires exports:write; exported fields are still limited by read permissions).no
get_exportShows export job status (pending/processing/completed/failed/revoked) and the download path; without export_id, lists recent exports.yes
get_data_qualityAccepted/rejected/duplicate, late and future-dated, unknown rate, rule version and staleness, and coverage per collection source (coverage is null when there is no denominator).yes
get_usageMeasured usage (events, queries, exports) and quota for the current workspace.yes
traffic_overviewCompatibility alias: equivalent to get_report(report=overview). (Alias of get_report.)yes
traffic_breakdownCompatibility alias: break traffic down by one dimension using the matching get_report report. (Alias of get_report.)yes
traffic_explainCompatibility alias: same as explain_classification. (Alias of explain_classification.)yes
add_site在当前工作区添加网站并返回站点 ID 与安装方式(需 sites:write,且授权的网站范围为“全部网站”).no
check_installationReturns the JS install snippet, the _czc compatibility snippet, edge/server integration examples, and the collection status and last data time for each of browser/edge/server/security_logs.yes
start_site_verificationIssues a site ownership verification challenge (html_tag / file / dns_txt) and returns the tag or record to place.no
check_site_verificationChecks site ownership using the challenge method (fetches only the site's own https URL, with SSRF protection; DNS via a fixed resolver).no
manage_goalsManage a site's goals (list / create / update / delete).no
manage_funnelsManage a site's funnel definitions (list / create / update / delete).no
manage_site_configManages site settings (settings: get/update, time zone, privacy mode, property allowlist, page groups, etc.; shortening the retention period must go through preview_action), filters (filters), the custom dimension allowlist (custom_dimensions) and campaign costs (campaign_costs).no
manage_saved_reportsSaves a structured query as a report, reads/updates/deletes it, runs it immediately (run) and views run history (list_runs).no
manage_schedulesCreates/updates/deletes daily and weekly report schedules (in the site time zone).no
manage_importsUploads CSV/JSON aggregates exported from a legacy analytics system (create), previews the mapping and overlapping dates (preview), commits (commit, idempotent), and checks status (get).no
manage_public_sharesLists or revokes public shares (requires shares:write).no
preview_actionPreview a registered high-risk action (delete_site_data, delete_site, shorten_retention, enable_public_share, delete_workspace, delete_export) and return its impact, payload summary and execution conditions.yes

Security