mushroomdb-server 0.1.2

HTTP/WebSocket server and MCP adapter for mushroomdb
Documentation
#![deny(clippy::await_holding_lock)]

mod http;
mod json;
mod mcp;
mod subscribe;
mod ws;

use core_api::{MutationEvent, SharedDb};

pub use mcp::run_mcp_stdio;

/// Router state: the database plus the watch broadcast fan-out.
#[derive(Clone)]
struct AppState {
    db: SharedDb,
    watch: tokio::sync::broadcast::Sender<MutationEvent>,
    token: Option<String>,
    /// Bind address advertised in `GET /health`.
    addr: std::net::SocketAddr,
}

pub use http::{router, router_with_auth, router_with_ui, serve, serve_with_ui};
#[cfg(feature = "embed-ui")]
pub use http::{router_with_embedded_ui, serve_with_embedded_ui};