Skip to main content
Glama
StockMcp

StockMcp

🧠 Stock Analysis using MCP Local LLM (Ollama Qwen3) with LangChain

This project demonstrates how to build a fully local AI assistant that provides detailed stock analysis using:

  • MCP (Model Context Protocol): Enables structured tool usage by the language model.

  • Ollama: A tool for running large language models locally.(Qwen3)

  • LangChain: A framework for developing applications powered by language models and run as MCP Client

  • BeautifulSoup: For web scraping financial data from Screener.in.

πŸ“¦ Features

πŸ” Company Details: Retrieve company name, current price, market cap, PE ratio, ROE, ROCE, and more.

πŸ“ˆ Profit Analysis: Extract quarterly and yearly net profit data.

πŸ‘₯ Shareholding Patterns: Analyze holdings by promoters, DIIs, FIIs, and the public.

πŸ”§ Tool Integration: Seamless integration with MCP tools for enhanced functionality.

Related MCP server: stock-rag-mcp

βš™οΈ Configuration

MCP Server Setup

The MCP server is defined in mcp_config.json.

{
  "mcpServers": {
    "stock": {
      "command": "python",
      "args": ["StockMcp.py"],
      "transport": "stdio"
    }
  }
}


Give me the company details of CREDITACC.NS

πŸ› οΈ Project Structure

β”œβ”€β”€ StockMcp.py         # MCP server with tool definitions
β”œβ”€β”€ requirements.txt    # Python dependencies
β”œβ”€β”€ README.md           # Project documentation

πŸ“š Resources

MCP Github

Ollama Documentation

LangChain MCP Documentation

BeautifulSoup Documentation

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    Related MCP Connectors

    Related MCP Servers

    • F
      license
      A
      quality
      D
      maintenance
      Provides financial data for Indian listed companies from screener.in, enabling users to search companies and fetch financial statements, ratios, and peer comparisons.
      2
      2
      -
    • F
      license
      Not graded
      quality
      D
      maintenance
      Enables RAG-based querying of local stock company data using a local LLM and vector database, providing tools to ask questions, search raw chunks, and list documents.
      -
    • A
      license
      B
      quality
      B
      maintenance
      Exposes Screener.in data for Indian stocks (NSE/BSE) β€” fundamentals, financial statements, peers, and price/EPS time-series β€” as tools any MCP client can call.
      4
      25 npm
      5
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables LLM clients to perform fundamental analysis of NSE/BSE-listed Indian stocks, covering financial statements, ratios, valuation, screening, and investment memos using Yahoo Finance data.
      28
      1
      MIT