已弃用
改用这个 -好多了。
安装
git clone https://github.com/irrationalagent/glean_mcp
cd glean_mcp
python3 -m venv venv
source venv/bin/activate
pip3 install -e .
运行(独立)
glean-mcp
配置使用Claude CLI
添加以下内容 .mcp.json,请确保指定正确的路径:
"mcpServers": {
"glean": {
"command": "/some/path/glean_mcp/venv/bin/glean-mcp",
"args": []
}
}开始克劳德: claude
列出MCP服务器: /mcp
可用工具
此MCP服务器提供了三个主要工具,用于与Mozilla的Glean遥测系统进行交互:
1.list_apps_tool
列出所有可用的Glean应用程序及其标识符。
参数: 无
退货: 包含应用元数据的JSON数组,包括:
v1_name:应用程序的v1标识符(与其他工具一起使用)app_name:显示名称app_id:应用程序IDbq_dataset_family:BigQuery数据集族名称canonical_app_name:规范名称document_namespace:文档命名空间
示例用法:
> list all glean apps2.搜索信息
使用自由文本查询在所有应用程序中搜索Glean指标。
参数:
query(必填):搜索词(例如,“启动时间”、“默认浏览器”)app_hint(可选):应用程序标识符会影响结果(例如,“fenix”、“firefox_ios”)limit(可选,默认值=25):最大结果数
退货: 匹配指标的JSON数组,包含:
id:度量标识符name:度量名称category:度量类别type:度量类型(计数器、布尔值、字符串、事件等)app:应用程序名称description:度量标准衡量什么send_in_pings:哪些ping包含此度量url:链接到《格林词典》页面
示例用法:
> search for metrics about startup time in fenix
> find metrics tracking default browser on firefox_ios3.获取详细信息
获取特定指标的详细信息,包括完整定义、数据审查和额外密钥。
参数:
v1_name(必填):应用程序标识符(例如,“fenix”、“firefox_ios”)metric_name(必填):完整度量名称(例如,“collections.save_button”)
退货: JSON对象,包含完整的度量细节,包括:
latest_definition:完整的度量定义,包括:
- bugs:相关错误URL - data_reviews:数据审查链接 - description:详细说明 - lifetime:度量生命周期(ping、应用程序等) - type:公制类型 - extra_keys:事件元数据(用于事件度量) - data_sensitivity:数据敏感性分类 - notification_emails:联系电子邮件 - 还有更多。..
示例用法:
> get details for the metric app.default_browser on firefox_ios
> show me the full definition of collections.save_button on fenix示例
> please find the probe on firefox_ios that tracks whether the browser is set to default
⏺ I'll search for Firefox iOS probes related to default browser status.
⏺ glean - search_metrics (MCP)(query: "default browser", app_hint: "firefox_ios", limit: 25)
⎿ [
{
"id": "default_browser_card.dismiss_pressed",
[...]
⏺ I found the probe that tracks whether Firefox iOS is set as the default browser:
app.default_browser
- Type: boolean
- Description: Is Firefox the default browser
Additionally, there are related probes that provide context:
app.opened_as_default_browser
- Type: counter
- Description: Counts the number of times the app is opened from an external link, implying the client has Firefox set as a
default browser. Currently this is the most accurate way of measuring how often Firefox is set as the default browser.
app.last_opened_as_default_browser
- Type: datetime
- Description: The date of when the app was last opened as default browser.
The app.default_browser boolean probe is the direct indicator, while app.opened_as_default_browser is noted as being the most
accurate measurement method since it tracks actual usage as the default browser rather than just the setting state.