Add fine-grained authorization to your FastMCP servers with Permit.io
tools/list
, resources/read
):
{server_name}_{component}
(e.g., myserver_tools
)list
, read
)tools/call
):
{server_name}
(e.g., myserver
)greet
)Note: Don’t forget to assign the relevant role (e.g., Admin, User) to the user authenticating to your MCP server (such as the user in the JWT) in the Permit.io Directory. Without the correct role assignment, users will not have access to the resources and actions you’ve configured in your policies.For detailed policy mapping examples and configuration, see Detailed Policy Mapping.Example: In Permit.io Directory, both ‘client’ and ‘admin’ users are assigned the ‘Admin’ role, granting them the permissions defined in your policy mapping.
tools/list
, resources/list
, prompts/list
), hiding to the client components that are not authorized by the defined policies.
tools/call
, resources/read
, prompts/get
), blocking operations that are not authorized by the defined policies.
https://cloudpdp.api.permit.io
permit-fastmcp
package:
mcp_server
and mcp_server_tools
greet
, add
, list
, read
Admin
, User
, Guest
arg_name
, arg_number
) for granular policy conditions.
resource.arg_number greater-than 10
to allow the conditional-greet
tool only when the number argument exceeds 10.
resource.arg_number greater-than 10
to allow the conditional-greet
tool only when the number argument exceeds 10.