Skip to content

Commit c9c4d1d

Browse files
committed
Add MCP integration and improvements
1 parent 7e0362c commit c9c4d1d

File tree

8 files changed

+1253
-169
lines changed

8 files changed

+1253
-169
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
__pycache__/
2+
.venv/
3+
.uv/
4+
.uv_cache/
5+
.env
6+
.env.*
7+
.pyenv/
8+
*.pyc
9+
*.py[cod]
10+
*.so
11+
*.egg
12+
*.egg-info/
13+
dist/
14+
build/
15+
.ipynb_checkpoints/
16+
*.log
17+
*.pid
18+
*.out
19+
*.err
20+
.DS_Store
21+
Thumbs.db

financial-analyst-deepseek/README.md

Lines changed: 59 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,77 @@
1-
# Financial Analyst with CrewAI and DeepSeek using SambaNova
1+
# MCP-powered Financial Analyst using CrewAI and Deepseek-R1
22

3-
This project implements a Financial Analyst with CrewAI and DeepSeek using SambaNova.
4-
- [SambaNova](https://fnf.dev/4jH8edk) is used to as the inference engine to run the DeepSeek model.
5-
- CrewAI is used to analyze the user query and generate a summary.
6-
- Streamlit is used to create a web interface for the project.
3+
This project implements a financial analysis agentic workflow that analyzes stock market data and provides insights.
74

5+
We use:
6+
- CrewAI for multi-agent orchestration.
7+
- Ollama for serving Deepseek-R1 locally.
8+
- Cursor IDE as the MCP host.
89

910
---
1011
## Setup and installations
1112

12-
**Get SambaNova API Key**:
13-
- Go to [SambaNova](https://fnf.dev/4jH8edk) and sign up for an account.
14-
- Once you have an account, go to the API Key page and copy your API key.
15-
- Paste your API key by creating a `.env` file as shown below:
13+
**Install Ollama**
1614

17-
```
18-
SAMBANOVA_API_KEY=your_api_key
15+
```bash
16+
# Setting up Ollama on linux
17+
curl -fsSL https://ollama.com/install.sh | sh
18+
19+
# Pull the Deepseek-R1 model
20+
ollama pull deepseek-r1
1921
```
2022

23+
**Install Dependencies**
2124

22-
**Install Dependencies**:
23-
Ensure you have Python 3.11 or later installed.
25+
Ensure you have Python 3.12 or later installed.
26+
27+
You can use uv to directly install the required dependencies (recommended).
2428
```bash
25-
pip install streamlit openai crewai crewai-tools
29+
uv pip sync uv.lock
30+
```
31+
32+
Or you can also use pip to install the following dependecnies to your local environment.
33+
```bash
34+
pip install crewai crewai-tools ollama mcp pydantic yfinance pandas matplotlib
2635
```
2736

2837
---
2938

39+
## Run the project
40+
41+
First, set up your MCP server as follows:
42+
- Go to Cursor settings
43+
- Select MCP
44+
- Add new global MCP server.
45+
46+
In the JSON file, add this:
47+
```json
48+
{
49+
"mcpServers": {
50+
"financial-analyst": {
51+
"command": "uv",
52+
"args": [
53+
"--directory",
54+
"absolute/path/to/project_root",
55+
"run",
56+
"--with",
57+
"mcp",
58+
"server.py"
59+
]
60+
}
61+
}
62+
}
63+
```
64+
65+
You should now be able to see the MCP server listed in the MCP settings.
66+
67+
In Cursor MCP settings make sure to toggle the button to connect the server to the host. Done! Your server is now up and running.
68+
69+
You can now chat with Cursor and analyze stock market data. Simply provide the stock symbol and timeframe you want to analyze, and watch the magic unfold.
70+
71+
**Example queries**:
72+
- "Show me Tesla's stock performance over the last 3 months"
73+
- "Compare Apple and Microsoft stocks for the past year"
74+
- "Analyze the trading volume of Amazon stock for the last month"
3075

3176
---
3277

0 commit comments

Comments
 (0)