|
|
@ -33968,7 +33968,7 @@ graph TD
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
mcp.run(transport="sse")
|
|
|
|
mcp.run(transport="streamable-http")
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Server Best Practices
|
|
|
|
### Server Best Practices
|
|
|
@ -53167,7 +53167,7 @@ def get_okx_crypto_volume(symbol: str) -> str:
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
# Run the MCP server with SSE (Server-Sent Events) transport
|
|
|
|
# Run the MCP server with SSE (Server-Sent Events) transport
|
|
|
|
# Server will be available at http://localhost:8001/mcp
|
|
|
|
# Server will be available at http://localhost:8001/mcp
|
|
|
|
mcp.run(transport="sse")
|
|
|
|
mcp.run(transport="streamable-http")
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
### Step 4: Connect Agent to MCP Server
|
|
|
|
### Step 4: Connect Agent to MCP Server
|
|
|
@ -58300,7 +58300,7 @@ async def swarms_available() -> Any:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if __name__ == "__main__":
|
|
|
|
if __name__ == "__main__":
|
|
|
|
mcp.run(transport="sse")
|
|
|
|
mcp.run(transport="streamable-http")
|
|
|
|
```
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
|
|
## Client side
|
|
|
|
## Client side
|
|
|
|