Build an AI Stock Analyst with Fred MCP

Learn how to build an AI stock analysis like Robinhood Cortex using Fred MCP.

Woojong Koh

  ·  4 min read

Fred MCP is a service designed to transform any Large Language Model (LLM) into an expert AI stock analyst.

What is an MCP? #

You might be wondering, what is an MCP?

An MCP (Model Context Protocol) server is an application that exposes tools and resources to an LLM through the Model Context Protocol, allowing it to interact with external systems and data sources.

Think of MCP as a next-generation API standard for the new AI era, specifically for building AI agents. The first and most crucial step toward a powerful AI agent is an augmented LLM.

Diagram: Augmented LLM

The difference is night and day.

  • An LLM is like a brilliant student taking an exam in an isolated room. They only know what they were trained on.
  • An LLM with Fred MCP is like that same student with a smartphone, granting them real-time access to professional-grade, LLM-friendly financial information.

For analyzing U.S. stock price movements and predicting their prospects, this connection to real-time, comprehensive data is a game-changer.

Case Study: Robinhood Cortex Digests #

Screenshot: Cortex Digests by Robinhood

Robinhood Cortex Digests are insights that leverage artificial intelligence (AI) to generate plain-language summaries of what may be driving a stock’s price.

This is exactly the type of service you can build. With Fred MCP, you can replicate the core functionality of a service like Cortex Digests in minutes.

Data We Provide #

Currently, Fred MCP offers the following datasets, all formatted for an LLM:

  • SEC Filings: Comprehensive access to 10-K, 10-Q, and 8-K reports.
  • Corporate Earnings Calls: Full audio recordings and presentation slides.
  • Financial News: The latest stock market news from major U.S. media outlets.
  • Social Media: User posts from Reddit and Truth Social.
  • Podcasts: Audio from financial and business podcasts (U.S. and U.K.).
  • Market Data: Real-time U.S. stock prices and a wide array of technical analysis indicators (SMA, EMA, RSI, MACD, Bollinger Bands, On-Balance Volume).
  • Proprietary Data: Our own extensive corporate Knowledge Base (KB) and ontology, built by Fred.

Example: Prompt and Response #

Here is an example of a prompt you can send to an LLM that is connected to the Fred MCP.

Prompt:

Analyze the price movement of PLTR stock on the recent trading days.

Use all available information, including SEC filings, stock news, earnings call transcripts, Reddit posts, knowledge base documents, stock prices, and technical indicators.

Write the analysis in the following format in both English and Korean:

For English:

  • Please write in a polite, informal style.
  • Examples:
    • Importance: High. A new CEO has been appointed. They’re reportedly the former CFO from during Netflix’s +10,000% stock price surge. Source: …
    • Importance: Medium. Financial health is worsening, and the deficit is growing. This was due to the rise in international energy prices and difficulties in adjusting electricity sales prices. Source: …

For Korean:

  • 두루낮춤 비격식체인 해요체로 작성해주세요.
  • 예시:
    • 중요도: 높음. 신규 CEO가 취임했어요. 넷플릭스 주가 연상승률 +10,000% 당시 CFO 출신이래요. 출처: …
    • 중요도: 중간. 재무 건전성이 악화되어 적자가 늘어나고 있어요. 국제 에너지 가격 상승과 전력 판매 단가 조정의 어려움 때문이었어요. 출처: …

Response (Gemini CLI with Gemini Pro 2.5):

English

  • Importance: High. Palantir’s stock price experienced a downward movement on October 22, 2025, closing at $175.49 after opening at $181.93. This appears to be largely influenced by a broader downturn in the technology sector, driven by concerns over new trade tensions with China and disappointing earnings reports from other major tech companies. Source: TradingView News.
  • Importance: High. Despite the stock’s decline, Palantir’s recent financial performance has been exceptionally strong. The company announced in its Q2 2025 earnings call on August 4, 2025, that it had surpassed $1 billion in quarterly revenue for the first time, a 48% year-over-year increase. This growth was driven by a 93% increase in U.S. commercial revenue and a 53% increase in U.S. government revenue, largely attributed to high demand for its Artificial Intelligence Platform (AIP). Source: Palantir Q2 2025 Earnings Call.
  • Importance: Medium. The company has recently entered into a strategic partnership with Snowflake, a data cloud giant. This collaboration is expected to accelerate the deployment of AI agents and provide customers with seamless data access, which is a positive long-term catalyst. Source: Benzinga, Reddit.
  • Importance: Medium. While the company’s fundamentals are strong, a recurring concern among analysts and in news reports is its high valuation. The stock is trading at a high multiple of its earnings, which can make it more volatile and susceptible to broader market downturns, even in the absence of negative company-specific news. Source: Barchart, Seeking Alpha.
  • Importance: Low. Technical indicators present a mixed picture. While the long-term trend appears bullish with short-term moving averages above long-term ones, there are signs of short-term weakness. The price has dipped below the 20-day moving average, and the MACD histogram suggests a potential slowdown in momentum. The Relative Strength Index (RSI) is in neutral territory. Source: Stock indicators.

