Skip to main content
Glama

Browser MCP Server

by sac916
test_startup.pyโ€ข2.17 kB
#!/usr/bin/env python3 """ Test the startup script functionality """ import subprocess import sys import json import time def test_startup_script(): """Test the MCP server startup script""" print("๐Ÿงช Testing MCP server startup script...") # Test with the startup script input_sequence = [ { "jsonrpc": "2.0", "id": 1, "method": "initialize", "params": { "protocolVersion": "2024-11-05", "capabilities": {}, "clientInfo": {"name": "test-client", "version": "1.0.0"} } }, { "jsonrpc": "2.0", "method": "notifications/initialized" }, { "jsonrpc": "2.0", "id": 2, "method": "tools/list" } ] input_text = "\n".join([json.dumps(msg) for msg in input_sequence]) + "\n" try: result = subprocess.run([ "python3", "/home/gmitch/claude-browser-mcp/start_mcp_server.py" ], input=input_text, capture_output=True, text=True, timeout=15) print(f"๐Ÿ“ค Exit code: {result.returncode}") print(f"๐Ÿ“ค STDOUT:\n{result.stdout}") print(f"๐Ÿ“ค STDERR:\n{result.stderr}") # Parse responses responses = [] for line in result.stdout.strip().split('\n'): if line.strip(): try: responses.append(json.loads(line)) except json.JSONDecodeError: print(f"โŒ Invalid JSON: {line}") if len(responses) >= 2: print(f"โœ… Startup script works! Got {len(responses)} responses") return True else: print(f"โŒ Expected responses, got {len(responses)}") return False except subprocess.TimeoutExpired: print("โŒ Startup script timed out") return False except Exception as e: print(f"โŒ Error testing startup script: {e}") return False if __name__ == "__main__": success = test_startup_script() sys.exit(0 if success else 1)

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/sac916/claude-browser-mcp'

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