mock_server functionality