""" Model Context Protocol (MCP) for GLUE_Agent GLUE_Agent provides comprehensive multi-omics data integration tools for single-cell RNA-seq and ATAC-seq analysis. This framework enables preprocessing, model training, and visualization of integrated multi-modal datasets. This MCP Server contains tools extracted from the following tutorial files: 1. preprocessing - glue_preprocess_scrna: Preprocess scRNA-seq data with HVG selection, normalization, and PCA - glue_preprocess_scatac: Preprocess scATAC-seq data with LSI dimension reduction - glue_construct_regulatory_graph: Construct prior regulatory graph linking RNA and ATAC features 2. training - glue_configure_datasets: Configure RNA-seq and ATAC-seq datasets for GLUE model training - glue_train_model: Train GLUE model for multi-omics integration - glue_check_integration_consistency: Evaluate integration quality with consistency scores - glue_generate_embeddings: Generate cell and feature embeddings from trained GLUE model """ import os from fastmcp import FastMCP # Import statements (alphabetical order) from tools.preprocessing import preprocessing_mcp from tools.training import training_mcp # Server definition and mounting mcp = FastMCP(name="GLUE_Agent") mcp.mount(preprocessing_mcp) mcp.mount(training_mcp) # ASGI app for uvicorn (used when deployed as a remote HTTP server) # stateless_http=True avoids the StreamableHTTPSessionManager task group # initialization issue that causes 500 errors on HuggingFace Spaces. app = mcp.http_app(path="/mcp", stateless_http=True) if __name__ == "__main__": mcp.run( transport="http", host="0.0.0.0", port=int(os.getenv("PORT", 7860)), path="/mcp", )