A local MCP powered financial analyst agent using the DeepSeek-R1 model via Ollama, utilizing Github Copilot and Python. It analyzes user queries related to stocks and financial data, running entirely offline.
# MCP Financial Analyst
MCP Financial Analyst is a local, multi-agent system built using the MCP. It enables natural language-driven financial analysis by leveraging CrewAI agents and running a local DeepSeek-R1 language model through Docker-hosted Ollama.
This project converts natural language queries into Python code that retrieves, analyzes, and visualizes stock market data, then securely executes the code and returns the results.
---
## Features
- Natural language interface for financial data analysis
- Modular, agent-based architecture using CrewAI:
- Query Parser Agent – interprets natural language queries
- Code Writer Agent – generates Python code for analysis and plotting
- Code Executor Agent – safely executes code in a sandbox
- Fully local LLM inference using DeepSeek-R1 via Docker-hosted Ollama
- Chart generation with `pandas`, `yfinance`, and `matplotlib`
- Runs locally using the MCP runtime
---
### Prerequisites
- Python 3.10+
- Visual Studio Code
- Docker
- [Ollama](https://ollama.com) installed and running via Docker
- `uv` for running the MCP server (or use pip)
To start Ollama with DeepSeek-R1 in Docker:
```bash
docker run -it -p 11434:11434 --name give_name ollama/ollama
docker_terminal:
ollama pull deepseek-r1
exit
````
> Ensure the Ollama server is up and listening on `localhost:11434`
---
### Install Dependencies
Install Python dependencies using `uv`:
```bash
uv pip install -r requirements.txt
```
---
### Running the MCP Server
You can run the server directly from VS Code terminal:
```bash
uv --directory /absolute/path/to/financial-analyst-deepseek run server.py
```
This will launch the MCP server that manages the CrewAI agents and handles user queries.
---
## Example Query
Query:
```
Plot year-to-date performance for AAPL and MSFT
```
The system will:
1. Parse the query into structured instructions
2. Generate Python code to fetch stock data using `yfinance`
3. Plot the result using `matplotlib`
4. ExecHAL 分层混合模型工作流 — 强模型(Claude)负责理解/拆解/验收,低成本模型(DeepSeek)负责检索/提取/清洗。Hermes Agent skill。
An LLM agent fine-tuned on DeepSeek for spaced repetition, dynamically integrating knowledge points based on the Ebbinghaus forgetting curve.
基于 STM32F103 构建的端到端 AI 智能手表生态。自研“零重定位”原生机器码动态加载引擎与页面栈式 UI 框架;集成生产级 OTA 回滚保护机制与高带宽(921600 baud)串口协议栈。通过 Node.js 中继实现 DeepSeek AI 语义控制及 ASRPRO 语音全双工交互,是一个集成了分布式计算、现代存储管理与 AI Agent 的嵌入式全栈工程。
A Meta-Agent-Driven Self-Evolving Multi-Agent System for UAV Detection and Tracking
One command to run Hermes AI Agent with a browser UI. Zero prerequisites. 一行命令,AI 就位。
网页应用Agent,接入DeepSeek、Mimo等模型