stock-mcp-server

stock-mcp-server

Provides real-time stock price information and profitability analysis, including turnaround detection, using Yahoo Finance API.

Category
Visit Server

README

Stock MCP Server

A Model Context Protocol (MCP) server that provides real-time stock price information and profitability analysis using Yahoo Finance API.

Features

  • Get real-time stock prices for individual symbols
  • Fetch multiple stock prices at once
  • Comprehensive financial data and fundamental analysis
  • Profitability turnaround analysis - Identify stocks that have turned from loss to profit
  • Profit turnaround screening - Screen multiple stocks for recent profitability improvements
  • Returns comprehensive stock data including price, change, volume, and market cap
  • Built with TypeScript and Zod for type safety

Installation

npm install
npm run build

Usage

Development

npm run dev

Production

npm start

Tools Available

get_stock_price

Get real-time stock price information for a single stock symbol.

Parameters:

  • symbol (string): Stock symbol (e.g., "AAPL", "GOOGL", "TSLA")

get_multiple_stock_prices

Get real-time stock price information for multiple stock symbols.

Parameters:

  • symbols (array): Array of stock symbols (e.g., ["AAPL", "GOOGL", "TSLA"])

get_financial_data

Get comprehensive financial data and fundamental analysis metrics for a stock.

Parameters:

  • symbol (string): Stock symbol (e.g., "AAPL", "GOOGL", "TSLA")

analyze_profitability_turnaround

Analyze whether a stock has turned from loss to profit in recent quarters.

Parameters:

  • symbol (string): Stock symbol (e.g., "TSLA", "UBER")

Returns:

  • turnAroundStatus: "profit_turnaround", "loss_turnaround", "continued_profit", or "continued_loss"
  • currentQuarterNetIncome: Latest quarter's net income
  • previousQuarterNetIncome: Previous quarter's net income
  • quarterlyChange: Percentage change in net income
  • Company and market data

screen_profit_turnaround_stocks

Screen multiple stocks to find those that have recently turned profitable.

Parameters:

  • symbols (array): Array of stock symbols to analyze
  • minMarketCap (number, optional): Minimum market capitalization filter
  • maxMarketCap (number, optional): Maximum market capitalization filter

Returns: Array of stocks with turnAroundStatus: "profit_turnaround", sorted by quarterly improvement percentage.

Testing

# Test profitability analysis functionality
node test_profitability.js

Configuration for Claude Desktop

Add the following to your Claude Desktop configuration file:

{
  "mcpServers": {
    "stock-server": {
      "command": "node",
      "args": ["/path/to/stock-mcp-server/dist/index.js"]
    }
  }
}

Project Structure

stock-mcp-server/
├── src/
│   ├── services/
│   │   └── stockService.ts    # Stock price service
│   ├── types/
│   │   └── schema.ts          # Zod schemas and types
│   └── index.ts               # MCP server entry point
├── dist/                      # Compiled JavaScript output
├── package.json
├── tsconfig.json
└── README.md

Dependencies

  • @modelcontextprotocol/sdk: MCP SDK for server implementation
  • yahoo-finance2: Yahoo Finance API client
  • zod: Runtime type validation and schema definition

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
E2B

E2B

Using MCP to run code via e2b.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured