Transform your AI agent from a general "vibe coding" tool into a sophisticated "vibe trading" analyst by integrating real-time market data and advanced charting capabilities.
This project demonstrates how to leverage the gemini-cli as an AI agent, augmented with specialized Model Context Protocol (MCP) servers and a detailed prompt, to perform comprehensive equity research and generate actionable investment recommendations. It showcases the power of "vibe trading" – articulating clear intent and context to an AI to execute complex financial analysis tasks.
The primary goal of this demo is to illustrate how a versatile AI agent like gemini-cli can be specialized for financial analysis by:
- Integrating with real-time financial market data sources.
- Incorporating data visualization and charting tools.
- Guiding its analysis with a highly structured and domain-specific prompt.
This transformation enables the AI to act as an "equity research analyst," providing in-depth reports and investment insights.
The system's architecture is centered around the gemini-cli agent, which orchestrates tasks by interacting with external MCP servers and following a predefined analytical workflow.
graph TD
A[User Request/Prompt] --> B(gemini-cli Agent);
B --> C{MCP Servers};
C --> D["fin-data-mcp (PlusE)"];
C --> E["chart-mcp (AntdV Chart)"];
B --> F["prompt.md (Equity Research Workflow)"];
D --> G[Real-time Financial Data];
E --> H[Charting & Technical Analysis];
F --> B;
G --> B;
H --> B;
B --> I[Comprehensive Equity Research Report];
The gemini-cli serves as the core AI agent. It is a powerful, open-source command-line interface tool that understands natural language prompts, can interact with codebases, and is highly extensible through MCP server integrations. In this project, it acts as the "brain" that processes the research prompt, queries data, generates charts, and synthesizes the final report.
Configured in .gemini/settings.json, the fin-data-mcp connects to https://plusefin.com. This server provides the gemini-cli with access to real-time financial market data, including:
- Company financials (income statements, balance sheets, cash flow statements)
- Key financial ratios and valuation multiples
- Stock prices and volume data
This data is crucial for the agent's fundamental and market performance analysis.
Also configured in .gemini/settings.json using npx @antv/mcp-server-chart, this server empowers the gemini-cli with robust data visualization capabilities. It allows the agent to:
- Generate various financial charts (e.g., candlestick, volume charts).
- Visualize technical indicators (e.g., moving averages, RSI, MACD).
These visualizations are essential for performing technical analysis and presenting findings clearly in the research report.
This markdown file contains the detailed instructions and analytical workflow for the gemini-cli agent. It defines the agent's role as a "world-class equity research analyst" and outlines a comprehensive five-part analysis:
- Part 1: Fundamental Business & Financial Health Analysis
- Part 2: Market Performance & Technical Analysis
- Part 3: Industry Landscape & Competitive Analysis
- Part 4: Qualitative Factors & Future Outlook
- Part 5: Synthesis & Actionable Recommendation
The prompt.md acts as the "vibe" or "intent" that guides the AI's entire research process, ensuring a structured and thorough output.
- Initialization: The
gemini-cliis launched, loading its configuration from .gemini/settings.json, which includes the MCP server integrations. - Prompt Ingestion: The
gemini-clireceives theprompt.mdas its primary instruction set, defining the scope and methodology of the equity research. - Data Gathering: The agent uses the
fin-data-mcpto fetch real-time financial data for the specified company (e.g., Cameco). It may also use general web search tools (like Tavily, if integrated) for industry and qualitative analysis. - Analysis & Visualization: The
gemini-cliprocesses the gathered data according to theprompt.mdworkflow. It utilizes thechart-mcpto generate relevant graphs and technical indicators for market performance analysis. - Report Generation: The agent synthesizes all the information, analysis, and visualizations into a structured markdown report, culminating in a core investment thesis, valuation judgment, and actionable advice.
An example of the output generated by this system is provided in Cameco_Equity_Research_Report_2025-10-07.md, which showcases a detailed equity research report for Cameco Corporation.
To run this demo:
- Ensure
gemini-cliis installed and configured. - Verify that the .gemini/settings.json file correctly points to the PlusE and AntdV Chart MCP servers. You may need to replace
YourApiKeywith a valid API key for the PlusE server. - Execute the
gemini-cliwith theprompt.mdfile, specifying the target ticker (e.g.,Cameco).
This project provides a clear blueprint for building specialized AI agents that can perform complex, real-world tasks by combining powerful language models with domain-specific tools and precise instructions.