mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-09 07:09:11 +02:00
Keep the sampling conformance scenario live; fix roots example URIs
This commit is contained in:
parent
0e9cab86fd
commit
0172e4c4d4
3 changed files with 27 additions and 8 deletions
|
|
@ -24,7 +24,7 @@ from fastmcp import Client
|
|||
|
||||
client = Client(
|
||||
"my_mcp_server.py",
|
||||
roots=["/path/to/root1", "/path/to/root2"]
|
||||
roots=["file:///path/to/root1", "file:///path/to/root2"]
|
||||
)
|
||||
```
|
||||
|
||||
|
|
@ -38,7 +38,7 @@ from fastmcp.client.roots import RequestContext
|
|||
|
||||
async def roots_callback(context: RequestContext) -> list[str]:
|
||||
print(f"Server requested roots (Request ID: {context.request_id})")
|
||||
return ["/path/to/root1", "/path/to/root2"]
|
||||
return ["file:///path/to/root1", "file:///path/to/root2"]
|
||||
|
||||
client = Client(
|
||||
"my_mcp_server.py",
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue