Update composition.mdx

This commit is contained in:
Jeremiah Lowin 2025-05-21 12:37:54 -04:00
commit eb68fb2a6d

View file

@ -205,11 +205,17 @@ This was the default format in FastMCP before 2.4. While still supported, it's n
### Configuring the Prefix Format
You can configure the prefix format globally:
You can configure the prefix format globally in code:
```python
from fastmcp import settings
settings.settings.resource_prefix_format = "protocol" # Switch to legacy format
settings.settings.resource_prefix_format = "protocol"
```
Or via environment variable:
```bash
FASTMCP_RESOURCE_PREFIX_FORMAT=protocol
```
Or per-server: