Or Weis
07/23/2025, 11:38 AMpermit_fastmcp
Check it out on FastMCP’s official site: https://gofastmcp.com/integrations/permit
As well as the OSS repo itself - https://github.com/permitio/permit-fastmcp
Install
# Using UV
uv add permit-fastmcp
# Using pip
pip install permit-fastmcp
Add the Permit-FastMCP middleware
mcp = FastMCP("My MCP Server")
# Add <http://Permit.io|Permit.io> authorization middleware
mcp.add_middleware(PermitMcpMiddleware(
permit_pdp_url="<http://localhost:7766>",
permit_api_key="your-permit-api-key"
))
@mcp.tool
def my_tool(data: str) -> str:
return f"Processed: {data}"
Easily add policies with Permit s always (Policy Editor UI, API, SDK, Terraform, Rego) .Or Weis
07/23/2025, 11:42 AMtools/list, resources/read):
◦ Resource: {server_name}_{component} (e.g., myserver_tools)
◦ Action: The method verb (e.g., list, read)
• Tool execution (method tools/call):
◦ Resource: {server_name} (e.g., myserver)
◦ Action: The tool name (e.g., greet)Or Weis
07/23/2025, 11:45 AM