AI-powered MCP server for value investors. Analyze stocks using principles from Benjamin Graham and Warren Buffett.
npm install value-investing-agentjson
{
"mcpServers": {
"value-investing-agent": {
"command": "npx",
"args": ["-y", "value-investing-agent"]
}
}
}
`
#### Option 2: Global Install
`bash
npm install -g value-investing-agent
`
Configure MCP:
`json
{
"mcpServers": {
"value-investing-agent": {
"command": "value-investing-agent"
}
}
}
`
#### Option 3: From Source
`bash
git clone https://github.com/danielchu97/Value-Investing-Agent.git
cd Value-Investing-Agent
npm install
npm run build
`
Configure MCP:
`json
{
"mcpServers": {
"value-investing-agent": {
"command": "node",
"args": ["/path/to/value-investing-agent/dist/index.js"]
}
}
}
`
$3
Claude Desktop:
- macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
- Windows: %APPDATA%\Claude\claude_desktop_config.json
Usage
$3
`
"Get me the current quote for Apple"
"What's the price of MSFT?"
`
$3
`
"Calculate the intrinsic value of AAPL"
"What is Amazon's fair value using DCF?"
`
$3
`
"Analyze the competitive moat of Coca-Cola"
"Does Microsoft have a wide moat?"
`
$3
`
"Add GOOGL to my watchlist in the Technology group"
"Show my watchlist"
"Remove TSLA from watchlist"
`
$3
`
"Generate a daily report for my watchlist"
"Create a detailed analysis report for Berkshire Hathaway"
`
Available Tools
| Tool | Description |
|------|-------------|
| get_stock_quote | Get real-time stock quote and metrics |
| get_financials | Fetch financial statements (income, balance, cash flow) |
| calculate_intrinsic_value | DCF and Graham valuation with margin of safety |
| analyze_moat | Evaluate competitive advantages |
| get_news | Get stock-related news articles |
| manage_watchlist | Manage your personal stock watchlist |
| generate_daily_report | Daily summary of watchlist stocks |
| generate_stock_report | Comprehensive value investing analysis |
| set_provider | Switch data provider |
| list_providers | List available data providers |
Data Providers
The plugin architecture allows you to add your own data sources. See Custom Provider Guide.
$3
| Provider | API Key | Rate Limit | Best For |
|----------|---------|------------|----------|
| yahoo-finance (default) | Not required | Limited (may hit 429 errors) | Quick testing |
| finnhub | Required (free) | 60 calls/min | Production use |
| alpha-vantage | Required (free) | 5 calls/min | Basic data needs |
$3
Finnhub (Recommended for reliable access):
1. Get free API key at finnhub.io/register
2. Set environment variable:
`bash
export FINNHUB_API_KEY=your_api_key_here
`
Or in Claude Desktop config:
`json
{
"mcpServers": {
"value-investing-agent": {
"command": "npx",
"args": ["-y", "value-investing-agent"],
"env": {
"FINNHUB_API_KEY": "your_api_key_here"
}
}
}
}
`
Alpha Vantage:
1. Get free API key at alphavantage.co
2. Set environment variable: ALPHA_VANTAGE_API_KEY=your_key
$3
`
"Switch to finnhub provider"
"Use alpha-vantage for data"
"List available providers"
`
$3
1. Copy src/providers/provider-template.ts
2. Implement the DataProvider interface
3. Register in src/providers/index.ts
`typescript
import { MyProvider } from './my-provider';
registerProvider('my-provider', (config) => new MyProvider(config));
`
Value Investing Principles
This tool is built on timeless investment principles:
$3
A company's true worth based on future cash flows, not market price.
$3
Buy only when price is significantly below intrinsic value (25%+ discount).
$3
Seek durable competitive advantages that protect profits.
$3
Only invest in businesses you understand.
$3
Use market emotions as opportunities, don't be ruled by them.
Key Metrics
$3
- P/E Ratio: < 15 (undervalued)
- P/B Ratio: < 1.5 (undervalued)
- Graham Number: Price ceiling for defensive investors
$3
- ROE: > 15% (excellent)
- Gross Margin: > 40% (pricing power)
- Net Margin: > 10% (efficient)
$3
- Current Ratio: > 1.5 (liquid)
- Debt/Equity: < 1.0 (conservative)
- Interest Coverage: > 5x (safe)
Development
`bash
Install dependencies
npm install
Build
npm run build
Development mode (watch)
npm run dev
Run tests
npm test
Lint
npm run lint
`
Project Structure
`
value-investing-agent/
āāā src/
ā āāā index.ts # Entry point
ā āāā server.ts # MCP server
ā āāā providers/ # Data providers
ā āāā tools/ # MCP tools
ā āāā analysis/ # Analysis engine
ā āāā utils/ # Utilities
ā āāā config/ # Configuration
ā āāā types/ # TypeScript types
āāā skills/ # Claude skills
āāā data/ # Local data (watchlist, cache)
āāā docs/ # Documentation
āāā tests/ # Test files
``