Skip to main content
Glama

Finanace-Analyst-MCP using CrewAI and Deepseek-R1

This project implements a financial analysis agentic workflow that analyzes stock market data and provides insights.

We use:

  • CrewAI for multi-agent orchestration.

  • Ollama for serving Deepseek-R1 locally.

  • Cursor IDE as the MCP host.


Setup and installations

Install Ollama

# Setting up Ollama on linux
curl -fsSL https://ollama.com/install.sh | sh

# Pull the Deepseek-R1 model
ollama pull deepseek-r1

Install Dependencies

Ensure you have Python 3.12 or later installed.

You can use uv to directly install the required dependencies (recommended).

 uv sync

Or you can also use pip to install the following dependencies to your local environment.

pip install crewai crewai-tools ollama mcp pydantic yfinance pandas matplotlib

Related MCP server: Enhanced MCP Stock Query System

Run the project

First, set up your MCP server as follows:

  • Go to Cursor settings

  • Select MCP

  • Add new global MCP server.

In the JSON file, add this:

{
    "mcpServers": {
        "financial-analyst": {
         "command": "uv",
            "args": [
                "--directory",
                "absolute/path/to/project_root",
                "run",
                "server.py"
            ]
        }
    }
}

You should now be able to see the MCP server listed in the MCP settings.

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.

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.


Example queries:

  • "Show me Tesla's stock performance over the last 3 months"

  • "Compare Apple and Microsoft stocks for the past year"

  • "Analyze the trading volume of Amazon stock for the last month"


Results from our demo!

  • "Show me Tesla's stock performance over the last 3 months"

Show me Tesla's stock performance over the last 3 months

  • "Compare Apple and Microsoft stocks for the past year"

Compare Apple and Microsoft stocks for the past year

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Provides real-time stock quotes, historical price data, financial news, and multi-stock comparisons using Yahoo Finance data. Enables users to access comprehensive financial market information through natural language queries.
    170 npm
    1
    MIT
  • F
    license
    Not graded
    quality
    D
    maintenance
    Enables AI-powered natural language stock market queries with real-time data from Yahoo Finance and CSV fallback. Uses Google Gemini to interpret queries and automatically fetch stock prices, comparisons, and market summaries.
    -
  • F
    license
    Not graded
    quality
    F
    maintenance
    Enables comprehensive stock market analysis with portfolio management, technical indicators, dividend tracking, sector analysis, risk metrics, and price alerts. Provides real-time stock data, trend analysis, and investment insights through natural language interactions.
    1
    -
  • A
    license
    C
    quality
    D
    maintenance
    Provides access to real-time and historical stock market data through the Alpha Vantage API, enabling financial analysis and market data queries through natural language.
    100
    42 PyPI
    74
    Apache 2.0