Indonesian Stock Analysis MCP Server
Provides Indonesian stock (IDX) analysis tools for Claude Code, enabling real-time stock data, technical and fundamental analysis, and buy/sell recommendations.
README
Indonesian Stock Analysis MCP Server
An MCP (Model Context Protocol) server that provides Indonesian stock (IDX) analysis tools for Claude Code. Ask Claude Code questions about stocks and get real-time analysis with buy/sell recommendations.
Features
- Real-time Stock Data: Current prices, historical data for all IDX stocks
- Technical Analysis: RSI, MACD, Moving Averages, Bollinger Bands
- Fundamental Analysis: P/E, P/B, ROE, EPS, Dividend Yield, and more
- Market Movers: Track top gainers and losers from IDX30
- Smart Logging: All recommendations saved to logs/ for tracking
- Seamless Integration: Works directly in Claude Code - just ask questions!
Quick Start
1. Install Dependencies
cd /Users/antariksa/Project/stock_ai_agent
pip install -r requirements.txt
2. Configure Claude Code
Add to your MCP settings file (~/.config/claude-code/mcp_settings.json or Claude Desktop config):
{
"mcpServers": {
"idx-stock-analysis": {
"command": "python",
"args": ["-m", "src.mcp_server"],
"cwd": "/Users/antariksa/Project/stock_ai_agent"
}
}
}
Important: Update the cwd path to match your actual project location!
3. Restart Claude Code
Restart Claude Code to load the MCP server.
4. Start Analyzing!
Ask Claude Code questions like:
- "What's the current price of BBCA?"
- "Analyze BBRI technical indicators"
- "Should I buy TLKM right now?"
- "Show me today's top market movers"
- "Compare BBCA and BMRI fundamentals"
MCP Tools Available
The server provides 7 tools that Claude Code can use:
- get_stock_price - Current price and basic info
- get_historical_data - Historical OHLCV data
- get_technical_indicators - RSI, MACD, MA, Bollinger Bands
- get_fundamentals - P/E, P/B, ROE, margins, etc.
- get_market_movers - Top gainers/losers from IDX30
- log_recommendation - Save buy/sell decisions
- get_recommendation_history - Review past recommendations
Market Hours
Indonesian Stock Exchange (IDX) - Western Indonesia Time (WIB):
- Pre-open: 08:45-09:00
- Session 1: 09:00-12:00
- Break: 12:00-13:30
- Session 2: 13:30-16:00
Best used during trading hours for real-time decisions.
Documentation
- QUICKSTART.md - Get started in 5 minutes! ⚡
- SETUP.md - Detailed installation and troubleshooting
- EXAMPLES.md - Example conversations and use cases
- requirements.txt - Python dependencies
Project Structure
stock_ai_agent/
├── src/
│ └── mcp_server.py # Main MCP server with 7 stock analysis tools
├── logs/ # Auto-generated recommendation logs
│ └── recommendations_*.jsonl
├── QUICKSTART.md # 5-minute setup guide
├── SETUP.md # Detailed setup instructions
├── EXAMPLES.md # Usage examples and sample queries
├── requirements.txt # Python dependencies
├── pyproject.toml # Project configuration
├── test_server.py # Test suite
└── setup_env.sh # Automated environment setup
How It Works
- MCP Server (
src/mcp_server.py): Exposes 7 tools via Model Context Protocol - Claude Code: Automatically calls these tools when you ask stock questions
- Data Source: Yahoo Finance (yfinance) - free, real-time Indonesian stock data
- Analysis: Technical indicators (ta library) + fundamental data
- Logging: All recommendations saved to
logs/directory
Popular Indonesian Stocks
| Sector | Stocks |
|---|---|
| Banking | BBCA, BBRI, BMRI, BBNI |
| Telecom | TLKM, EXCL |
| Consumer | UNVR, INDF, ICBP |
| Auto | ASII, UNTR |
| Mining | ADRO, PTBA, ANTM |
| Cement | SMGR, INTP |
Contributing
Found a bug or want to add features?
- Fork the repository
- Make your changes
- Submit a pull request
Ideas for enhancements:
- Add more Indonesian stock data sources (Stockbit API, IDX API)
- Implement portfolio tracking and P&L calculation
- Add news sentiment analysis
- Create automated hourly alerts during market hours
- Backtesting framework for recommendations
License
MIT License
stock_mcp
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.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
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.