Trading MCP Server
An intelligent trading assistant that fetches live stock prices using the Yahoo Finance API.
Trading-MCP-Server
An intelligent trading assistant that integrates with the Claude AI MCP (Model Context Protocol) platform. This tool fetches live stock prices using Yahoo Finance and enables seamless command-based interaction with the market via Claude's agent interface.
๐ Features
- ๐ Fetches real-time (or near real-time) stock prices using Yahoo Finance
- ๐ค Connects to Claude MCP as a server with custom trading commands
- ๐ Built using Python with support for virtual environments and
uvfor dependency management - โ๏ธ Supports modular expansion to include trading signals, historical analysis, and more
๐ง Architecture
- Claude AI MCP Integration: Uses
mcp[cli]to expose a server interface to Claude. - Yahoo Finance API: For retrieving stock data (via
yfinance). - Virtual Environment: Managed using
uvfor fast and deterministic builds.
๐ฆ Setup
# Install uv if not already installed
brew install uv
# Navigate to the project directory
cd MCPtrading
# Install dependencies
uv pip install -r requirements.txt
# (Optional) Add packages
uv add yfinance
๐โโ๏ธ Running the Server
Make sure to use the correct Python environment:
uv run --python .venv/bin/python --with "mcp[cli]" mcp run trader_tools.py
Or update your Claude config:
{
"mcpServers": {
"Trading": {
"command": "/Users/yourname/.local/bin/uv",
"args": [
"run",
"--python",
"/full/path/to/.venv/bin/python",
"--with",
"mcp[cli]",
"mcp",
"run",
"trader_tools.py"
]
}
}
}
๐งช Example Usage
Ask Claude:
"What's the latest price of AAPL?"
Claude will call the MCP server and respond with the current stock price.
Related Servers
Coin Flip MCP Server
Generates true random coin flips using the random.org API.
Sequential Ethical Thinking
A tool for structured, step-by-step ethical reasoning using multiple moral frameworks for transparent deliberation.
NBA MCP Server
Provides NBA statistics and live game data using the Model Context Protocol (MCP).
Loxone MCP Server
An MCP server for Loxone home automation systems, allowing AI assistants to control lights, blinds, sensors, and weather.
Devices MCP Server
An MCP server for controlling and monitoring peripheral devices connected to your computer, such as cameras and microphones.
TechMCP
Integrates with PSG College of Technology's e-campus portal to provide AI assistants access to student academic data like marks, attendance, and timetables.
Manifold Markets
Interact with Manifold Markets prediction markets, including market creation, trading, and liquidity management.
Weather
Provides real-time weather data, forecasts, and alerts using the OpenWeatherMap API.
Mnemex
Mnemex is a Python MCP server that provides AI assistants with human-like memory dynamics through temporal decay and natural spaced repetition, storing memories locally in human-readable JSONL and Markdown formats.
Obenan Review Analyzer
An MCP server for analyzing product or service reviews.