Open source regime-adaptive financial analysis engine with MCP tool orchestration.
Live: nexusmcp.site | Open Source: nexusmcp.site/opensource | Patent: nexusmcp.site/patent
Nexus Core is the open source foundation of the Protocol Wealth research engine — a regime-aware financial analysis system that exposes analytical capabilities as MCP (Model Context Protocol) tools. Any MCP-compatible AI client (Claude, GPT, Gemini) can access regime-aware financial analysis without implementing financial domain logic.
Built and tested in production by an SEC-registered RIA (Protocol Wealth LLC, CRD #335298).
MCP Client (Claude, GPT, Gemini)
│ JSON-RPC over HTTP
▼
Nexus Core (FastAPI + FastMCP)
├── Regime Detection Engine
│ ├── Signal ensemble (yield curve, VIX, DXY, CPI, energy)
│ ├── 5 regime states (Growth, Transition, Hard Asset, Deflation, Repression)
│ ├── Langevin decay constants (λ) per asset class
│ └── 6 voting signals with cross-validation
├── Scoring Framework
│ ├── Multi-dimensional durability scoring
│ ├── Confidence tiers
│ ├── Layered durability model
│ └── Kill rules for automatic disqualification
├── Portfolio Optimization (PyPortfolioOpt + Riskfolio-Lib)
│ ├── MVO, Black-Litterman, HRP, discrete allocation
│ ├── 24 convex risk measures, factor models
│ └── Walk-forward cross-validation (skfolio)
├── Risk Analytics (empyrical-reloaded + pyfolio-reloaded)
│ ├── Sharpe, Sortino, alpha, beta, VaR, max drawdown
│ └── Professional tear sheets
├── Derivatives Pricing (QuantLib + FinancePy)
│ ├── Yield curves, bond analytics, swaps
│ └── Equity options, FX, credit instruments
├── SEC EDGAR Integration (edgartools + Arelle)
│ ├── Filings as Python objects with native XBRL
│ └── SEC-certified XBRL validation
├── AI/ML Finance (FinGPT + FinRobot + FinBERT)
│ ├── Multi-agent equity research from 10-Ks
│ └── Financial sentiment classification
├── Compliance (Moov Watchman)
│ └── OFAC sanctions screening via HTTP API
├── MCP Tool Registry
│ ├── @mcp.tool() decorator pattern
│ ├── Multi-tier access control
│ └── Transport-layer PII filtering
└── Data Layer (PostgreSQL + Redis)
Regime Detection — Signal ensemble maps macroeconomic conditions to regime states, informing asset-specific analysis.
Scoring Framework — Multi-dimensional assessment combining fundamentals, technicals, momentum, and regime alignment.
Layered Durability Model — Assets classified by decay characteristics. Lower decay = higher durability under stress.
MCP Orchestration — Tools auto-adjust analysis based on detected regime. Any LLM accesses regime-aware insights without domain logic.
Nexus Core stands on a foundation of exceptional open-source projects. We bundle or extend these libraries with full attribution — see NOTICE and THIRD_PARTY_LICENSES.md for complete legal notices.
- PyPortfolioOpt (MIT) — Mean-variance, Black-Litterman, HRP
- Riskfolio-Lib (BSD-3) — 24 convex risk measures, factor models
- empyrical-reloaded (Apache 2.0) — Performance metrics (Sharpe, Sortino, VaR)
- pyfolio-reloaded (Apache 2.0) — Professional tear sheets
- skfolio (BSD-3) — scikit-learn portfolio optimization
- ffn (MIT) — Pandas financial functions
- QuantLib (Modified BSD) — Derivative pricing, yield curves
- FinancePy (MIT) — Numba JIT pricing for bonds/swaps/options
- edgartools (MIT) — SEC filings as Python objects + built-in MCP server
- Arelle (Apache 2.0) — SEC-certified XBRL validation
- sec-parser (MIT) — Semantic parsing for LLM pipelines
- sec-edgar-downloader (MIT) — Bulk filing downloads
- edgar-crawler (MIT) — Filing section extraction
- yfinance (Apache 2.0) — Market data
- zipline-reloaded (Apache 2.0) — Event-driven backtesting
- alphalens (Apache 2.0) — Factor performance analysis
- FinGPT (MIT) — Financial LLM framework with RAG
- FinRobot (Apache 2.0) — Multi-agent equity research
- FinRL (MIT) — Reinforcement learning for portfolios
- FinBERT (Apache 2.0) — Financial sentiment classification
- Moov Watchman (Apache 2.0) — OFAC sanctions screening
- Ethereum-ETL (MIT) — Blockchain data pipeline
- OpenBB Platform (AGPL-3.0) — Data aggregation architecture
- SEC EDGAR Toolkit (AGPL-3.0) — TS+Python monorepo pattern
Huge thanks to every maintainer and contributor of these projects. Financial software has historically been locked behind proprietary walls — Nexus Core would not exist without the open-source financial ecosystem.
Open (Apache 2.0): Framework architecture, scoring structure, layer model, tool pattern, compliance gate, caching patterns. All third-party integrations listed above.
Private: Specific thresholds, decay constants, production tools, API keys, client data, narrative pipeline.
pip install nexus-core[all]pip install nexus-core # Core only (regime, scoring)
pip install nexus-core[optimization] # + PyPortfolioOpt, Riskfolio, skfolio
pip install nexus-core[risk] # + empyrical, pyfolio
pip install nexus-core[pricing] # + QuantLib, FinancePy
pip install nexus-core[edgar] # + edgartools, Arelle, sec-parser
pip install nexus-core[ai] # + FinGPT, FinBERT, FinRobot (heavy)
pip install nexus-core[backtest] # + zipline-reloaded, alphalens
pip install nexus-core[compliance] # + Moov Watchman client
pip install nexus-core[onchain] # + Ethereum-ETL, DefiLlama integrationgit clone https://github.com/Protocol-Wealth/nexus-core.git
cd nexus-core
pip install -e ".[all]"from nexus_core import RegimeEngine, ScoringEngine
engine = RegimeEngine()
regime = engine.detect_current_regime()
print(f"Current regime: {regime.name} (confidence: {regime.confidence:.1%})")
scoring = ScoringEngine(regime=regime)
score = scoring.score_ticker("AAPL")
print(f"AAPL: {score.tier} ({score.total}/8)")# Run as an MCP server (any MCP-compatible AI client can connect)
nexus-core mcp serve --port 3333Python 3.12 · FastAPI · FastMCP · PostgreSQL · Redis · pandas · numpy · scipy · PyWavelets
- Architecture
- MCP Tools Reference
- Attribution — detailed provenance per capability
- Contributing
- Code of Conduct
- Security
Patent Pending — USPTO Application #64/034,229 "Compliance-First Quantitative Research Engine with Multi-Signal Regime Detection, Systematic Asset Scoring, and AI Tool Orchestration via Model Context Protocol for SEC/FINRA-Regulated Financial Advisory Services"
- USPTO Patent Center
- Applicant: Protocol Wealth, LLC
- Inventor: Nicholas Rygiel
- Filed: April 9, 2026
- Status: Patent Pending
This patent was filed defensively under Apache 2.0. The intent is to establish formal prior art and prevent third parties from patenting these concepts and restricting their use by independent financial advisors. Under Apache 2.0, you receive an automatic, perpetual, royalty-free patent grant. If you sue Protocol Wealth for patent infringement related to this software, your license terminates automatically.
Open Invention Network (OIN) Member — Protocol Wealth is a member of the OIN 2.0 community, the world's largest patent non-aggression network with 4,100+ members including Google, IBM, Toyota, Meta, Microsoft, and Amazon. Learn more
See PATENTS for full non-assertion pledge.
Apache License 2.0 — see LICENSE.
Apache 2.0 includes an explicit patent retaliation clause that MIT lacks. If someone sues you for patent infringement related to Nexus, their right to use the software terminates automatically.
Third-party components retain their original licenses. See NOTICE and THIRD_PARTY_LICENSES.md.
We welcome contributions. All commits must include a Signed-off-by: line certifying agreement with the Developer Certificate of Origin:
git commit -s -m "feat: your change"See CONTRIBUTING.md for full guidelines.
Built by Protocol Wealth LLC — SEC-Registered Investment Adviser (CRD #335298)