mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-22 13:34:17 +02:00
Alias streamable-http as http
This commit is contained in:
parent
76e3df1bc1
commit
ffe0c92d63
17 changed files with 118 additions and 39 deletions
|
|
@ -82,7 +82,7 @@ mcp = FastMCP.from_openapi(
|
|||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.run(transport="streamable-http", port=8000)
|
||||
mcp.run(transport="http", port=8000)
|
||||
```
|
||||
|
||||
And that's it! With just a few lines of code, you've created an MCP server that exposes the entire JSONPlaceholder API as a collection of tools.
|
||||
|
|
@ -195,7 +195,7 @@ mcp = FastMCP.from_openapi(
|
|||
)
|
||||
|
||||
if __name__ == "__main__":
|
||||
mcp.run(transport="streamable-http", port=8000)
|
||||
mcp.run(transport="http", port=8000)
|
||||
```
|
||||
With this configuration:
|
||||
- `GET /users/{id}` becomes a `ResourceTemplate`.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue