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 |
In MCP, "params" are method-specific. v1alpha1 XAccessPolicy's
spec.rules.authorization.mcp.methods.paramsshould document the context of the matcher relatively to each MCP method it can be used with.E.g., an MCP
tools/callrequest 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.paramsmatches against thenameparam of the MCP request.In turn, a
resources/subscriberequest 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.paramsmatches against theuriparam of the MCP request.I think this requires documentation.
E.g.:
prompts/getnameresources/subscribeuriresources/unsubscribeuriresources/readuritools/callnameOr if we want to simplify it:
promptsnameresourcesuritoolsname