Skip to content

OTel: include MCP server transport, command and remote host on mcp.server.lifecycle events #5659

Backlog

Description

@k4otix

Describe the feature or problem you'd like to solve

github.copilot.mcp.server.lifecycle reports state, source and name_hash (an unsalted SHA-256 of the name; the plain name is included only with content capture). The name is chosen by the user, so a local server can call itself github-mcp-server. Nothing in the telemetry says what actually runs (a stdio command) or where it connects (a remote URL).

MCP servers run code and receive tool arguments, which makes them a main agentic supply-chain risk. Inventory by name alone can't tell the approved server from an impostor.

Proposed solution

Add these metadata attributes to the initialized lifecycle event (and to github.copilot.mcp.server.connection.count where the cardinality is acceptable):

  • github.copilot.mcp.server.transport: stdio, http, sse
  • github.copilot.mcp.server.command.executable: the basename of the stdio command (for example npx, uvx, docker, node)
  • github.copilot.mcp.server.command.sha256: a hash of the full command line and arguments (so no secrets are exported)
  • server.address / server.port (standard semconv) for remote servers; url.full only with content capture
  • github.copilot.mcp.server.package: the package identifier, when started from a registry or package runner (for example @scope/server@1.2.3)

Example prompts or workflows

  • Allowlist MCP servers by transport plus host or package, not by spoofable name.
  • Alert on a new remote MCP host never seen before in the organisation.
  • Alert on stdio servers started through npx/uvx with unpinned versions.
  • Map tool calls from an MCP server back to the exact package version during incident response.

Additional context

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions