Skip to content

Resolve library dependency pings/metrics/tags in MCP server#2325

Merged
akkomar merged 4 commits intomainfrom
mcp_fix_deps
Feb 17, 2026
Merged

Resolve library dependency pings/metrics/tags in MCP server#2325
akkomar merged 4 commits intomainfrom
mcp_fix_deps

Conversation

@akkomar
Copy link
Copy Markdown
Member

@akkomar akkomar commented Feb 17, 2026

This should fix the issue reported in https://mozilla.slack.com/archives/C07MNJ1Q3DW/p1770997453481839?thread_ts=1770294328.866299&cid=C07MNJ1Q3DW

The MCP server previously only queried an app's own probeinfo endpoints, missing metrics and pings defined by library dependencies (e.g. baseline ping from glean-core). This adds dependency resolution that fetches library-variants mappings, resolves each app's dependencies to v1 API names, and merges library data with app data.

The MCP server previously only queried an app's own probeinfo endpoints,
missing metrics and pings defined by library dependencies (e.g. baseline
ping from glean-core). Add dependency resolution that fetches
library-variants mappings, resolves each app's dependencies to v1 API
names, and merges library data with app data (app takes precedence).

Also cache app-listings and library-variants for performance, and add
comprehensive tests for dependency resolution edge cases.
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR implements library dependency resolution for the MCP (Model Context Protocol) server to include metrics, pings, and tags from library dependencies like glean-core. Previously, the MCP server only queried an app's own probeinfo endpoints, missing data defined by library dependencies.

Changes:

  • Added dependency resolution that fetches library-variant mappings, resolves app dependencies to v1 API names, and merges library data with app data (with app data taking precedence)
  • Implemented caching for library variants and app listings to optimize performance
  • Added comprehensive test coverage for dependency resolution scenarios including edge cases
  • Simplified virtual environment setup in netlify.toml build configuration

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
.netlify/mcp.js Adds library dependency resolution system with caching, new helper functions to fetch and merge library data with app data, and cache clearing in initialize method
tests/mcp.test.js Adds comprehensive test suite for library dependency resolution covering various scenarios including multiple dependencies, empty dependencies, unresolvable dependencies, precedence rules, and error handling
netlify.toml Simplifies Python virtual environment setup by using python3 -m venv and pip3 directly instead of the more complex wget-based pip installation

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@akkomar akkomar marked this pull request as ready for review February 17, 2026 14:51
@akkomar akkomar requested a review from edugfilho February 17, 2026 14:52
Copy link
Copy Markdown
Contributor

@edugfilho edugfilho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@akkomar akkomar merged commit edefb9f into main Feb 17, 2026
13 checks passed
@akkomar akkomar deleted the mcp_fix_deps branch February 17, 2026 16:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants