setup.py•1.16 kB
#!/usr/bin/env python3
"""
Setup script for Gmail MCP Server
"""
import subprocess
import sys
import os
def install_requirements():
"""Install required packages"""
print("Installing required packages...")
try:
subprocess.check_call([sys.executable, "-m", "pip", "install", "-r", "requirements.txt"])
print("✅ Requirements installed successfully!")
except subprocess.CalledProcessError as e:
print(f"❌ Failed to install requirements: {e}")
return False
return True
def main():
"""Main setup function"""
print("🚀 Setting up Gmail MCP Server...")
# Check if credentials file exists
if not os.path.exists("gcp-oauth.keys.json"):
print("❌ gcp-oauth.keys.json not found!")
print("Please make sure your GCP OAuth credentials are in this file.")
return
# Install requirements
if not install_requirements():
return
print("\n🎉 Setup complete!")
print("📧 Gmail MCP Server ready for integration")
print("Run: python gmail_mcp_server.py")
print("Test: python direct_test.py")
if __name__ == "__main__":
main()