Pause & Resume
Temporarily halt an MCP server without destroying its configuration.
Temporarily halt an MCP server without destroying its configuration.
Overview
Pausing a server keeps it registered but rejects all incoming requests (except ping) with a SERVER_PAUSED error (code -32005).
Useful for:
Maintenance windows
Admin interfaces that need to disable a server temporarily
Rate limiting or circuit breaker patterns
Graceful shutdown sequences
Basic Usage
server = MCPServer( "my-tools" )
.registerTool( searchTool )
.registerTool( createTicketTool )
// Pause the server
server.pause()
// Check if paused
if ( server.isPaused() ) {
println( "Server is currently paused" )
}
// Resume the server
server.resume()Fluent Chaining
Events
Pausing and resuming fire interception points:
Event
When
onMCPServerPause
When pause() called
onMCPServerResume
When resume() called
Error Response When Paused
When a paused server receives a request (except ping), it returns:
Monitoring Pause State
Example: Maintenance Mode
Next Steps
✅ Best Practices — Production patterns
📊 Observability — Monitor operations
💡 Examples — Complete examples
Last updated