R6 class for managing MCP session communication with timeout management. Encapsulates session state while maintaining compatibility with existing global state for server communication. Provides automatic resource cleanup and session lifecycle management.
Details
MCP Session Management Class
Handles session lifecycle:
Socket Management: Creates and binds nanonext sockets for communication
Message Processing: Async tool execution and response handling
Timeout Management: Automatic session cleanup after inactivity
Resource Cleanup: Proper socket and state resource management
Methods
Inherited methods
MCPR::BaseMCPR$cleanup_all()MCPR::BaseMCPR$create_socket()MCPR::BaseMCPR$get_component_name()MCPR::BaseMCPR$initialize_base()MCPR::BaseMCPR$is_initialized()MCPR::BaseMCPR$register_cleanup()MCPR::BaseMCPR$socket_url()MCPR::BaseMCPR$state_clear()MCPR::BaseMCPR$state_get()MCPR::BaseMCPR$state_has()MCPR::BaseMCPR$state_keys_owned()MCPR::BaseMCPR$state_set()
Method start()
Start the MCP session and bind to a socket
Method stop()
Stop session and cleanup resources
