Skip to main content
Glama
test_windows.pyβ€’2.05 kB
#!/usr/bin/env python3 """Test script for LibreOffice MCP Extension on Windows""" import requests import time import sys def test_mcp_server(): """Test if MCP server is accessible""" server_url = "http://localhost:8765" print("πŸ§ͺ Testing LibreOffice MCP Extension...") print(f"πŸ“‘ Checking server at {server_url}") try: # Test health endpoint response = requests.get(f"{server_url}/health", timeout=5) if response.status_code == 200: print("βœ… MCP server is running and healthy!") # Get server info try: info_response = requests.get(server_url, timeout=5) if info_response.status_code == 200: print(f"\nπŸ“‹ Server Info:") print(info_response.text) except Exception as e: print(f"⚠️ Could not get server info: {e}") # List available tools try: tools_response = requests.get(f"{server_url}/tools", timeout=5) if tools_response.status_code == 200: print(f"\nπŸ”§ Available Tools:") print(tools_response.text) except Exception as e: print(f"⚠️ Could not list tools: {e}") return True else: print(f"❌ Server responded with status {response.status_code}") return False except requests.exceptions.ConnectionError: print("❌ Cannot connect to MCP server") print("\nπŸ“ Make sure:") print(" 1. LibreOffice is running") print(" 2. The extension is properly installed") print(" 3. Try opening LibreOffice Writer first") print("\nπŸ’‘ To start LibreOffice:") print(' "D:\\Program Files\\LibreOffice\\program\\swriter.exe"') return False except Exception as e: print(f"❌ Error: {e}") return False if __name__ == "__main__": success = test_mcp_server() sys.exit(0 if success else 1)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jwingnut/mcp-libre'

If you have feedback or need assistance with the MCP directory API, please join our Discord server