How lumif-ai/mcp-chart-server works
Project type and purpose
• This is a back-end microservice written in Node.js/TypeScript whose job is to fetch cryptocurrency OHLCV data from external exchanges/APIs (Binance, Bitquery), compute technical indicators (EMA, others), generate chart data/themes, persist results in MongoDB, and expose chart data (or images) via an API endpoint.
File structure
• Top-level files:
• package.json, tsconfig.json – standard Node/TS config
• index.ts – application entrypoint (starts server or CLI)
• src/config – configuration modules
• mongodb.config.ts – MongoDB connection parameters
• chart.theme.ts – chart styling/theme settings
• src/models – data schemas
• agent.model.ts – Mongoose schema/model for charting “agents” or jobs
• src/services – core business logic
• ohlcv.service.ts – orchestration of fetching raw OHLCV data
• ema.service.ts – computing EMA indicator from OHLCV
• mongodb.service.ts – persistence layer for read/write to MongoDB
• src/utils – thin wrappers and helpers
• binance.utils.ts, bitquery.utils.ts – adapter/clients for external data sources
• chart.utils.ts – routines for building chart payloads (e.g., Chart.js config)
• indicator.ts – helper functions for other indicators
README for additional insights
• README simply names the project (“mcp-chart”) but lacks an architecture section. All structural clues come from the file tree.