Skip to content

feat: explore session-scoped component visibility for role-based tool access #189

Description

@ichoosetoaccept

FastMCP 3.0 introduces session-specific visibility control via ctx.enable_components() / ctx.disable_components(). This could let us adapt available tools per session — e.g. hide write operations (resolve, reply) until the agent explicitly opts in, or scope tools based on configuration.

What's available:

  • ctx.enable_components() / ctx.disable_components() per session
  • Granular authorization on individual components with async auth checks

Potential use cases:

  • Progressive disclosure: start with read-only tools, enable write tools after agent confirms intent
  • Role-based access: different tool sets for different MCP clients
  • Could replace or complement our WriteOperationMiddleware

Ref: https://github.com/PrefectHQ/fastmcp/releases/tag/v3.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions