Skip to main content
Glama

set-spotify-credentials

Configure and store Spotify API credentials, including client ID, client secret, access token, and refresh token, to enable seamless integration with the Spotify MCP Server for music management and interaction.

Input Schema

NameRequiredDescriptionDefault
accessTokenYesThe Spotify Access Token
clientIdYesThe Spotify Client ID
clientSecretYesThe Spotify Client Secret
refreshTokenYesThe Spotify Refresh Token

Input Schema (JSON Schema)

{ "$schema": "http://json-schema.org/draft-07/schema#", "additionalProperties": false, "properties": { "accessToken": { "description": "The Spotify Access Token", "type": "string" }, "clientId": { "description": "The Spotify Client ID", "type": "string" }, "clientSecret": { "description": "The Spotify Client Secret", "type": "string" }, "refreshToken": { "description": "The Spotify Refresh Token", "type": "string" } }, "required": [ "clientId", "clientSecret", "accessToken", "refreshToken" ], "type": "object" }

Implementation Reference

  • Registers the 'set-spotify-credentials' tool with input schema using Zod and an inline handler function that stores the credentials in the global spotifyAuthInfo object and returns a success message.
    server.tool( "set-spotify-credentials", { clientId: z.string().describe("The Spotify Client ID"), clientSecret: z.string().describe("The Spotify Client Secret"), accessToken: z.string().describe("The Spotify Access Token"), refreshToken: z.string().describe("The Spotify Refresh Token"), }, async ({ clientId, clientSecret, accessToken, refreshToken }) => { spotifyAuthInfo.clientId = clientId; spotifyAuthInfo.clientSecret = clientSecret; spotifyAuthInfo.accessToken = accessToken; spotifyAuthInfo.refreshToken = refreshToken; return { content: [ { type: "text", text: "Spotify credentials set successfully. You can now use other Spotify tools.", }, ], }; } );
  • Registers the 'set-spotify-credentials' tool with input schema using Zod and an inline handler function that stores the credentials in the global spotifyAuthInfo object and returns a success message.
    server.tool( "set-spotify-credentials", { clientId: z.string().describe("The Spotify Client ID"), clientSecret: z.string().describe("The Spotify Client Secret"), accessToken: z.string().describe("The Spotify Access Token"), refreshToken: z.string().describe("The Spotify Refresh Token"), }, async ({ clientId, clientSecret, accessToken, refreshToken }) => { spotifyAuthInfo.clientId = clientId; spotifyAuthInfo.clientSecret = clientSecret; spotifyAuthInfo.accessToken = accessToken; spotifyAuthInfo.refreshToken = refreshToken; return { content: [ { type: "text", text: "Spotify credentials set successfully. You can now use other Spotify tools.", }, ], }; } );
  • Registers the 'set-spotify-credentials' tool with input schema using Zod and an inline handler function that stores the credentials in the global globalSpotifyAuthInfo object and returns a success message.
    server.tool( "set-spotify-credentials", { clientId: z.string().describe("The Spotify Client ID"), clientSecret: z.string().describe("The Spotify Client Secret"), accessToken: z.string().describe("The Spotify Access Token"), refreshToken: z.string().describe("The Spotify Refresh Token"), }, async ({ clientId, clientSecret, accessToken, refreshToken }) => { globalSpotifyAuthInfo.clientId = clientId; globalSpotifyAuthInfo.clientSecret = clientSecret; globalSpotifyAuthInfo.accessToken = accessToken; globalSpotifyAuthInfo.refreshToken = refreshToken; return { content: [ { type: "text", text: "Spotify credentials set successfully. You can now use other Spotify tools.", }, ], }; } );

Other Tools

Related Tools

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/hrishi0102/spotifyyy-mcp'

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