y-gui

MCP.Pizza Chef: luohy15

y-gui is a lightweight web chat client designed for AI interactions, supporting multiple AI models and leveraging the Model Context Protocol (MCP) to integrate with services like Gmail, Google Calendar, and image generation APIs. It provides a powerful, interactive chat interface that extends AI capabilities by connecting to real-world data and tools, enabling seamless multi-service workflows within a single chat environment.

Use This MCP client To

Manage Gmail emails through chat interface Create and update Google Calendar events via natural language Generate images within chat conversations Configure multiple AI bot setups with custom APIs Integrate external services into AI chat workflows Use a web GUI for interactive AI model conversations

README

y-gui πŸš€

A web-based graphical interface for AI chat interactions with support for multiple AI models and powerful MCP (Model Context Protocol) integrations. Beyond standard chat capabilities, y-gui leverages MCP to connect with Gmail, Google Calendar, image generation services, and more.

Check out y-cli for a CLI version.

Demo

demo

MCP in Action

See how y-gui uses MCP integrations to extend AI capabilities:

✨ Features

  • πŸ’¬ Interactive chat interface with AI models
  • πŸ€– Support for multiple bot configurations (any base_url/api_key/model combination)
  • πŸ”— Comprehensive MCP (Model Context Protocol) integration system with:
    • πŸ“§ Gmail access and management
    • πŸ“… Google Calendar integration for event scheduling
    • πŸ–ΌοΈ Image generation capabilities
    • 🧩 Expandable framework for additional MCP servers and tools
  • πŸ”’ Secure authentication with Auth0 and Google login
  • πŸŒ“ Dark/light theme support
  • πŸ“ All chat data stored in Cloudflare R2 for easy access and sync
  • πŸ”„ Real-time updates with SWR
  • πŸ“± Responsive design for all devices

Architecture

y-gui consists of two main components:

  1. Frontend: React application with TypeScript, Tailwind CSS, and SWR for data fetching
  2. Backend: Cloudflare Workers with R2 storage
flowchart TD
    Client[React Client] --> Worker[Cloudflare Worker]
    Worker --> R2[Cloudflare R2]
    Worker --> AI[AI Providers]

    subgraph "Frontend"
        Client --> Components[React Components]
        Components --> State[SWR State]
        State --> API[API Layer]
    end

    subgraph "Backend"
        Worker --> Auth[Auth Middleware]
        Worker --> Storage[Storage Layer]
        Worker --> Provider[Provider Layer]
    end
Loading

⚑ Quick Start

Prerequisites

  1. Node.js and npm
  2. Cloudflare account
  3. Auth0 account
  4. API keys for AI providers

Installation

  1. Clone the repository:

    git clone https://github.com/luohy15/y-gui.git
    cd y-gui
  2. Install dependencies:

    npm install
  3. Configure environment variables:

    • Configure Cloudflare Worker settings in backend/wrangler.toml
    • Change the auth0 settings in frontend/src/index.tsx and backend/src/utils/auth.ts
  4. Build asset:

    npm run build
  5. Deploy cloudflare worker

    npm run deploy

πŸ› οΈ Development

Project Structure

y-gui/
β”œβ”€β”€ frontend/               # React frontend application
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/     # React components
β”‚   β”‚   β”œβ”€β”€ contexts/       # React contexts
β”‚   β”‚   β”œβ”€β”€ utils/          # Utility functions
β”‚   β”‚   └── index.tsx       # Entry point
β”œβ”€β”€ backend/                # Cloudflare Worker backend
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ api/            # API endpoints
β”‚   β”‚   β”œβ”€β”€ middleware/     # Middleware
β”‚   β”‚   β”œβ”€β”€ repository/     # Data access
β”‚   β”‚   └── index.ts        # Worker entry
β”œβ”€β”€ shared/                 # Shared code between frontend and backend
β”‚   └── types/              # TypeScript type definitions
└── memory-bank/            # Project documentation

Available Scripts

  • npm run dev: Start both frontend and backend development servers
  • npm run dev:frontend: Start only the frontend development server
  • npm run dev:backend: Start only the backend development server
  • npm run build: Build both frontend and backend
  • npm run deploy: Deploy the backend to Cloudflare Workers
  • npm run test: Run tests

πŸ”’ Authentication

y-gui uses Auth0 for authentication with the following features:

  • Universal Login
  • Google social login
  • Token-based session management
  • Secure API access

πŸ€– Bot Configuration

y-gui supports multiple bot configurations with the following properties:

  • Name
  • Model
  • Base URL
  • API Key
  • Print Speed
  • MCP Servers
  • API Type
  • Custom API Path
  • Max Tokens
  • Reasoning Effort

πŸ”— MCP Server Configuration

MCP (Model Context Protocol) servers can be configured with simple:

  • Name: Unique identifier for the MCP server
  • URL: For remotely hosted MCP services
  • Token: Authentication token for secure server access

Current MCP integrations include Gmail, Google Calendar, image generation, and support for custom servers to connect with virtually any API or service.

🌐 API Endpoints

The backend provides RESTful API endpoints for:

  • Chat operations
  • Bot configuration management
  • MCP server configuration management
  • Authentication

πŸ”„ Data Storage

  • Chat data is stored in Cloudflare R2
  • Bot and MCP server configurations are stored in Cloudflare R2
  • MCP integration data is securely managed through authorized API connections

🧩 Technologies Used

  • Frontend: React, TypeScript, Tailwind CSS, SWR, Auth0
  • Backend: Cloudflare Workers, R2
  • Integrations: MCP servers, OAuth2, Gmail API, Google Calendar API, Image Generation APIs
  • Build Tools: Vite, Wrangler, TypeScript

πŸ“š Documentation

For more detailed documentation, see the memory-bank directory.

Visit the deepwiki page for comprehensive project documentation and guides.

🀝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

y-gui FAQ

How do I connect y-gui to my Gmail account?
y-gui uses MCP integrations to securely connect to Gmail; you need to authorize access through the interface to manage your emails.
Can I use y-gui with different AI models?
Yes, y-gui supports multiple AI models and configurations by allowing custom base URLs, API keys, and model combinations.
Does y-gui support image generation?
Yes, y-gui integrates image generation services directly into the chat, enabling you to create images from text prompts.
Is y-gui limited to web use only?
y-gui is primarily a web-based client, but there is a CLI version called y-cli for command-line interactions.
How does y-gui leverage MCP for integrations?
y-gui uses MCP to connect with various external services like Gmail and Google Calendar, enabling real-time data access and manipulation within chat.
Can I customize the AI bot configurations in y-gui?
Yes, y-gui allows you to configure multiple bot setups with different API keys and models to suit your needs.
Is user data secure when using y-gui?
y-gui follows MCP principles for secure, scoped, and observable interactions, ensuring your data privacy and security.
What platforms does y-gui support?
y-gui is a web application accessible from modern browsers, with a CLI alternative for terminal users.