Simple Analytics MCP by usefulapi
Read Simple Analytics stats: pageviews, visitors, pages, referrers, events and data exports.
我該用這個嗎
品質與安全性
發現項目(3)
- HIGH
- MEDIUM在 simpleanalytics_get_breakdown 中
- LOW在 simpleanalytics_export_datapoints 中
根據工具定義與協定合規性的自動化分析。
上下文成本
這是每次將伺服器的工具載入模型上下文時所消耗的約略 token 數量。數量越高,可用於其他工作的注意力就越少。
安裝
一鍵安裝
將以下內容加入你的 `claude_desktop_config.json` 檔案:
{
"mcpServers": {
"simple-analytics": {
"url": "https://simple-analytics.usefulapi.io/mcp"
}
}
}遠端端點
https://simple-analytics.usefulapi.io/mcpstreamable-http它能做什麼
工具清單
工具(6)
🟢simpleanalytics_list_websites
List the websites of the Simple Analytics account (hostnames to use in the other tools). Good first call. Admin API: GET /api/websites.
輸入結構描述
{
"type": "object",
"properties": {},
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢simpleanalytics_get_stats(hostname, start, end, timezone, page, ...)
Aggregated traffic for one website and date range: total pageviews, unique visitors and the median seconds on page. Optional filters narrow it to a page, country, referrer, UTM value, browser, OS, device or metadata value. Stats API: GET /<hostname>.json.
輸入結構描述
{
"type": "object",
"properties": {
"hostname": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Website hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites)."
},
"start": {
"description": "Start date: YYYY-MM-DD, today, yesterday or today-30d. Default: 1 month ago.",
"type": "string"
},
"end": {
"description": "End date (inclusive): YYYY-MM-DD, today, yesterday or today-1d. Default: today.",
"type": "string"
},
"timezone": {
"description": "IANA time zone, e.g. Europe/Amsterdam. Default: the website setting.",
"type": "string"
},
"page": {
"description": "Only this page path, e.g. /pricing. A trailing * matches a prefix (/blog/*).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"pages": {
"description": "Only these page paths, comma separated (/contact,/product/*).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"country": {
"description": "Only this country, 2-letter code (NL).",
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"referrer": {
"description": "Only this referrer (normalized, e.g. google.com).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_source": {
"description": "Only this UTM source.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_medium": {
"description": "Only this UTM medium.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_campaign": {
"description": "Only this UTM campaign.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_content": {
"description": "Only this UTM content.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_term": {
"description": "Only this UTM term.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"browser_name": {
"description": "Only this browser name (Chrome).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"os_name": {
"description": "Only this OS name (iOS).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"device_type": {
"description": "Only this device type.",
"type": "string",
"enum": [
"mobile",
"tablet",
"desktop",
"tv"
]
},
"metadata": {
"description": "Exact metadata filters as {key: value}; all must match.",
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$"
},
"additionalProperties": {
"type": "string",
"maxLength": 200
}
}
},
"required": [
"hostname"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢simpleanalytics_get_timeseries(hostname, start, end, interval, timezone, ...)
Pageviews and visitors per hour, day, week, month or year for one website and date range (time series for charts and trends). Optional filters as in simpleanalytics_get_stats. Stats API: GET /<hostname>.json?fields=histogram.
輸入結構描述
{
"type": "object",
"properties": {
"hostname": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Website hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites)."
},
"start": {
"description": "Start date: YYYY-MM-DD, today, yesterday or today-30d. Default: 1 month ago.",
"type": "string"
},
"end": {
"description": "End date (inclusive): YYYY-MM-DD, today, yesterday or today-1d. Default: today.",
"type": "string"
},
"interval": {
"description": "Bucket size (default day).",
"type": "string",
"enum": [
"hour",
"day",
"week",
"month",
"year"
]
},
"timezone": {
"description": "IANA time zone, e.g. Europe/Amsterdam. Default: the website setting.",
"type": "string"
},
"page": {
"description": "Only this page path, e.g. /pricing. A trailing * matches a prefix (/blog/*).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"pages": {
"description": "Only these page paths, comma separated (/contact,/product/*).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"country": {
"description": "Only this country, 2-letter code (NL).",
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"referrer": {
"description": "Only this referrer (normalized, e.g. google.com).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_source": {
"description": "Only this UTM source.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_medium": {
"description": "Only this UTM medium.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_campaign": {
"description": "Only this UTM campaign.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_content": {
"description": "Only this UTM content.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_term": {
"description": "Only this UTM term.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"browser_name": {
"description": "Only this browser name (Chrome).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"os_name": {
"description": "Only this OS name (iOS).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"device_type": {
"description": "Only this device type.",
"type": "string",
"enum": [
"mobile",
"tablet",
"desktop",
"tv"
]
},
"metadata": {
"description": "Exact metadata filters as {key: value}; all must match.",
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$"
},
"additionalProperties": {
"type": "string",
"maxLength": 200
}
}
},
"required": [
"hostname"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢simpleanalytics_get_breakdown(hostname, dimension, start, end, limit, ...)
Top values of one dimension for one website and date range, each with pageviews and visitors: pages, countries, referrers, UTM sources/mediums/campaigns/contents/terms, browsers, operating systems or device types. Optional filters as in simpleanalytics_get_stats. Stats API: GET /<hostname>.json?fields=<dimension>.
輸入結構描述
{
"type": "object",
"properties": {
"hostname": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Website hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites)."
},
"dimension": {
"type": "string",
"enum": [
"pages",
"countries",
"referrers",
"utm_sources",
"utm_mediums",
"utm_campaigns",
"utm_contents",
"utm_terms",
"browser_names",
"os_names",
"device_types"
],
"description": "What to break the traffic down by."
},
"start": {
"description": "Start date: YYYY-MM-DD, today, yesterday or today-30d. Default: 1 month ago.",
"type": "string"
},
"end": {
"description": "End date (inclusive): YYYY-MM-DD, today, yesterday or today-1d. Default: today.",
"type": "string"
},
"limit": {
"description": "Maximum number of values (default 20, max 1000).",
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"timezone": {
"description": "IANA time zone, e.g. Europe/Amsterdam. Default: the website setting.",
"type": "string"
},
"page": {
"description": "Only this page path, e.g. /pricing. A trailing * matches a prefix (/blog/*).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"pages": {
"description": "Only these page paths, comma separated (/contact,/product/*).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"country": {
"description": "Only this country, 2-letter code (NL).",
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"referrer": {
"description": "Only this referrer (normalized, e.g. google.com).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_source": {
"description": "Only this UTM source.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_medium": {
"description": "Only this UTM medium.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_campaign": {
"description": "Only this UTM campaign.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_content": {
"description": "Only this UTM content.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_term": {
"description": "Only this UTM term.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"browser_name": {
"description": "Only this browser name (Chrome).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"os_name": {
"description": "Only this OS name (iOS).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"device_type": {
"description": "Only this device type.",
"type": "string",
"enum": [
"mobile",
"tablet",
"desktop",
"tv"
]
},
"metadata": {
"description": "Exact metadata filters as {key: value}; all must match.",
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$"
},
"additionalProperties": {
"type": "string",
"maxLength": 200
}
}
},
"required": [
"hostname",
"dimension"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢simpleanalytics_get_events(hostname, names, start, end, timezone, ...)
How often custom events happened on one website in a date range. Pass event names, or leave names out for all events (up to 1000). Stats API: GET /<hostname>.json?events=...
輸入結構描述
{
"type": "object",
"properties": {
"hostname": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Website hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites)."
},
"names": {
"description": "Event names; default all events.",
"maxItems": 50,
"type": "array",
"items": {
"type": "string",
"minLength": 1,
"maxLength": 100,
"pattern": "^[^,*]+$"
}
},
"start": {
"description": "Start date: YYYY-MM-DD, today, yesterday or today-30d. Default: 1 month ago.",
"type": "string"
},
"end": {
"description": "End date (inclusive): YYYY-MM-DD, today, yesterday or today-1d. Default: today.",
"type": "string"
},
"timezone": {
"description": "IANA time zone, e.g. Europe/Amsterdam. Default: the website setting.",
"type": "string"
},
"page": {
"description": "Only this page path, e.g. /pricing. A trailing * matches a prefix (/blog/*).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"pages": {
"description": "Only these page paths, comma separated (/contact,/product/*).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"country": {
"description": "Only this country, 2-letter code (NL).",
"type": "string",
"pattern": "^[A-Za-z]{2}$"
},
"referrer": {
"description": "Only this referrer (normalized, e.g. google.com).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_source": {
"description": "Only this UTM source.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_medium": {
"description": "Only this UTM medium.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_campaign": {
"description": "Only this UTM campaign.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_content": {
"description": "Only this UTM content.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"utm_term": {
"description": "Only this UTM term.",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"browser_name": {
"description": "Only this browser name (Chrome).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"os_name": {
"description": "Only this OS name (iOS).",
"type": "string",
"minLength": 1,
"maxLength": 500
},
"device_type": {
"description": "Only this device type.",
"type": "string",
"enum": [
"mobile",
"tablet",
"desktop",
"tv"
]
},
"metadata": {
"description": "Exact metadata filters as {key: value}; all must match.",
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[a-zA-Z0-9_]+$"
},
"additionalProperties": {
"type": "string",
"maxLength": 200
}
}
},
"required": [
"hostname"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}🟢simpleanalytics_export_datapoints(hostname, start, end, type, fields, ...)
Raw, unsampled page views or events of one website for a date range, as rows with only the fields asked for. The reply is capped at max_rows (default 100, max 1000) rows and 2 MB; "truncated" says more exist, so narrow the range. Rows are cut to about 40 000 characters of JSON. Dates: YYYY-MM-DD, or YYYY-MM-DDTHH for one hour (start and end the same day). Robots are left out unless asked. Needs the user id too. Export API: GET /api/export/datapoints.
輸入結構描述
{
"type": "object",
"properties": {
"hostname": {
"type": "string",
"minLength": 1,
"maxLength": 300,
"description": "Website hostname as shown in Simple Analytics, e.g. example.com (from simpleanalytics_list_websites)."
},
"start": {
"type": "string",
"description": "Start date (see description)."
},
"end": {
"type": "string",
"description": "End date, inclusive."
},
"type": {
"description": "Page views (default) or events.",
"type": "string",
"enum": [
"pageviews",
"events"
]
},
"fields": {
"description": "Fields to export (default added_iso, path, country_code, device_type, document_referrer). All: added_date, added_iso, added_unix, browser_name, browser_version, country_code, datapoint, device_type, document_referrer, duration_seconds, hostname, hostname_original, is_robot, is_unique, lang_language, lang_region, os_name, os_version, path, path_and_query, query, referrer_hostname, referrer_path, screen_height, screen_width, scrolled_percentage, session_id, user_agent, utm_campaign, utm_content, utm_medium, utm_source, utm_term, uuid, viewport_height, viewport_width, metadata.<key>_<text|int|bool|date>. datapoint is for events only; duration_seconds, is_unique and scrolled_percentage for pageviews only.",
"minItems": 1,
"maxItems": 20,
"type": "array",
"items": {
"type": "string"
}
},
"max_rows": {
"description": "Maximum rows returned (default 100).",
"type": "integer",
"minimum": 1,
"maximum": 1000
},
"include_robots": {
"description": "Include robot/crawler traffic (default false).",
"type": "boolean"
},
"timezone": {
"description": "IANA time zone, e.g. Europe/Amsterdam. Default: the website setting.",
"type": "string"
}
},
"required": [
"hostname",
"start",
"end"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}社群
證據