We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/ingeno/mcp-openapi-lambda'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
auth.py•1.3 KiB
"""Zoho-specific OAuth authentication provider.
This module contains the Zoho authentication provider which is specific
to Zoho CRM and not part of the generic MCP server package.
"""
import os
from typing import Dict
from awslabs.openapi_mcp_server.auth.auth_provider import AuthProvider
from awslabs.openapi_mcp_server.auth.auth_factory import register_auth_provider
class ZohoAuthProvider(AuthProvider):
"""Zoho OAuth authentication provider.
Zoho uses a custom OAuth token format: "Zoho-oauthtoken {token}"
This is different from standard Bearer authentication.
"""
def __init__(self):
"""Initialize Zoho auth provider."""
self.token = os.getenv("AUTH_TOKEN", "")
async def authenticate(self, request_params: Dict) -> Dict:
"""Add Zoho OAuth headers to the request.
Args:
request_params: Request parameters
Returns:
Updated request parameters with Zoho auth header
"""
if self.token:
if "headers" not in request_params:
request_params["headers"] = {}
request_params["headers"]["Authorization"] = f"Zoho-oauthtoken {self.token}"
return request_params
# Auto-register the Zoho auth provider when this module is imported
register_auth_provider("zoho", ZohoAuthProvider)