Skip to content

Document context of v1alpha1's MCP params matchers #275

@guicassolato

Description

@guicassolato

In MCP, "params" are method-specific. v1alpha1 XAccessPolicy's spec.rules.authorization.mcp.methods.params should document the context of the matcher relatively to each MCP method it can be used with.

E.g., an MCP tools/call request looks like this:

{
  "method":"tools/call",
  "params":{
    "name":"get-sum",
    "arguments":{"a":2,"b":3},
    "_meta":{"progressToken":1}
  },
  "jsonrpc":"2.0",
  "id":1
}

So for tools/call, xaccesspolicies.spec.rules.authorization.mcp.methods.params matches against the name param of the MCP request.

In turn, a resources/subscribe request looks like this:

{
  "method": "resources/subscribe",
  "params": {
    "uri": "file:///home/bob/config.yaml"
  },
  "jsonrpc": "2.0",
  "id": 2
}

Here, I imagine xaccesspolicies.spec.rules.authorization.mcp.methods.params matches against the uri param of the MCP request.

I think this requires documentation.

E.g.:

MCP method XAccessPolicy param match
prompts/get name
resources/subscribe uri
resources/unsubscribe uri
resources/read uri
tools/call name

Or if we want to simplify it:

MCP primitive XAccessPolicy param match
prompts name
resources uri
tools name

Metadata

Metadata

Labels

kind/documentationCategorizes issue or PR as related to documentation.triage/acceptedIndicates an issue or PR is ready to be actively worked on.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions