wso2 / wso2/api-platform

[Improvement]: Only advertise authorized tools based on mcp_authz policy

Open
#2,753 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Aspect/AI Type/Improvement
Dominant language
Go
Stars
71
Forks
111
Avg merge
1d 14h
Merged PRs (30d)
110

Description

Please select the area the issue is related to

Gateway

Please select the aspect the issue is related to

Aspect/AI (AI/LLM integration, MCP, AI readiness)

Suggested Improvement

When an mcp client does its tool discovery, based on the scopes in its access token only return the set of tools it has access to. Default for tools unmapped to a scope should be to return them.

  Request (JSON-RPC 2.0):
  {
    "jsonrpc": "2.0",
    "id": 1,
    "method": "tools/list",
    "params": {
      "cursor": "optional-opaque-pagination-cursor"
    }
  }

Reasoning is an agent will always attempt a tool it sees returned until it fails which wastes tokens.

Related Issues

https://github.com/wso2/api-platform/issues/2751

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start at the Gateway entry point handling the MCP JSON-RPC tools/list request and read the mcp_authz policy behavior, then review related issue #2751. Done means discovery returns only tools authorized by the access-token scopes while still returning tools that are not mapped to a scope.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
ai, api, authorization
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
50/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.