How tech-armstrong/mf-nav-mcp works
This repository combines a read-only NAV analytics MCP server with a holdings-enrichment CLI and scripts that maintain benchmark-index data. The primary user workflow is a client request to the MCP server, which reads fund and index parquet data and returns discovery or performance analytics; optional holdings enrichment produces spreadsheet and JSON outputs. The server is documented as self-contained, so its tool capabilities share one implementation path. Some subsystem links are based on README documentation or the SOURCE INDEX; unsampled implementation details are not assumed.
Main entry points: main.py Enrichment CLI · server.py MCP server · data Index parquet · api_client.py Advisorkhoj client
Components 22
NAV analytics server
- MCP server
server.py - Fund analytics
server.py - Index analytics
server.py - Holdings analytics
server.py - OAuth auth
server.py
Analytics data
- NAV parquet
data - Index parquet
data - Holdings JSON
data/fund_holdings.json
Holdings enrichment
- Enrichment CLI
holdings_enricher/main.py - API source adapter
holdings_enricher/src/api_source.py - Advisorkhoj client
holdings_enricher/src/api_client.py - Record builder
holdings_enricher/src/builder.py - Holdings enricher
holdings_enricher/src/enricher.py - Stock matcher
holdings_enricher/src/matcher.py - Weight validator
holdings_enricher/src/validator.py - NAV name resolver
holdings_enricher/src/nav_names.py - Workbook export
holdings_enricher/src/writer.py - Profile JSON export
holdings_enricher/src/json_export.py
Index maintenance
- Workbook importer
Index/parse_index_xlsx.py - Daily close importer
Index/append_daily_close.py
Other components
- MCP client
- Advisorkhoj API
Connections 23
- MCP client → MCP server: requests tools
README.md - MCP server → Fund analytics: registers tools
README.md - MCP server → Index analytics: registers tools
README.md - MCP server → Holdings analytics: exposes holdings
server.py - MCP server → OAuth auth: configures auth
README.md - MCP server → NAV parquet: queries parquet
README.md - MCP server → Index parquet: reads closes
README.md - MCP server → Holdings JSON: loads holdings
server.py - Enrichment CLI → API source adapter: uses adapter
holdings_enricher/main.py - Enrichment CLI → Advisorkhoj client: uses client
holdings_enricher/main.py - Enrichment CLI → Record builder: uses builder
holdings_enricher/main.py - Enrichment CLI → Holdings enricher: enriches records
holdings_enricher/main.py - Enrichment CLI → Stock matcher: uses matcher
holdings_enricher/main.py - Enrichment CLI → Weight validator: validates weights
holdings_enricher/main.py - Enrichment CLI → Workbook export: writes workbook
holdings_enricher/main.py - Enrichment CLI → Profile JSON export: exports profiles
holdings_enricher/main.py - API source adapter → Advisorkhoj client: requests portfolios
holdings_enricher/src/api_source.py - Advisorkhoj API → Advisorkhoj client: serves API data
holdings_enricher/src/api_client.py - Holdings enricher → Stock matcher: resolves stocks
holdings_enricher/src/enricher.py - Profile JSON export → NAV name resolver: resolves fund names
holdings_enricher/src/json_export.py - Workbook importer → Index parquet: writes history
Index/parse_index_xlsx.py - Workbook importer → Index parquet: writes master
Index/parse_index_xlsx.py - Daily close importer → Index parquet: appends closes
Index/append_daily_close.py