Skip to main content
Glama
yuhuacheng

TIDAL MCP: My Custom Picks

tidal_login

Authenticate with TIDAL by opening a browser window for secure login, enabling access to personalized music recommendations and playlist creation.

Instructions

Authenticate with TIDAL through browser login flow.
This will open a browser window for the user to log in to their TIDAL account.

Returns:
    A dictionary containing authentication status and user information if successful

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The tidal_login tool handler function, registered via @mcp.tool() decorator. It handles authentication by calling the backend Flask API at /api/auth/login and returns success or error status with user info.
    @mcp.tool()
    def tidal_login() -> dict:
        """
        Authenticate with TIDAL through browser login flow.
        This will open a browser window for the user to log in to their TIDAL account.
        
        Returns:
            A dictionary containing authentication status and user information if successful
        """
        try:
            # Call your Flask endpoint for TIDAL authentication
            response = requests.get(f"{FLASK_APP_URL}/api/auth/login")
            
            # Check if the request was successful
            if response.status_code == 200:
                return response.json()
            else:
                error_data = response.json()
                return {
                    "status": "error",
                    "message": f"Authentication failed: {error_data.get('message', 'Unknown error')}"
                }
        except Exception as e:
            return {
                "status": "error",
                "message": f"Failed to connect to TIDAL authentication service: {str(e)}"
            }
  • The @mcp.tool() decorator registers the tidal_login function as an MCP tool.
    @mcp.tool()
  • Function signature and docstring defining the tool's schema: no input parameters, returns a dict with authentication status and optional user information.
    def tidal_login() -> dict:
        """
        Authenticate with TIDAL through browser login flow.
        This will open a browser window for the user to log in to their TIDAL account.
        
        Returns:
            A dictionary containing authentication status and user information if successful
        """

Latest Blog Posts

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/yuhuacheng/tidal-mcp'

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