Skip to content

MCP Resources: expose GPU topology as context #8

Description

@pmady

In addition to tools (on-demand queries), MCP supports resources — static or semi-static data that agents can load into their context window.

Requirements:

  • Expose GPU topology as an MCP resource (device count, names, UUIDs, MIG layout)
  • Resource URI pattern: gpu://topology, gpu://device/{index}
  • Use mcp.AddResource() from the Go SDK
  • Topology data refreshes on server start, not on every request

Why this matters:

  • Agents can preload GPU context without calling tools
  • Reduces tool call overhead for basic questions like "how many GPUs are there?"
  • Follows MCP best practice of separating static context from dynamic queries

Difficulty: Medium

See: MCP Resources spec

Activity

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

    enhancementNew feature or requestmcpMCP protocol related

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions