Class: Mcpeasy::GmailCommands

Inherits:
Gmail::CLI show all
Defined in:
lib/mcpeasy/cli.rb

Instance Method Summary collapse

Methods inherited from Gmail::CLI

#add_label, #archive, #list, #mark_read, #mark_unread, #read, #remove_label, #reply, #search, #send, #test, #trash

Instance Method Details

#authObject



119
120
121
122
123
124
125
126
127
128
129
# File 'lib/mcpeasy/cli.rb', line 119

def auth
  require_relative "../utilities/gmail/service"
  tool = Gmail::Service.new(skip_auth: true)
  result = tool.authenticate
  if result[:success]
    puts "✅ Successfully authenticated with Gmail"
  else
    puts "❌ Authentication failed: #{result[:error]}"
    exit 1
  end
end

#mcpObject



113
114
115
116
# File 'lib/mcpeasy/cli.rb', line 113

def mcp
  require_relative "../utilities/gmail/mcp"
  Gmail::MCPServer.new.run
end