taxfolio-mcp
Enables tax-loss harvesting and tax-aware portfolio rebalancing via LLM agents, allowing users to identify selling opportunities and substitute holdings based on return correlation.
README
taxfolio-mcp
MCP server for taxfolio — tax-loss harvesting via LLM agents.
Tools
harvest_losses
Find tax-loss harvesting opportunities. Sells losers, buys same-industry substitutes ranked by return correlation.
Input:
{
"holdings": [
{"ticker": "INTC", "shares": 200, "cost_basis": 45.0, "acquired": "2024-06-01"},
{"ticker": "NVDA", "shares": 50, "cost_basis": 130.0, "acquired": "2024-06-01"}
],
"min_loss_pct": 5.0,
"min_correlation": 0.5
}
Output:
{
"summary": {"positions_harvested": 1, "total_loss_harvested": -4600.0, "total_tax_benefit": 1702.0},
"trades": [{"sell_ticker": "INTC", "sell_shares": 200, "buy_ticker": "MU", "correlation": 0.48}],
"warnings": [],
"limitations": ["Market data from yfinance", "Not tax advice"]
}
optimize
Tax-aware portfolio rebalancing via C++20 QP solver.
Install
# Requires taxfolio to be installed first
# See: https://github.com/ajtgjmdjp/taxfolio
uv pip install taxfolio-mcp
Usage with Claude Desktop
Add to ~/.config/claude/claude_desktop_config.json:
{
"mcpServers": {
"taxfolio": {
"command": "taxfolio-mcp"
}
}
}
Then ask Claude:
"Find tax-loss harvesting opportunities in my portfolio: INTC 200 shares bought at $45, NVDA 50 shares bought at $130, PFE 300 shares bought at $35"
Limitations
- Market data fetched via yfinance (may be delayed or unavailable)
- Substitute matching is heuristic (industry group + return correlation)
- Maximum 100 holdings per request
- Not tax advice — consult a tax professional before executing trades
License
Recommended Servers
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.
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.
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.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
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.
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.
Neon Database
MCP server for interacting with Neon Management API and databases
E2B
Using MCP to run code via e2b.
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.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.