NexusMind
Generates diagram visualizations of the reasoning process, showing the 8-stage pipeline flow and relationship between different components
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
π§ NexusMind
ββββββββββββββββββββββββββββββββββββββββ
β β
β π§ NexusMind π§ β
β β
β Intelligent Scientific β
β Reasoning through β
β Graph-of-Thoughts β
β β
ββββββββββββββββββββββββββββββββββββββββIntelligent Scientific Reasoning through Graph-of-Thoughts
π Overview
NexusMind leverages graph structures to perform sophisticated scientific reasoning. It implements the Model Context Protocol (MCP) to integrate with AI applications like Claude Desktop, providing an Advanced Scientific Reasoning Graph-of-Thoughts (ASR-GoT) framework designed for complex research tasks.
Key highlights:
Process complex scientific queries using graph-based reasoning
Dynamic confidence scoring with multi-dimensional evaluations
Built with modern Python and FastAPI for high performance
Dockerized for easy deployment
Modular design for extensibility and customization
Integration with Claude Desktop via MCP protocol
Related MCP server: Adaptive Graph of Thoughts MCP Server
π Key Features
8-Stage Reasoning Pipeline
graph TD
A[π± Stage 1: Initialization] --> B[π§© Stage 2: Decomposition]
B --> C[π¬ Stage 3: Hypothesis/Planning]
C --> D[π Stage 4: Evidence Integration]
D --> E[βοΈ Stage 5: Pruning/Merging]
E --> F[π Stage 6: Subgraph Extraction]
F --> G[π Stage 7: Composition]
G --> H[π€ Stage 8: Reflection]
A1[Create root node<br/>Set initial confidence<br/>Define graph structure] --> A
B1[Break into dimensions<br/>Identify components<br/>Create dimensional nodes] --> B
C1[Generate hypotheses<br/>Create reasoning strategy<br/>Set falsification criteria] --> C
D1[Gather evidence<br/>Link to hypotheses<br/>Update confidence scores] --> D
E1[Remove low-value elements<br/>Consolidate similar nodes<br/>Optimize structure] --> E
F1[Identify relevant portions<br/>Focus on high-value paths<br/>Create targeted subgraphs] --> F
G1[Synthesize findings<br/>Create coherent insights<br/>Generate comprehensive answer] --> G
H1[Evaluate reasoning quality<br/>Identify improvements<br/>Final confidence assessment] --> H
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
style D fill:#fff3e0
style E fill:#ffebee
style F fill:#f1f8e9
style G fill:#e3f2fd
style H fill:#fce4ecThe core reasoning process follows a sophisticated 8-stage pipeline:
π± Initialization
Creates root node from query with multi-dimensional confidence vector
Establishes initial graph structure with proper metadata
Sets baseline confidence across empirical, theoretical, methodological, and consensus dimensions
π§© Decomposition
Breaks query into key dimensions: Scope, Objectives, Constraints, Data Needs, Use Cases
Identifies potential biases and knowledge gaps from the outset
Creates dimensional nodes with initial confidence assessments
π¬ Hypothesis/Planning
Generates 3-5 hypotheses per dimension with explicit falsification criteria
Creates detailed execution plans for each hypothesis
Tags with disciplinary provenance and impact estimates
π Evidence Integration
Iteratively selects hypotheses based on confidence-to-cost ratio and impact
Gathers and links evidence using typed edges (causal, temporal, correlative)
Updates confidence vectors using Bayesian methods with statistical power assessment
βοΈ Pruning/Merging
Removes nodes with low confidence and impact scores
Consolidates semantically similar nodes
Optimizes graph structure while preserving critical relationships
π Subgraph Extraction
Identifies high-value subgraphs based on multiple criteria
Focuses on nodes with high confidence and impact scores
Extracts patterns relevant to the original query
π Composition
Synthesizes findings into coherent narrative
Annotates claims with node IDs and edge types
Provides comprehensive answers with proper citations
π€ Reflection
Performs comprehensive quality audit
Evaluates coverage, bias detection, and methodological rigor
Provides final confidence assessment and improvement recommendations
Advanced Technical Capabilities
Core Features:
π§ Graph Knowledge Representation: Uses
networkxto model complex relationships with hyperedges and multi-layer networksπ Dynamic Confidence Vectors: Four-dimensional confidence assessment (empirical support, theoretical basis, methodological rigor, consensus alignment)
π Interdisciplinary Bridge Nodes: Automatically connects insights across different research domains
π Advanced Edge Types: Supports causal, temporal, correlative, and custom relationship types
π Statistical Rigor: Integrated power analysis and effect size estimation
π― Impact-Driven Prioritization: Focuses on high-impact research directions
π MCP Server: Seamless Claude Desktop integration with Model Context Protocol
β‘ High-Performance API: Modern FastAPI implementation with async support
π οΈ Technology Stack
π Project Structure
NexusMind/
βββ π config/ # Configuration files
β βββ settings.yaml # Application settings
β βββ claude_mcp_config.json # Claude MCP integration config
β βββ logging.yaml # Logging configuration
β
βββ π src/asr_got_reimagined/ # Main source code
β βββ π api/ # API layer
β β βββ π routes/ # API route definitions
β β β βββ mcp.py # MCP protocol endpoints
β β β βββ health.py # Health check endpoints
β β β βββ graph.py # Graph query endpoints
β β βββ schemas.py # API request/response schemas
β β βββ middleware.py # API middleware
β β
β βββ π domain/ # Core business logic
β β βββ π models/ # Domain models
β β β βββ common.py # Common types and enums
β β β βββ graph_elements.py # Node, Edge, Hyperedge models
β β β βββ graph_state.py # Graph state management
β β β βββ confidence.py # Confidence vector models
β β β βββ metadata.py # Metadata schemas
β β β
β β βββ π services/ # Business services
β β β βββ got_processor.py # Main GoT processing service
β β β βββ evidence_service.py # Evidence gathering and assessment
β β β βββ confidence_service.py # Confidence calculation service
β β β βββ graph_service.py # Graph manipulation service
β β β βββ mcp_service.py # MCP protocol service
β β β
β β βββ π stages/ # 8-Stage pipeline implementation
β β β βββ base_stage.py # Abstract base stage
β β β βββ stage_1_initialization.py # Stage 1: Graph initialization
β β β βββ stage_2_decomposition.py # Stage 2: Query decomposition
β β β βββ stage_3_hypothesis.py # Stage 3: Hypothesis generation
β β β βββ stage_4_evidence.py # Stage 4: Evidence integration
β β β βββ stage_5_pruning.py # Stage 5: Pruning and merging
β β β βββ stage_6_extraction.py # Stage 6: Subgraph extraction
β β β βββ stage_7_composition.py # Stage 7: Answer composition
β β β βββ stage_8_reflection.py # Stage 8: Quality reflection
β β β
β β βββ π utils/ # Utility functions
β β βββ graph_utils.py # Graph manipulation utilities
β β βββ confidence_utils.py # Confidence calculation utilities
β β βββ statistical_utils.py # Statistical analysis utilities
β β βββ bias_detection.py # Bias detection algorithms
β β βββ temporal_analysis.py # Temporal pattern analysis
β β
β βββ π infrastructure/ # Infrastructure layer
β β βββ π database/ # Database integration
β β βββ π cache/ # Caching layer
β β βββ π external/ # External service integrations
β β
β βββ main.py # Application entry point
β βββ app_setup.py # Application setup and configuration
β
βββ π tests/ # Test suite
β βββ π unit/ # Unit tests
β β βββ π stages/ # Stage-specific tests
β β βββ π services/ # Service tests
β β βββ π models/ # Model tests
β βββ π integration/ # Integration tests
β βββ π fixtures/ # Test fixtures and data
β
βββ π scripts/ # Utility scripts
β βββ setup_dev.py # Development setup
β βββ add_type_hints.py # Type hint utilities
β βββ deployment/ # Deployment scripts
β
βββ π docs/ # Documentation
β βββ api/ # API documentation
β βββ architecture/ # Architecture diagrams
β βββ examples/ # Usage examples
β
βββ π static/ # Static assets
β βββ nexusmind-logo.png # Application logo
β
βββ π Docker Files & Config
βββ Dockerfile # Docker container definition
βββ docker-compose.yml # Multi-container setup
βββ .dockerignore # Docker ignore patterns
β
βββ π Configuration Files
βββ pyproject.toml # Python project configuration
βββ poetry.lock # Dependency lock file
βββ mypy.ini # Type checking configuration
βββ pyrightconfig.json # Python type checker config
βββ .pre-commit-config.yaml # Pre-commit hooks
βββ .gitignore # Git ignore patterns
β
βββ π Documentation
βββ README.md # This file
βββ CHANGELOG.md # Version history
βββ LICENSE # Apache 2.0 license
βββ CONTRIBUTING.md # Contribution guidelinesπ Getting Started
Prerequisites
Python 3.13+ (Docker image uses Python 3.13.3-slim-bookworm)
Poetry: For dependency management
Docker and Docker Compose: For containerized deployment
Installation and Setup (Local Development)
Clone the repository:
git clone https://github.com/SaptaDey/NexusMind.git cd NexusMindInstall dependencies using Poetry:
poetry installThis creates a virtual environment and installs all necessary packages specified in
pyproject.toml.Activate the virtual environment:
poetry shellConfigure the application:
# Copy example configuration cp config/settings.example.yaml config/settings.yaml # Edit configuration as needed vim config/settings.yamlSet up environment variables (optional):
# Create .env file for sensitive configuration echo "LOG_LEVEL=DEBUG" > .env echo "API_HOST=0.0.0.0" >> .env echo "API_PORT=8000" >> .envRun the development server:
python src/asr_got_reimagined/main.pyAlternatively, for more control:
uvicorn asr_got_reimagined.main:app --reload --host 0.0.0.0 --port 8000The API will be available at
http://localhost:8000.
Docker Deployment
graph TB
subgraph "Development Environment"
A[π¨βπ» Developer] --> B[π³ Docker Compose]
end
subgraph "Container Orchestration"
B --> C[π¦ NexusMind Container]
B --> D[π Monitoring Container]
B --> E[ποΈ Database Container]
end
subgraph "NexusMind Application"
C --> F[β‘ FastAPI Server]
F --> G[π§ ASR-GoT Engine]
F --> H[π MCP Protocol]
end
subgraph "External Integrations"
H --> I[π€ Claude Desktop]
H --> J[π Other AI Clients]
end
style A fill:#e1f5fe
style B fill:#f3e5f5
style C fill:#e8f5e8
style F fill:#fff3e0
style G fill:#ffebee
style H fill:#f1f8e9Quick Start with Docker Compose:
# Build and run all services docker-compose up --build # For detached mode (background) docker-compose up --build -d # View logs docker-compose logs -f nexusmindIndividual Docker Container:
# Build the image docker build -t nexusmind:latest . # Run the container docker run -p 8000:8000 -v $(pwd)/config:/app/config nexusmind:latestProduction Deployment:
# Use production compose file docker-compose -f docker-compose.prod.yml up --build -dAccess the Services:
API Documentation:
http://localhost:8000/docsHealth Check:
http://localhost:8000/healthMCP Endpoint:
http://localhost:8000/mcp
π API Endpoints
Core Endpoints
MCP Protocol:
POST /mcp{ "method": "process_query", "params": { "query": "Analyze the relationship between microbiome diversity and cancer progression", "confidence_threshold": 0.7, "max_stages": 8 } }Health Check:
GET /health{ "status": "healthy", "version": "0.1.0", "timestamp": "2024-05-23T10:30:00Z" }
Advanced Endpoints
Graph Query:
POST /api/v1/graph/query{ "query": "Research question or hypothesis", "parameters": { "disciplines": ["immunology", "oncology"], "confidence_threshold": 0.6, "include_temporal_analysis": true, "enable_bias_detection": true } }Graph State:
GET /api/v1/graph/{session_id}Retrieve current state of a reasoning graph
Includes confidence scores, node relationships, and metadata
Analytics:
GET /api/v1/analytics/{session_id}Get comprehensive metrics about the reasoning process
Includes performance stats, confidence trends, and quality measures
Subgraph Extraction:
POST /api/v1/graph/{session_id}/extract{ "criteria": { "min_confidence": 0.7, "node_types": ["hypothesis", "evidence"], "include_causal_chains": true } }
π§ͺ Testing & Quality Assurance
Development Commands
# Run full test suite with coverage
poetry run pytest --cov=src --cov-report=html --cov-report=term
# Run specific test categories
poetry run pytest tests/unit/stages/ # Stage-specific tests
poetry run pytest tests/integration/ # Integration tests
poetry run pytest -k "test_confidence" # Tests matching pattern
# Type checking and linting
poetry run mypy src/ --strict # Strict type checking
poetry run ruff check . --fix # Auto-fix linting issues
poetry run ruff format . # Format code
# Pre-commit hooks (recommended)
poetry run pre-commit install # Install hooks
poetry run pre-commit run --all-files # Run all hooksQuality Metrics
Type Safety:
Fully typed codebase with strict mypy configuration
Configured with
mypy.iniandpyrightconfig.jsonFix logger type issues:
python scripts/add_type_hints.py
Code Quality:
95%+ test coverage target
Automated formatting with Ruff
Pre-commit hooks for consistent code quality
Comprehensive integration tests for the 8-stage pipeline
π§ Configuration
Application Settings (config/settings.yaml)
# Core application settings
app:
name: "NexusMind"
version: "0.1.0"
debug: false
log_level: "INFO"
# API configuration
api:
host: "0.0.0.0"
port: 8000
cors_origins: ["*"]
# ASR-GoT Framework settings
asr_got:
max_stages: 8
default_confidence_threshold: 0.6
enable_bias_detection: true
enable_temporal_analysis: true
max_hypotheses_per_dimension: 5
# Graph settings
graph:
max_nodes: 10000
enable_hyperedges: true
enable_multi_layer: true
temporal_decay_factor: 0.1MCP Configuration (config/claude_mcp_config.json)
{
"name": "nexusmind",
"description": "Advanced Scientific Reasoning with Graph-of-Thoughts",
"version": "0.1.0",
"endpoints": {
"mcp": "http://localhost:8000/mcp"
},
"capabilities": [
"scientific_reasoning",
"graph_analysis",
"confidence_assessment",
"bias_detection"
]
}π€ Contributing
We welcome contributions! Please see our Contributing Guidelines for details.
Development Setup
Fork the repository
Create a feature branch:
git checkout -b feature/amazing-featureInstall development dependencies:
poetry install --with devMake your changes and add tests
Run the test suite:
poetry run pytestSubmit a pull request
Code Style
Follow PEP 8 style guidelines
Use type hints for all functions and methods
Write comprehensive docstrings
Maintain test coverage above 95%
π Documentation
API Documentation: Comprehensive API reference
Architecture Guide: System design and components
Usage Examples: Practical usage scenarios
Development Guide: Contributing and development setup
π License
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
π Acknowledgments
NetworkX community for graph analysis capabilities
FastAPI team for the excellent web framework
Pydantic for robust data validation
The scientific research community for inspiration and feedback
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelogβ¦
This server cannot be deployed
Maintenance
Related MCP Connectors
Hybrid human + AI expertise for faster, trusted answers and decisions via MCP Server.
The Dappier MCP server connects LLMs and AI agents to real-time, rights-cleared, proprietary data from trusted sources across various domains. It provides specialized knowledge through real-time web search, financial stock market and crypto data access, AI-powered content recommendations from premium publishers, and structured outputs with sub-300ms response times, enabling AI systems to respond to current events and trends.
The CustomGPT.ai MCP server is a fully managed, RAG-powered endpoint that connects large language models with private knowledge bases and external data sources. It provides tools for retrieval-augmented generation queries (send_message), data ingestion (upload_file), and source listing, enabling AI agents to query private documents like PDFs with high accuracy and real-time citations.
MCP server for building and testing AI agents with multi-model experimentation and insights.
Related MCP Servers
- AlicenseDqualityCmaintenanceA sophisticated MCP server that provides a multi-dimensional, adaptive reasoning framework for AI assistants, replacing linear reasoning with a graph-based architecture for more nuanced cognitive processes.1155 npm33MIT
- AlicenseNot gradedqualityDmaintenanceA scientific reasoning framework that leverages graph structures and the Model Context Protocol (MCP) to process complex scientific queries through an Advanced Scientific Reasoning Graph-of-Thoughts (ASR-GoT) approach.31MIT
- AlicenseBqualityBmaintenanceAn MCP server that provides standardized access to biomedical knowledge bases and resources, enabling AI systems to retrieve verified information from sources like bioRxiv, EuropePMC, and various protein/gene databases.5231Apache 2.0
- AlicenseAqualityDmaintenanceAn MCP server that enhances sequential thinking with meta-cognitive capabilities including confidence tracking, hypothesis testing, and organized memory storage through graph-based libraries and structured JSON documents.1012MIT