Skip to main content
Glama
guobo2421-ui

StockMCP

by guobo2421-ui

StockMCP

License Python MCP

StockMCP is an MCP (Model Context Protocol) server that allows AI assistants such as Claude Desktop and Cursor to retrieve real-time US stock market information through structured tools.

StockMCP provides stock prices, company information, valuation metrics, financial statements, and news through MCP tools that can be used by Claude Desktop, Cursor, and other MCP-compatible AI clients.

Claude Desktop
        │
        │ MCP
        ▼
+------------------+
|   StockMCP       |
|------------------|
| stock_price()    |
| company_info()   |
| financials()     |
+------------------+
        │
        ▼
    Yahoo Finance

Features

  • Real-time stock price

  • Company information

  • Market capitalization

  • P/E Ratio

  • P/S Ratio

  • Financial statements

  • Option Chain

  • Stock news

  • AI-ready MCP tools

Related MCP server: MCP YFinance Stock Server

Supported AI Clients

Client

Supported

Claude Desktop

Cursor

VS Code + MCP

Planned

Windsurf

Planned

Quick Start

Requirements

  • Python 3.11+

Dependencies:

  • MCP

  • yfinance


Clone the Repository

git clone https://github.com/byronguo/StockMCP.git
cd StockMCP

Create Virtual Environment

python -m venv .venv
Set-ExecutionPolicy -Scope CurrentUser RemoteSigned

Activate it:

Windows:

.venv\Scripts\activate

macOS/Linux:

source .venv/bin/activate

Install Dependencies

pip install -r requirements.txt

Run StockMCP Server

python server.py

Claude Desktop Configuration

{
  "mcpServers": {
    "stock": {
      "command": "python",
      "args": [
        "C:\\MCP_Claude\\StockMCP\\server.py"
      ]
    }
  }
}

Restart Claude Desktop.

Test

Ask Claude:

What is the current price of TSLA?

If the setup is successful, Claude will call StockMCP to retrieve stock data.

Cursor Configuration

Same configuration as Claude Desktop.

Available Tools

  • stock_price()

  • company_info()

  • market_cap()

  • pe_ratio()

  • ps_ratio()

  • financials()

  • option_chain()

  • news()

Roadmap

  • v0.1 — Stock price

  • v0.2 — Company Information

  • v0.3 — Financial Statements

  • v0.4 — Options

  • v1.0 — AI Stock Analysis

Topics

mcp claude cursor stock finance ai python yfinance

A
license - permissive license
-
quality - not tested
C
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/guobo2421-ui/StockMCP'

If you have feedback or need assistance with the MCP directory API, please join our Discord server