Team websites are not returned by `/websites` or MCP `list_websites`
Describe the Bug
Websites that belong to a team are not returned by the regular website listing API endpoint or by the MCP list_websites tool, even though the authenticated user has access to those websites through their team membership.
The behavior is consistent between the Umami API and the MCP server:
GET /websitesreturns no websites.- MCP
list_websitesalso returns no websites. - The authenticated user does not own any websites directly.
- The relevant websites belong to a team.
- The authenticated user is a member of that team and has permission to access those websites.
However, when the ID of one of those team-owned websites is provided explicitly, the same user can successfully retrieve analytics data for that website.
This means the authentication and authorization for accessing the actual website data are working correctly. The issue appears to be limited to website discovery/listing.
Steps to reproduce
- Create a user.
- Add the user to a team, for example E-Commerce.
- Assign a website to that team.
- Make sure the user does not own any websites directly.
- Create an API key for that user.
- Call the website listing endpoint:
GET /api/websites
Authorization: Bearer <api-key>Result:
[]- Call the MCP
list_websitestool using the same API key. Result:
[]- Take the ID of a website that belongs to the team and call a website-specific endpoint, for example:
GET /api/websites/<website-id>/stats
Authorization: Bearer <api-key>This request succeeds and returns the expected analytics data.
Actual behavior
The user can access analytics data for a team-owned website when the websiteId is known, but that website is not returned by either:
GET /api/websitesor:
list_websitesAs a result, clients cannot discover websites that the user has access to through team membership.
This is especially problematic for MCP clients, because list_websites is intended to be the first tool used to discover a valid websiteId.
Expected behavior
GET /api/websites and consequently MCP list_websites should return all websites that the authenticated user is authorized to access, including:
- websites owned directly by the user
- websites belonging to teams the user is a member of
If a user is authorized to call:
GET /api/websites/<website-id>/statsfor a team-owned website, that same website should also be discoverable through the website listing endpoint.
Database
PostgreSQL
Relevant log output
Which Umami version are you using?
3.4.0
How are you deploying your application?
Docker
Which browser are you using?
Edge
Source: umami-software/umami