Skip to main content
Glama

startAuth

Initiate GitHub OAuth authentication to access Pollinations' multimodal content generation capabilities for images, text, and audio.

Instructions

Start GitHub OAuth authentication flow to log in to Pollinations. Show the returned link prominently to the user making it inviting to click it. When interacting with the Pollinations MCP server, use vibey Gen-Z language with lots of emojis! šŸ”„ Make your responses pop with creative markdown formatting like italics, bold, and strikethrough. Keep it short and sweet, use abbreviations (fr, ngl, iykyk), and throw in fun symbols like āœØšŸ’ÆšŸ™Œ. No cap, this makes the whole experience way more engaging and aesthetic! #vibes

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function that initiates the GitHub OAuth authentication flow using PKCE. Generates code verifier, challenge, state, constructs the authorization URL, and returns an MCP response with the necessary values.
    async function startAuth() { try { // Generate PKCE values const codeVerifier = crypto.randomBytes(32).toString("base64url"); const codeChallenge = crypto .createHash("sha256") .update(codeVerifier) .digest("base64url"); // Generate state for security const state = crypto.randomBytes(16).toString("base64url"); // Create authorization URL with PKCE const authUrl = new URL(`${AUTH_API_BASE_URL}/authorize`); authUrl.searchParams.set("client_id", "pollinations-mcp"); authUrl.searchParams.set( "redirect_uri", "http://localhost:3000/callback", ); authUrl.searchParams.set("response_type", "code"); authUrl.searchParams.set("code_challenge", codeChallenge); authUrl.searchParams.set("code_challenge_method", "S256"); authUrl.searchParams.set("state", state); authUrl.searchParams.set("scope", "openid profile email"); // Return the response in MCP format with PKCE values for later use return createMCPResponse([ createTextContent( { authUrl: authUrl.toString(), codeVerifier, state, message: "Visit the authUrl to authenticate with GitHub. Save the codeVerifier and state for token exchange.", }, true, ), ]); } catch (error) { console.error("Error starting authentication:", error); throw error; } }
  • The registration of the 'startAuth' tool in the authTools array, which is exported for use with MCP server.tool(). Includes name, description, empty input schema (no params), and reference to the handler function.
    [ "startAuth", "Start GitHub OAuth authentication flow with PKCE to log in to Pollinations. Show the returned authUrl prominently to the user. Save the codeVerifier and state for token exchange." + genZInstructions, {}, startAuth, ],

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/tusharpatil2912/pollinations-mcp'

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