mcp_preview/lib.rs
1//! MCP Preview Server
2//!
3//! A browser-based development environment for testing MCP Apps widgets.
4//! Defaults to standard MCP Apps mode with full AppBridge support.
5//! Use `--mode chatgpt` to activate ChatGPT strict protocol emulation.
6//!
7//! # Usage
8//!
9//! ```bash
10//! cargo pmcp preview --url http://localhost:3000 --open
11//! ```
12//!
13//! # Features
14//!
15//! - Widget rendering in isolated iframe
16//! - Full `window.mcpBridge` / `window.openai` simulation
17//! - Environment controls (theme, locale, display mode)
18//! - DevTools panel (state, console, network, events)
19//! - Live proxy to MCP server via HTTP
20
21mod assets;
22mod handlers;
23mod proxy;
24mod server;
25pub mod wasm_builder;
26
27pub use server::{OAuthPreviewConfig, PreviewConfig, PreviewMode, PreviewServer};