- Home
- MCP servers
- Trading
Trading
- python
0
GitHub Stars
python
Language
6 months ago
First Indexed
3 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"vaishnavik23-trading-mcp-server": {
"command": "uv",
"args": [
"run",
"--python",
"/full/path/to/.venv/bin/python",
"--with",
"mcp[cli]",
"mcp",
"run",
"trader_tools.py"
]
}
}
}You can run a Python-based MCP server that fetches live stock prices from Yahoo Finance and exposes trading commands through Claude’s MCP interface. This setup lets you query real-time quotes and issue trading-related commands directly from Claude, enabling streamlined market interaction with minimal manual steps.
How to use
Connect your Claude MCP client to the Trading MCP Server to start querying live prices. You can ask for the latest price of a ticker like AAPL, and Claude will relay the current quote by contacting the MCP server you'll run locally or remotely. You can also extend the server to add signals, historical analyses, and additional trading features as you expand your setup.
How to install
Prerequisites: ensure you have a working Python environment and the UV tool for dependency management.
# Install uv if not already installed
brew install uv
# Navigate to the project directory
# (Replace this with your actual project path)
cd MCPtrading
# Install dependencies
uv pip install -r requirements.txt
# (Optional) Add packages
uv add yfinance
Additional setup and configuration
Run the MCP server using UV with the Python environment and the MCP CLI integration. This starts the Trading server so Claude can communicate with it for price lookups and command handling.
uv run --python .venv/bin/python --with "mcp[cli]" mcp run trader_tools.py
Optional Claude config example
If you prefer to configure the MCP server as an explicit stdio server entry, use the following shape.
{
"type": "stdio",
"name": "trading",
"command": "uv",
"args": [
"run",
"--python",
"/full/path/to/.venv/bin/python",
"--with",
"mcp[cli]",
"mcp",
"run",
"trader_tools.py"
]
}
Notes and tips
- Use the same Python virtual environment across commands to ensure compatibility with dependencies.
- You can extend the server with additional trading signals and historical analyses as your needs grow.
Available tools
get_price
Fetches real-time stock price for a given ticker via Yahoo Finance, enabling price queries through Claude MCP.
trade_command_interface
Provides an interface to issue trading-related commands via Claude MCP, enabling market interactions and tool extensions.