Skip to content

Commit f9d1ec9

Browse files
committed
feat(keycardai-mcp-fastmcp): allowed to override the client
1 parent 0860679 commit f9d1ec9

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

  • packages/mcp-fastmcp/src/keycardai/mcp/integrations/fastmcp

packages/mcp-fastmcp/src/keycardai/mcp/integrations/fastmcp/middleware.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ def __init__(
7676
*,
7777
zone_url: str | None = None,
7878
client_name: str | None = None,
79+
client: AsyncClient | None = None,
80+
7981
):
8082
"""Initialize access middleware.
8183
@@ -96,7 +98,7 @@ def __init__(
9698

9799
self.client_name = settings.client_name or "FastMCP OAuth Client"
98100

99-
self.client: AsyncClient | None = None
101+
self.client: AsyncClient | None = client
100102
self._init_lock: asyncio.Lock | None = None
101103
self._access_tokens: dict[str, str] = {}
102104

0 commit comments

Comments
 (0)