fix: Add checks and better error messages on server object for mcp run (#297)

This commit is contained in:
john0312 2025-05-14 01:27:10 +08:00 • committed by GitHub
commit 37b54b4c03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -387,6 +387,8 @@ python server.py
mcp run server.py
```
Note that `mcp run` or `mcp dev` only supports server using FastMCP and not the low-level server variant.
### Streamable HTTP Transport
> **Note**: Streamable HTTP transport is superseding SSE transport for production deployments.
@ -694,6 +696,8 @@ if __name__ == "__main__":
asyncio.run(run())
```
Caution: The `mcp run` and `mcp dev` tool doesn't support low-level server.
### Writing MCP Clients
The SDK provides a high-level client interface for connecting to MCP servers using various [transports](https://modelcontextprotocol.io/specification/2025-03-26/basic/transports):