Skip to main content
Glama
test_new_endpoint.py1.49 kB
#!/usr/bin/env python3 import requests import json from datetime import datetime # Test the new /auth/token endpoint url = "https://mcp-server-production-110a.up.railway.app/auth/token" test_data = { "username": "testuser", "password": "testuser123", "expires_in_hours": 2 } print(f"🚀 Testing new /auth/token endpoint...") print(f"URL: {url}") print(f"Test Data: {json.dumps(test_data, indent=2)}") print("-" * 50) try: response = requests.post( url, json=test_data, headers={"Content-Type": "application/json"}, timeout=30 ) print(f"Status Code: {response.status_code}") print(f"Headers: {dict(response.headers)}") print("-" * 50) if response.status_code == 200: result = response.json() print("✅ SUCCESS! Token Generated:") print(f" Access Token: {result.get('access_token', 'N/A')[:50]}...") print(f" Token Type: {result.get('token_type', 'N/A')}") print(f" Expires In: {result.get('expires_in', 'N/A')} seconds") print(f" Expires At: {result.get('expires_at', 'N/A')}") print("-" * 50) print("🎉 CIRCULAR DEPENDENCY ISSUE RESOLVED!") else: print("❌ FAILED!") print(f"Response: {response.text}") except requests.exceptions.RequestException as e: print(f"❌ Connection Error: {e}") except Exception as e: print(f"❌ Error: {e}") print(f"\nTest completed at: {datetime.now()}")

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/Pritrj/mcp-server'

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