bevy_brp_mcp 0.22.2

MCP server for Bevy Remote Protocol (BRP) integration
//! # Bevy BRP MCP Server
//!
//! A Model Context Protocol server that provides tools for interacting with
//! Bevy applications through the Bevy Remote Protocol (BRP).
//!
//! This server enables remote debugging, inspection, and manipulation of
//! Bevy applications at runtime through a standardized MCP interface.

use std::error::Error;

use log_tools::TracingLevel;
use mcp_service::McpService;
use rmcp::ServiceExt;
use rmcp::transport;

mod app_tools;
mod brp_tools;
mod constants;
mod error;
mod log_tools;
mod mcp_service;
mod support;
mod tool;

#[tokio::main]
async fn main() -> Result<(), Box<dyn Error>> {
    // Initialize file-based tracing with dynamic level management
    // Uses lazy file creation - file only created on first log write
    TracingLevel::init_file_tracing();

    let mcp_service = McpService::new();

    let server = mcp_service.serve(transport::stdio()).await?;
    server.waiting().await?;

    Ok(())
}