Skip to main content
Glama

Resemble AI Voice Generation MCP Server

by obaid
sse_debug.py1.38 kB
""" Debug script to print SSE events from the server. This script connects to the SSE endpoint and prints all events received, to help diagnose issues with tool registration. """ import requests import sseclient import json import time # SSE endpoint URL SSE_URL = "http://localhost:8083/sse" def print_event(event): """Pretty-print an SSE event.""" print("\n------- EVENT -------") print(f"Event type: {event.event}") try: # Try to parse and pretty-print JSON data data = json.loads(event.data) print(f"Data: {json.dumps(data, indent=2)}") except: # If not valid JSON, print as-is print(f"Data: {event.data}") print("---------------------\n") def main(): """Connect to the SSE endpoint and print all events received.""" print(f"Connecting to SSE endpoint: {SSE_URL}") try: # Make a GET request to the SSE endpoint response = requests.get(SSE_URL, stream=True) client = sseclient.SSEClient(response) print("Connection established. Waiting for events...") # Process events as they arrive for event in client.events(): print_event(event) except KeyboardInterrupt: print("\nExiting...") except Exception as e: print(f"\nError: {str(e)}") if __name__ == "__main__": main()

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/obaid/resemble-mcp'

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