Korean

  • 중요도: 높음. Palantir 주가는 2025년 10월 22일에 하락 마감했어요. 시초가 $181.93에서 시작하여 $175.49로 마감했어요. 이는 중국과의 새로운 무역 긴장과 다른 주요 기술 기업들의 실망스러운 실적 발표로 인한 기술주 전반의 하락세에 크게 영향을 받은 것으로 보여요. 출처: 트레이딩뷰 뉴스.
  • 중요도: 높음. 주가 하락에도 불구하고 Palantir의 최근 재무 성과는 매우 견고해요. 2025년 8월 4일에 있었던 2025년 2분기 실적 발표에서 분기 매출이 처음으로 10억 달러를 돌파했으며, 이는 전년 동기 대비 48% 증가한 수치라고 밝혔어요. 이러한 성장은 인공지능 플랫폼(AIP)에 대한 높은 수요에 힘입어 미국 내 상업 부문 매출이 93%, 정부 부문 매출이 53% 증가한 데 따른 것이에요. 출처: Palantir 2025년 2분기 실적 발표.
  • 중요도: 중간. 최근 데이터 클라우드 대기업인 Snowflake와 전략적 파트너십을 체결했어요. 이 협력은 AI 에이전트의 배포를 가속화하고 고객에게 원활한 데이터 접근을 제공할 것으로 기대되어 장기적으로 긍정적인 촉매제가 될 것이에요. 출처: Benzinga, Reddit.
  • 중요도: 중간. 회사의 펀더멘털은 튼튼하지만, 분석가들과 뉴스 보도에서 지속적으로 제기되는 우려는 높은 밸류에이션이에요. 주식이 이익 대비 높은 배수로 거래되고 있어, 회사 자체의 부정적인 소식이 없더라도 시장 전반의 하락세에 더 변동성이 크고 민감하게 반응할 수 있어요. 출처: Barchart, Seeking Alpha.
  • 중요도: 낮음. 기술적 지표는 엇갈린 신호를 보내고 있어요. 장기 추세는 단기 이동평균선이 장기 이동평균선 위에 있어 강세로 보이지만, 단기적인 약세 신호도 있어요. 주가가 20일 이동평균선 아래로 떨어졌고, MACD 히스토그램은 모멘텀 둔화 가능성을 시사하고 있어요. 상대강도지수(RSI)는 중립 영역에 있어요. 출처: 주식 지표.

How to Try It Yourself #

Fred MCP supports any LLM (remote, local, managed, or on-prem) that is ready for the Model Context Protocol.

Fred MCP is currently in beta. We are providing test API keys for evaluation. Please contact us to get your test API key.

For Gemini CLI #

We recommend using Gemini CLI with a model like Gemini 2.5 Pro for testing. It excels at this task because it can be configured to allow all tools without repeated permissions and supports a huge context size (1M tokens).

  1. Install Gemini CLI from: https://geminicli.com/
  2. Edit your ~/.gemini/settings.json file.
  3. Add the fred server configuration under mcpServers:
{
  "ui": {
    ...
  },
  "mcpServers": {
    "fred": {
      "httpUrl": "https://fred-test.cwrk.ai/mcp/",
      "trust": true,
      "headers": {
        "Authorization": "Bearer YOUR_API_KEY_HERE"
      }
    }
  },
  "general": {
    ...
  },
  "security": {
    ...
  }
}

(Remember to replace YOUR_API_KEY_HERE with the key we provide.)

For more details, see the Gemini CLI documentation: https://geminicli.com/docs/tools/mcp-server/#configuration-structure

For Claude Code #

Claude models, such as Sonnet 4.5, are also supported. However, be aware of a few limitations: they currently offer a smaller context size (200K tokens) than Gemini 2.5 Pro (1M tokens), and Claude Code may ask for tool-use permission on each run rather than allowing them by default. If you encounter any issues, we recommend trying the Gemini CLI setup.

You can connect Fred as a remote HTTP server.

claude mcp add --transport http fred-test https://fred-test.cwrk.ai/mcp/ \
  --header "Authorization: Bearer YOUR_API_KEY_HERE"

(Remember to replace YOUR_API_KEY_HERE with the key we provide.)

Check out the official Claude documentation for instructions: https://docs.claude.com/en/docs/claude-code/mcp#option-1%3A-add-a-remote-http-server