feat: Make mcp support an optional feature, disabled by default

Co-authored-by: aider (openai/andrew/openrouter/sonoma-sky-alpha) <aider@aider.chat>
This commit is contained in:
Andrew Phillips
2025-09-10 09:49:51 -03:00
parent 530615a6a1
commit 8f3f6c05db
3 changed files with 142 additions and 1 deletions

View File

@@ -1,5 +1,6 @@
pub mod item;
pub mod status;
#[cfg(feature = "mcp")]
pub mod mcp;
use axum::{
@@ -67,6 +68,7 @@ pub fn add_routes(router: Router<AppState>) -> Router<AppState> {
.route("/api/item/{item_id}/content", get(item::handle_get_item_content))
// MCP endpoints
#[cfg(feature = "mcp")]
.route("/mcp/sse", get(mcp::handle_mcp_sse))
}