Skip to main content
Glama
test_auth_endpoint.py1.53 kB
#!/usr/bin/env python3 import requests import json def test_auth_endpoint(): """Test the /auth/generate-token endpoint""" url = "https://mcp-server-production-110a.up.railway.app/auth/generate-token" try: print("Testing /auth/generate-token endpoint...") print(f"URL: {url}") # Send POST request without authentication response = requests.post(url, json={}, timeout=10) print(f"Status Code: {response.status_code}") print(f"Response Headers: {dict(response.headers)}") print(f"Response Body: {response.text}") if response.status_code == 200: print("✅ SUCCESS! Endpoint is working - no authentication required!") try: data = response.json() print(f"Token: {data.get('access_token', 'N/A')}") print(f"Token Type: {data.get('token_type', 'N/A')}") except: print("Response is not JSON") elif response.status_code == 422: print("❌ ERROR: Still getting 422 - authentication may still be required") else: print(f"⚠️ Unexpected status: {response.status_code}") except requests.exceptions.Timeout: print("❌ Timeout - Server may be down") except requests.exceptions.ConnectionError: print("❌ Connection Error - Server not reachable") except Exception as e: print(f"❌ Error: {e}") if __name__ == "__main__": test_auth_endpoint()

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