fastmcp/tests/server/providers
Rishav Mitra 99eaeb8af4
fix: substitute server variable defaults when building base URL from OpenAPI spec (#3770)
* fix: resolve OpenAPI 3.x server variables in _create_default_client

When an OpenAPI spec defines server variables (e.g. `https://{region}.api.example.com/v1`),
the default values are now substituted before constructing the httpx client base URL.
Previously, the URL was used as-is, causing all requests to fail for specs that use
server variable templating.

Fixes #1681

* fix: use str.replace instead of format_map for server variable substitution

format_map applies Python string formatting rules, so variable names
like {api.version} would be treated as attribute access and raise errors.
Literal token replacement handles all valid OpenAPI variable names safely.
2026-04-06 19:48:30 -04:00
..
local_provider_tools fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
openapi fix: substitute server variable defaults when building base URL from OpenAPI spec (#3770) 2026-04-06 19:48:30 -04:00
proxy Update ty ignore comments for 0.0.25 compatibility (#3614) 2026-03-24 20:26:26 -04:00
__init__.py Refactor MountedProvider into FastMCPProvider + TransformingProvider (#2653) 2025-12-19 11:42:59 -05:00
test_base_provider.py fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
test_fastmcp_provider.py fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
test_local_provider.py fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
test_local_provider_prompts.py fix: resolve Pyright "Module is not callable" on @tool, @resource, @prompt decorators (#3540) 2026-03-17 18:11:42 -04:00
test_local_provider_resources.py Remove deprecated FastMCP() constructor kwargs (#3148) 2026-02-11 11:39:34 -05:00
test_skills_provider.py Block out-of-skill symlink hashing in skills scan (#3410) 2026-03-07 11:40:46 -05:00
test_skills_vendor_providers.py Add Skills Provider for exposing agent skills as MCP resources (#2944) 2026-01-19 18:29:16 -05:00
test_transforming_provider.py Refactor transform list methods to pure function pattern (#2942) 2026-01-19 16:21:35 -05:00