Skip to main content
Glama
0x8687

Meme MCP Server

by 0x8687

connect-gmail

Integrate Gmail with the Meme MCP Server to enable direct email interaction for generating meme images via the ImgFlip API.

Instructions

Connect to Gmail

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'connect-gmail' tool. It uses the VercelAIToolSet from Composio to initiate a Gmail connection for the default user, generating an OAuth redirect URL for the user to authorize the connection.
    server.tool("connect-gmail", "Connect to Gmail", {}, async (args, extra) => { try { console.log('args ', args); console.log('extra ', extra); const userAddress = "default-user"; const entity = toolset.client.getEntity(userAddress); const connection = await entity.initiateConnection({ appName: "gmail" }); return { content: [{ type: "text", text: `🔗 Gmail connection initiated!\n\nPlease connect your Gmail account by clicking on the link below:\n\n${connection.redirectUrl}\n\nAfter connecting, you can use Gmail actions.` }], }; } catch (error) { console.error('Error initiating Gmail connection:', error); return { content: [{ type: "text", text: `Error initiating Gmail connection: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • src/tools.ts:12-36 (registration)
    Registration of the 'connect-gmail' tool using server.tool(), with empty schema {} and inline handler function.
    server.tool("connect-gmail", "Connect to Gmail", {}, async (args, extra) => { try { console.log('args ', args); console.log('extra ', extra); const userAddress = "default-user"; const entity = toolset.client.getEntity(userAddress); const connection = await entity.initiateConnection({ appName: "gmail" }); return { content: [{ type: "text", text: `🔗 Gmail connection initiated!\n\nPlease connect your Gmail account by clicking on the link below:\n\n${connection.redirectUrl}\n\nAfter connecting, you can use Gmail actions.` }], }; } catch (error) { console.error('Error initiating Gmail connection:', error); return { content: [{ type: "text", text: `Error initiating Gmail connection: ${error instanceof Error ? error.message : String(error)}` }], }; } });
  • Initialization of VercelAIToolSet used by the connect-gmail handler for Gmail integration via Composio.
    const toolset = new VercelAIToolSet({ apiKey: process.env.COMPOSIO_API_KEY || '4xyic69yfd4610srw8cebg', });

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/0x8687/mcp-gmail-v1'

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