Runs the server, reading JSON-RPC requests from stdin and writing responses to stdout. Runs until stdin is closed or a shutdown signal (SIGINT/SIGTERM) is received, then performs graceful cleanup.
(&self, transport: &mut impl super::transport::McpTransport)
| 1637 | /// responses to stdout. Runs until stdin is closed or a shutdown signal |
| 1638 | /// (SIGINT/SIGTERM) is received, then performs graceful cleanup. |
| 1639 | pub async fn run(&self, transport: &mut impl super::transport::McpTransport) -> Result<()> { |
| 1640 | self.run_with_shutdown_policy(transport, true, true, None) |
| 1641 | .await |
| 1642 | } |
| 1643 | |
| 1644 | /// Runs one client connection without shutting down the server when that |
| 1645 | /// connection closes. Daemon-owned servers use this so the engine remains |