Skip to content
AdminKit

Resource template (MCP)

A resource template is how a Model Context Protocol server exposes a parameterized family of resources -- for example file:///{path} covering every file under a project directory -- as a single URI template, defined using RFC 6570 syntax, rather than listing every concrete resource individually. A client discovers a server's templates through a resources/templates/list request, separate from the plain resources/list call that returns already-concrete URIs, and fills in a template's variables, often with help from the protocol's completion API, to read a specific resource it names. Because one declared template can stand in for an entire directory tree or an entire database table's worth of concrete resources, it deserves the same deliberate access-control review as a server's static resource list -- a template that looks narrow in its definition can still expose far more than a reviewer scanning a resource list by name alone would assume.

By AdminKit team, Netbase JSC · Updated

Chat with David on WhatsApp