y-server

luohy15/y-server

3.1

If you are the rightful owner of y-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.

A Cloudflare Worker-based MCP Server with streamable HTTP transport support, designed for AI assistants to interact with external services and APIs.

Tools
11
Resources
0
Prompts
0

y-server 🚀

A Cloudflare Worker-based MCP (Model Context Protocol) Server with streamable HTTP transport support. This server provides various tools and integrations for AI assistants to interact with external services and APIs.

This server is designed to work with y-gui, a web-based graphical interface for AI chat interactions with powerful MCP integrations.

🧰 Tools

y-server extends AI capabilities through the Model Context Protocol by providing a suite of tools that allow AI assistants to interact with various external services and APIs:

CategoryToolsDescription
📅 CalendarGoogle CalendarCreate, read, update, and delete calendar events
📝 EditorS3S3-based file editing (replace)
📧 EmailGmailQuery, read, and reply to emails; Create and manage email drafts; Handle email attachments
🌐 Fetch & ScrapeCloudflare, FirecrawlCloudflare-powered web fetching; Firecrawl web scraping capabilities
📂 FileE2B, S3File operations (list, read, write)
💰 FinanceAlphaVantageFinancial data retrieval
🖼️ ImageImage RouterImage generation and routing
🧪 SandboxE2BCode execution and command sandboxing
🔎 SearchTavily, Exa, BraveTavily search and information extraction; Exa search and content retrieval; Brave web search

📦 Installation

📋 Prerequisites

  • Node.js (latest LTS version recommended)
  • Cloudflare account with Workers and R2 access

🔧 Setup

  1. Clone the repository
git clone https://github.com/yourusername/y-server.git
cd y-server
  1. Install dependencies
npm install
  1. Configure your environment variables in the Cloudflare dashboard or using .dev.vars for local development

⚙️ Configuration

☁️ Cloudflare Worker Configuration

The project uses wrangler.toml for Cloudflare Worker configuration:

name = "y-server"
main = "src/index.ts"
compatibility_flags = [ "nodejs_compat" ]
compatibility_date = "2024-09-23"

[[r2_buckets]]
binding = "CDN_BUCKET"
bucket_name = "cdn-yovy-app"

[dev]
port = 8788
ip = "localhost"
local_protocol = "http"

🔐 Required Environment Variables

  • CLOUDFLARE_ACCOUNT_ID: Your Cloudflare account ID
  • CLOUDFLARE_BROWSER_RENDER_API_TOKEN: API token for Cloudflare Browser Rendering
  • Other service-specific credentials (Google API, Brave API, etc.)

💻 Development

🏠 Local Development

Start the development server:

npm run dev

This will start the worker on http://localhost:8788

🏗️ Build

Build the project:

npm run build

🚀 Deploy

Deploy to Cloudflare Workers:

npm run deploy

🔌 MCP Integration

This server implements the Model Context Protocol, allowing AI assistants to use the provided tools through a standardized interface. It uses a streamable HTTP transport that enables efficient communication with AI models.

🧩 Integration with y-gui

y-server is designed to work as an MCP server for y-gui, a web-based graphical interface for AI chat interactions. The y-gui client provides:

  • 💬 Interactive chat interface with AI models
  • 🤖 Support for multiple bot configurations
  • 🔗 Comprehensive MCP integration system
  • 🔒 Secure authentication with Auth0 and Google login
  • 🌓 Dark/light theme support
  • 📝 All chat data stored in Cloudflare R2

To connect y-server with y-gui:

  1. Deploy your y-server instance
  2. In y-gui, configure a new MCP server with your y-server URL
  3. Enable the desired tools in your bot configuration

For more information, visit the y-gui repository.

There's also a CLI version available: y-cli.

📁 Project Structure

src/
├── index.ts                 # Main entry point
├── tools/                   # All MCP tools
│   ├── calendar/            # Calendar tools (Google)
│   ├── editor/              # Editor tools (S3)
│   ├── email/               # Email tools (Gmail)
│   ├── fetch/               # Web fetch tools
│   ├── image/               # Image tools
│   └── search/              # Search tools (Brave, Tavily, Exa)
├── transport/               # HTTP transport implementation
└── types/                   # TypeScript type definitions

🤝 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.