use clap::Parser;
#[derive(Parser, Debug)]
#[command(
name = "sery-mcp",
version,
about = "Local-files MCP server. Pure Rust. Read-only by design.",
long_about = None,
)]
struct Cli {
#[arg(long, value_name = "DIR")]
root: Option<std::path::PathBuf>,
}
#[allow(clippy::unnecessary_wraps)]
fn main() -> anyhow::Result<()> {
tracing_subscriber::fmt()
.with_writer(std::io::stderr)
.with_env_filter(
tracing_subscriber::EnvFilter::try_from_default_env()
.unwrap_or_else(|_| tracing_subscriber::EnvFilter::new("info")),
)
.init();
let cli = Cli::parse();
let root = cli
.root
.unwrap_or_else(|| std::env::current_dir().expect("CWD must be readable"));
tracing::info!(
version = sery_mcp::VERSION,
root = %root.display(),
"sery-mcp bootstrap (pre-0.1) — MCP handshake + tools land in v0.1.0"
);
eprintln!(
"sery-mcp v{} — pre-0.1 bootstrap. See https://github.com/seryai/sery-mcp",
sery_mcp::VERSION
);
Ok(())
}