windjammer_mcp/lib.rs
1//! # Windjammer MCP Server
2//!
3//! Model Context Protocol (MCP) server for AI-powered Windjammer development.
4//!
5//! This crate provides a complete MCP server implementation that enables AI assistants
6//! (Claude, ChatGPT, etc.) to understand, analyze, and generate Windjammer code.
7//!
8//! ## Features
9//!
10//! - **Code Understanding**: Parse, analyze, and explain Windjammer code
11//! - **Code Generation**: Generate idiomatic Windjammer from natural language
12//! - **Refactoring**: Extract functions, inline variables, rename symbols
13//! - **Error Handling**: Explain errors and suggest fixes
14//! - **Workspace Operations**: Search code, get context, list symbols
15//! - **Shared Infrastructure**: Uses same Salsa database as LSP for consistency
16//!
17//! ## Example
18//!
19//! ```rust,no_run
20//! use windjammer_mcp::McpServer;
21//!
22//! #[tokio::main]
23//! async fn main() {
24//! let server = McpServer::new().await.unwrap();
25//! server.run_stdio().await.unwrap();
26//! }
27//! ```
28
29pub mod agent_index;
30pub mod error;
31pub mod http_server;
32pub mod oauth;
33pub mod protocol;
34pub mod server;
35pub mod tools;
36
37pub use error::{McpError, McpResult};
38pub use server::McpServer;
39
40/// MCP protocol version (2025-06-18 spec)
41pub const MCP_VERSION: &str = "2025-06-18";
42
43/// Windjammer MCP server version
44pub const SERVER_VERSION: &str = env!("CARGO_PKG_VERSION");