From cafa11d3adde1b6c888592e1d25cc26f04e19e41 Mon Sep 17 00:00:00 2001 From: Jeremiah Lowin <153965+jlowin@users.noreply.github.com> Date: Wed, 18 Jun 2025 21:57:19 -0400 Subject: [PATCH] Fix missing proxy arg --- src/fastmcp/server/proxy.py | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/fastmcp/server/proxy.py b/src/fastmcp/server/proxy.py index 0d82c9cb3..a65f17b5b 100644 --- a/src/fastmcp/server/proxy.py +++ b/src/fastmcp/server/proxy.py @@ -220,10 +220,14 @@ class FastMCPProxy(FastMCP): return list(resources.values()) - async def _list_resource_templates(self) -> list[ResourceTemplate]: + async def _list_resource_templates( + self, apply_middleware: bool = True + ) -> list[ResourceTemplate]: templates = { template.uri_template: template - for template in await super()._list_resource_templates() + for template in await super()._list_resource_templates( + apply_middleware=apply_middleware + ) } async with self.client: @@ -244,8 +248,11 @@ class FastMCPProxy(FastMCP): return list(templates.values()) - async def _list_prompts(self) -> list[Prompt]: - prompts = {prompt.name: prompt for prompt in await super()._list_prompts()} + async def _list_prompts(self, apply_middleware: bool = True) -> list[Prompt]: + prompts = { + prompt.name: prompt + for prompt in await super()._list_prompts(apply_middleware=apply_middleware) + } async with self.client: try: