docs: Update examples to use stateless HTTP with JSON responses (#1499)
Some checks failed
Main branch checks / checks (push) Has been cancelled
Some checks failed
Main branch checks / checks (push) Has been cancelled
This commit is contained in:
parent
9c8f763aa8
commit
fcffa14b5b
1 changed files with 76 additions and 38 deletions
|
|
@ -12,7 +12,11 @@ from mcp.server.fastmcp import FastMCP
|
|||
|
||||
# Configure streamable_http_path during initialization
|
||||
# This server will mount at the root of wherever it's mounted
|
||||
mcp_at_root = FastMCP("My Server", streamable_http_path="/")
|
||||
mcp_at_root = FastMCP(
|
||||
"My Server",
|
||||
json_response=True,
|
||||
streamable_http_path="/",
|
||||
)
|
||||
|
||||
|
||||
@mcp_at_root.tool()
|
||||
|
|
|
|||
Loading…
Reference in a new issue