<!channel> Building MCP servers? Using FastMCP? It...
# announcements
o
<!channel> Building MCP servers? Using FastMCP? It’s now easier than ever to add fine-grained authorization with
permit_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
Copy code
# Using UV 
uv add permit-fastmcp

# Using pip
pip install permit-fastmcp
Add the Permit-FastMCP middleware
Copy code
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) .
🤖 3
⏩ 2
permiticon 5
🦜 2
🚀 6
How Policy Mapping Works • MCP server methods (e.g.,
tools/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
)
And of course it you want even more AI security capabilities do check out our newest product offering - Agent.Security Take AI and MCP to enterprise grade production fast and secure 1. Every agent must have an identity 2. Identity is a product of Uniqueness (human delegator), relationships, and intent / agency 3. Agents should ideally have zero-standing permissions; instead deriving their access just in time through relationship based access control (ReBAC)