You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug]: GET /api/v1/servers lists every server to a profile-pinned agent token (#1166 filter only covers legacy allowed_servers) #1682
A token created with --profile is limited to the profile's servers on the MCP surface, but GET /api/v1/servers returns every configured server to it. The #1166 fix filters through auth.CanEnumerateServer -> AuthContext.CanAccessServer, which only consults AllowedServers. A profile-pinned token takes its scope from the profile, so the REST door does not filter it.
Metadata only (names, protocol, command, URL, non-secret env values, connection state). Secret env values are masked.
Expected behavior
A profile-pinned token sees only the profile's effective servers over REST, the same subset it gets from /mcp/all, upstream_servers list, and a legacy-scoped token. GET /api/v1/servers?profile=<name> already implements that row filter, so the fix may be to apply the token's pinned profile as the implicit profile for non-admin callers.
Steps to reproduce
Configure two stdio servers, a and b.
mcpproxy profile create p --servers a --max-tier read
mcpproxy token create --name t-profile --profile p and mcpproxy token create --name t-legacy --servers a --permissions read
Other REST reads may need the same check once the predicate knows about profile scope (/api/v1/servers/{id}/tools, activity). I only verified /api/v1/servers.
/api/v1/config, /api/v1/tokens and write operations are correctly refused for agent tokens ("Agent tokens cannot ...").
Activity
fix(httpapi): hold profile-pinned agent tokens to their pin on GET /a…