Skip to main content

mcp_gmailcal/
cli.rs

1use clap::{Parser, Subcommand};
2
3#[derive(Parser, Debug, PartialEq)]
4#[clap(name = "Gmail MCP Server")]
5#[clap(author = "Gmail MCP Contributors")]
6#[clap(version = "0.2.0")]
7#[clap(about = "MCP server for Gmail access", long_about = None)]
8pub struct Cli {
9    #[clap(subcommand)]
10    pub command: Option<Commands>,
11
12    /// Force use of stderr-only logging (no file logging)
13    #[clap(long, short, action)]
14    pub memory_only: bool,
15}
16
17#[derive(Subcommand, Debug, PartialEq)]
18pub enum Commands {
19    /// Run the MCP server (default if no command specified)
20    #[clap(name = "server")]
21    Server,
22
23    /// Run the OAuth authentication flow to get new credentials
24    #[clap(name = "auth")]
25    Auth,
26
27    /// Test the current credentials
28    #[clap(name = "test")]
29    Test,
30}