Skip to content

lyzetam/mcp-tradier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcp-tradier

License: MIT

Tradier trading API as a Python library, LangChain tools, and MCP server.

Features

  • 16 LangChain tools for use with LangChain/LangGraph agents
  • 16 MCP tools for use with Claude Code and other MCP clients
  • Modular operations layer usable as a standalone Python library
  • Covers Market Data, Account, Orders, and Watchlists

MCP Tools

Category Tools
Market Data get_quotes, get_option_chain, get_option_expirations, get_historical_prices, search_symbols
Account get_account_balance, get_positions, get_orders, get_order
Orders place_equity_order, place_option_order, cancel_order, modify_order
Watchlists get_watchlists, create_watchlist, add_to_watchlist

LangChain Tools

Category Tools
Market Data tradier_quotes, tradier_option_chain, tradier_option_expirations, tradier_historical, tradier_search
Account tradier_balance, tradier_positions, tradier_orders, tradier_order
Orders tradier_place_equity, tradier_place_option, tradier_cancel, tradier_modify
Watchlists tradier_watchlists, tradier_create_watchlist, tradier_add_to_watchlist

Installation

# Core library only (httpx)
pip install .

# With MCP server support
pip install ".[mcp]"

# With LangChain tools
pip install ".[langchain]"

# Everything
pip install ".[all]"

Configuration

All settings are read from environment variables with the TRADIER_ prefix, or from a .env file.

Variable Description Default
TRADIER_API_KEY Tradier API key ""
TRADIER_ACCOUNT_ID Tradier account ID ""
TRADIER_BASE_URL Tradier API base URL https://api.tradier.com

Quick Start

As a Python library

from mcp_tradier.client import TradierClient
from mcp_tradier.operations import market_data, account

client = TradierClient()
quotes = market_data.get_quotes(client, "AAPL,GOOGL")
positions = account.get_positions(client)

As LangChain tools

from mcp_tradier.langchain_tools import TOOLS

# Use with a LangChain agent
agent = create_react_agent(llm, TOOLS)

As an MCP server

mcp-tradier

.env example

TRADIER_API_KEY=your-api-key
TRADIER_ACCOUNT_ID=your-account-id
TRADIER_BASE_URL=https://sandbox.tradier.com

License

MIT

About

MCP server and LangChain tools for Tradier (quotes, options, orders, positions)

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors