Skip to main content
Glama

Gmail MCP Server

by meyannis
simple_tunnel.py•2.09 kB
#!/usr/bin/env python3 """ Simple tunnel using a different approach """ import subprocess import time import sys def main(): print("šŸš€ Creating public tunnel for Gmail MCP Server...") print("šŸ“ Local server: http://localhost:8000/sse") # Try using localtunnel with explicit output try: print("\nšŸ”— Starting localtunnel...") process = subprocess.Popen( ['npx', 'localtunnel', '--port', '8000', '--subdomain', 'gmail-mcp'], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, bufsize=1, universal_newlines=True ) print("ā³ Waiting for tunnel to establish...") # Read output line by line for line in iter(process.stdout.readline, ''): print(f"šŸ“ {line.strip()}") if 'https://' in line and 'localtunnel' in line: url = line.strip().split()[-1] if line.strip().split() else "" if url.startswith('https://'): print(f"\nāœ… SUCCESS! Your Gmail MCP Server is now public!") print(f"🌐 Public URL: {url}/sse") print(f"šŸ”— Full endpoint: {url}/sse") print("\nšŸ“‹ Usage:") print(f" - For MCP clients: {url}/sse") print(f" - For testing: Visit {url}/sse in browser") print("\nā¹ļø Press Ctrl+C to stop the tunnel") try: while True: time.sleep(1) except KeyboardInterrupt: print("\nšŸ›‘ Stopping tunnel...") process.terminate() return except KeyboardInterrupt: print("\nšŸ›‘ Stopped by user") except Exception as e: print(f"āŒ Error: {e}") print("\nšŸ’” Alternative: You can manually run:") print(" npx localtunnel --port 8000") 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/meyannis/mcpgmail'

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