MCPProxyRepo: Add project_uuid filter to List and Count queries (before LIMIT/OFFSET)
Open
@RakhithaRR is already working on this.
Since Mar 11, 2026.
- Dominant language
- Go
- Stars
- 71
- Forks
- 111
- Avg merge
- 1d 14h
- Merged PRs (30d)
- 110
Description
Summary
MCPProxyRepo.List and MCPProxyRepo.Count in platform-api/src/internal/repository/mcp.go only scope by organization UUID. The projectId filter is currently applied after pagination in the handler, which causes MCP proxies to be dropped from later pages and renders the count/pagination incorrect.
Problem
Listquery usesWHERE a.organization_uuid = ?only — noproject_uuidpredicate.Countquery similarly omitsproject_uuidfrom its WHERE clause.- As a result, filtering by project happens post-pagination, causing incorrect counts and incomplete pages.
Expected Fix
- Thread an optional
projectUUID *stringparameter into bothMCPProxyRepo.ListandMCPProxyRepo.Count. - Add
AND p.project_uuid = ?to both SQL queries whenprojectUUIDis non-nil, beforeORDER BY/LIMIT/OFFSET. - Update parameter binding order in
r.db.Query/r.db.QueryRowaccordingly. - Update the
MCPProxyRepositoryinterface inplatform-api/src/internal/repository/interfaces.goto reflect the new signatures. - Update callers (handler and service layers) to pass the project filter down to the repository.
References
- PR: https://github.com/wso2/api-platform/pull/1332
- Review comment: https://github.com/wso2/api-platform/pull/1332#discussion_r2909770625
/cc @RakhithaRR
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.