{"_id":"@baguskto/saham","_rev":"6-80f7a20465801dc66850b54ffeb270f2","name":"@baguskto/saham","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"@baguskto/saham","version":"1.0.0","keywords":["mcp","saham","stock","indonesia","idx","finance","typescript","yahoo-finance","model-context-protocol","claude","ai","technical-analysis","cli","baguskto"],"author":{"name":"Bagus Kertoto","email":"baguskto@gmail.com"},"license":"MIT","_id":"@baguskto/saham@1.0.0","maintainers":[{"name":"baguskto7","email":"baguskto@gmail.com"}],"homepage":"https://github.com/baguskto/saham#readme","bugs":{"url":"https://github.com/baguskto/saham/issues"},"bin":{"baguskto-saham":"dist/cli.js"},"dist":{"shasum":"aa8fafe884e37fa9cd202a3a2fb5cdf86cf0c815","tarball":"https://registry.npmjs.org/@baguskto/saham/-/saham-1.0.0.tgz","fileCount":70,"integrity":"sha512-QBsp0gI22chDoGz9NqkI31GVn6O26TKpbO+J+h06SWlNn2jTUGuT/86qkVD3AyOF16DwR1oZe1slnV/anem8Jw==","signatures":[{"sig":"MEUCICehR/uV83PxUVRzDfUF7xKSC27g9HjGBnNpcFmQCYtYAiEA2bbJ5VxAzQy3y/DY0wVTIxTsGI+hplHqlRQR3N/9Zpc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":286822},"main":"dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"ts-node src/cli.ts","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","start":"node dist/cli.js","prepare":"npm run build","lint:fix":"eslint src/**/*.ts --fix","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"baguskto7","email":"baguskto@gmail.com"},"repository":{"url":"git+https://github.com/baguskto/saham.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP Server untuk data saham Indonesia (IDX) - Implementasi Node.js/TypeScript","directories":{},"_nodeVersion":"22.11.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.0","cheerio":"^1.0.0-rc.12","winston":"^3.11.0","commander":"^11.1.0","node-cache":"^5.1.2","yahoo-finance2":"^2.11.3","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.54.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","ts-node":"^10.9.0","typescript":"^5.3.0","@types/jest":"^29.5.8","@types/node":"^20.10.0","@typescript-eslint/parser":"^6.13.0","@typescript-eslint/eslint-plugin":"^6.13.0"},"_npmOperationalInternal":{"tmp":"tmp/saham_1.0.0_1755450280877_0.19724955144020107","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@baguskto/saham","version":"1.0.1","keywords":["mcp","saham","stock","indonesia","idx","finance","typescript","yahoo-finance","model-context-protocol","claude","ai","technical-analysis","cli","baguskto"],"author":{"name":"Bagus Kertoto","email":"baguskto@gmail.com"},"license":"MIT","_id":"@baguskto/saham@1.0.1","maintainers":[{"name":"baguskto7","email":"baguskto@gmail.com"}],"homepage":"https://github.com/baguskto/saham#readme","bugs":{"url":"https://github.com/baguskto/saham/issues"},"bin":{"baguskto-saham":"dist/cli.js"},"dist":{"shasum":"57c42df754887a9c7d4a1e254ae5543e4bd2a9c8","tarball":"https://registry.npmjs.org/@baguskto/saham/-/saham-1.0.1.tgz","fileCount":70,"integrity":"sha512-AViLYsaU9XoBD54vA3lElyvemM3mFeMsFjLdAETMSZxfqK3w/CngmyuRejIKRo40b5PO4kJla+GkiqDCQtdgxg==","signatures":[{"sig":"MEQCIEaGhMwMnV1PHawZEyWRmP068QNU0GR6ExVMCUPzsKn3AiB8YSPaNsuvwSrNS2qWT+exXDqQBoVQ9SsbgMZOoGuKDg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":286826},"main":"dist/mcp-entry.js","types":"./dist/mcp-entry.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"ts-node src/cli.ts","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","start":"node dist/cli.js","prepare":"npm run build","lint:fix":"eslint src/**/*.ts --fix","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"baguskto7","email":"baguskto@gmail.com"},"repository":{"url":"git+https://github.com/baguskto/saham.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP Server untuk data saham Indonesia (IDX) - Implementasi Node.js/TypeScript","directories":{},"_nodeVersion":"22.11.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.0","cheerio":"^1.0.0-rc.12","winston":"^3.11.0","commander":"^11.1.0","node-cache":"^5.1.2","yahoo-finance2":"^2.11.3","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.54.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","ts-node":"^10.9.0","typescript":"^5.3.0","@types/jest":"^29.5.8","@types/node":"^20.10.0","@typescript-eslint/parser":"^6.13.0","@typescript-eslint/eslint-plugin":"^6.13.0"},"_npmOperationalInternal":{"tmp":"tmp/saham_1.0.1_1755450450696_0.5339267411647044","host":"s3://npm-registry-packages-npm-production"}},"1.0.2":{"name":"@baguskto/saham","version":"1.0.2","keywords":["mcp","saham","stock","indonesia","idx","finance","typescript","yahoo-finance","model-context-protocol","claude","ai","technical-analysis","cli","baguskto"],"author":{"name":"Bagus Kertoto","email":"baguskto@gmail.com"},"license":"MIT","_id":"@baguskto/saham@1.0.2","maintainers":[{"name":"baguskto7","email":"baguskto@gmail.com"}],"homepage":"https://github.com/baguskto/saham#readme","bugs":{"url":"https://github.com/baguskto/saham/issues"},"bin":{"baguskto-saham":"dist/cli.js"},"dist":{"shasum":"e03cb577544588e1838fea0c29a92b30da3d42f3","tarball":"https://registry.npmjs.org/@baguskto/saham/-/saham-1.0.2.tgz","fileCount":70,"integrity":"sha512-Bj0543TlOtz2UfP8BFIyFR+Gtgs++5JrUq3ggBcn+rpKkT6R2E3BAFsiyvFR+YSER84cBOte6tN3ntUsrG917w==","signatures":[{"sig":"MEUCIQCjwOt9DVmIyUDbZL3DH2FwN0WTmmA/pFttChkZbReGsAIgR7RtVHbJrz6+xNV18yfQGSGTrcS0Uc4L8EKqSt54YuA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":289123},"main":"dist/mcp-entry.js","types":"./dist/mcp-entry.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"ts-node src/cli.ts","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","start":"node dist/cli.js","prepare":"npm run build","lint:fix":"eslint src/**/*.ts --fix","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"baguskto7","email":"baguskto@gmail.com"},"repository":{"url":"git+https://github.com/baguskto/saham.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP Server untuk data saham Indonesia (IDX) - Implementasi Node.js/TypeScript","directories":{},"_nodeVersion":"22.11.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.0","cheerio":"^1.0.0-rc.12","winston":"^3.11.0","commander":"^11.1.0","node-cache":"^5.1.2","yahoo-finance2":"^2.11.3","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.54.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","ts-node":"^10.9.0","typescript":"^5.3.0","@types/jest":"^29.5.8","@types/node":"^20.10.0","@typescript-eslint/parser":"^6.13.0","@typescript-eslint/eslint-plugin":"^6.13.0"},"_npmOperationalInternal":{"tmp":"tmp/saham_1.0.2_1755450999585_0.07512180470773444","host":"s3://npm-registry-packages-npm-production"}},"1.0.3":{"name":"@baguskto/saham","version":"1.0.3","keywords":["mcp","saham","stock","indonesia","idx","finance","typescript","yahoo-finance","model-context-protocol","claude","ai","technical-analysis","cli","baguskto"],"author":{"name":"Bagus Kertoto","email":"baguskto@gmail.com"},"license":"MIT","_id":"@baguskto/saham@1.0.3","maintainers":[{"name":"baguskto7","email":"baguskto@gmail.com"}],"homepage":"https://github.com/baguskto/saham#readme","bugs":{"url":"https://github.com/baguskto/saham/issues"},"bin":{"baguskto-saham":"dist/cli.js"},"dist":{"shasum":"6f4cf2a4c1050eeb3c338079b6a02f171663ab7b","tarball":"https://registry.npmjs.org/@baguskto/saham/-/saham-1.0.3.tgz","fileCount":70,"integrity":"sha512-dNljrfA9voNrmAgUDpB8v75koGtQnRzVTThN8I1ONXxX1HGZG7RG60o2erpZx9dbCCcdF5LIvkzOdudXCQa3BQ==","signatures":[{"sig":"MEUCIQCXIu7Z8HMKidu3geZ9R7VZj9nfGaQIUP27IvlOWmagXQIgcSQHXbVVlvgwqRy6s83Ka5hFYV1l4d8S00N2L983LCg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":289296},"main":"dist/mcp-entry.js","types":"./dist/mcp-entry.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"ts-node src/cli.ts","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","start":"node dist/cli.js","prepare":"npm run build","lint:fix":"eslint src/**/*.ts --fix","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"baguskto7","email":"baguskto@gmail.com"},"repository":{"url":"git+https://github.com/baguskto/saham.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP Server untuk data saham Indonesia (IDX) - Implementasi Node.js/TypeScript","directories":{},"_nodeVersion":"22.11.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.0","cheerio":"^1.0.0-rc.12","winston":"^3.11.0","commander":"^11.1.0","node-cache":"^5.1.2","yahoo-finance2":"^2.11.3","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.54.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","ts-node":"^10.9.0","typescript":"^5.3.0","@types/jest":"^29.5.8","@types/node":"^20.10.0","@typescript-eslint/parser":"^6.13.0","@typescript-eslint/eslint-plugin":"^6.13.0"},"_npmOperationalInternal":{"tmp":"tmp/saham_1.0.3_1755537694971_0.27157204244661104","host":"s3://npm-registry-packages-npm-production"}},"1.0.4":{"name":"@baguskto/saham","version":"1.0.4","keywords":["mcp","saham","stock","indonesia","idx","finance","typescript","yahoo-finance","model-context-protocol","claude","ai","technical-analysis","cli","baguskto"],"author":{"name":"Bagus Kertoto","email":"baguskto@gmail.com"},"license":"MIT","_id":"@baguskto/saham@1.0.4","maintainers":[{"name":"baguskto7","email":"baguskto@gmail.com"}],"homepage":"https://github.com/baguskto/saham#readme","bugs":{"url":"https://github.com/baguskto/saham/issues"},"bin":{"baguskto-saham":"dist/cli.js"},"dist":{"shasum":"773002caeae6965e4f1848244e802adf15b4efc1","tarball":"https://registry.npmjs.org/@baguskto/saham/-/saham-1.0.4.tgz","fileCount":70,"integrity":"sha512-CB6zQ1BITRJznu0mth9eN05Hb3HOOaA91BC67XxC8wemwOQdJ1hwjOYfEsvNqhcGN/QNXCMTx0BQdBcAoXAh7Q==","signatures":[{"sig":"MEUCIQCkb0OQ+AO2z68L6OG+dH8iQLpfKSh1ClG21J2pMkk4ugIgHlBzj496qYmvt8EiGepqJWO4QmuCYJ62JAPNO6tzZoo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":291277},"main":"dist/mcp-entry.js","types":"./dist/mcp-entry.d.ts","engines":{"node":">=18.0.0"},"scripts":{"dev":"ts-node src/cli.ts","lint":"eslint src/**/*.ts","test":"jest","build":"tsc","clean":"rimraf dist","start":"node dist/cli.js","prepare":"npm run build","lint:fix":"eslint src/**/*.ts --fix","prepublishOnly":"npm run clean && npm run build"},"_npmUser":{"name":"baguskto7","email":"baguskto@gmail.com"},"repository":{"url":"git+https://github.com/baguskto/saham.git","type":"git"},"_npmVersion":"10.9.0","description":"MCP Server untuk data saham Indonesia (IDX) - Implementasi Node.js/TypeScript","directories":{},"_nodeVersion":"22.11.0","dependencies":{"zod":"^3.22.4","axios":"^1.6.0","cheerio":"^1.0.0-rc.12","winston":"^3.11.0","commander":"^11.1.0","node-cache":"^5.1.2","yahoo-finance2":"^2.11.3","@modelcontextprotocol/sdk":"^1.0.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^29.7.0","eslint":"^8.54.0","rimraf":"^5.0.5","ts-jest":"^29.1.1","ts-node":"^10.9.0","typescript":"^5.3.0","@types/jest":"^29.5.8","@types/node":"^20.10.0","@typescript-eslint/parser":"^6.13.0","@typescript-eslint/eslint-plugin":"^6.13.0"},"_npmOperationalInternal":{"tmp":"tmp/saham_1.0.4_1755549112605_0.5166602546180921","host":"s3://npm-registry-packages-npm-production"}},"1.0.5":{"name":"@baguskto/saham","version":"1.0.5","description":"MCP Server untuk data saham Indonesia (IDX) - Implementasi Node.js/TypeScript","main":"dist/mcp-entry.js","bin":{"baguskto-saham":"dist/cli.js"},"scripts":{"build":"tsc","start":"node dist/cli.js","dev":"ts-node src/cli.ts","test":"jest","lint":"eslint src/**/*.ts","lint:fix":"eslint src/**/*.ts --fix","clean":"rimraf dist","prepare":"npm run build","prepublishOnly":"npm run clean && npm run build"},"keywords":["mcp","saham","stock","indonesia","idx","finance","typescript","yahoo-finance","model-context-protocol","claude","ai","technical-analysis","cli","baguskto"],"author":{"name":"Bagus Kertoto","email":"baguskto@gmail.com"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/baguskto/saham.git"},"homepage":"https://github.com/baguskto/saham#readme","bugs":{"url":"https://github.com/baguskto/saham/issues"},"engines":{"node":">=18.0.0"},"dependencies":{"@modelcontextprotocol/sdk":"^1.0.0","yahoo-finance2":"^2.11.3","axios":"^1.6.0","cheerio":"^1.0.0-rc.12","node-cache":"^5.1.2","winston":"^3.11.0","commander":"^11.1.0","zod":"^3.22.4"},"devDependencies":{"@types/node":"^20.10.0","@typescript-eslint/eslint-plugin":"^6.13.0","@typescript-eslint/parser":"^6.13.0","eslint":"^8.54.0","jest":"^29.7.0","@types/jest":"^29.5.8","ts-jest":"^29.1.1","ts-node":"^10.9.0","typescript":"^5.3.0","rimraf":"^5.0.5"},"publishConfig":{"access":"public"},"_id":"@baguskto/saham@1.0.5","gitHead":"5b581ca86db5ff3879e6380bc606dc6bfd7b638b","types":"./dist/mcp-entry.d.ts","_nodeVersion":"22.11.0","_npmVersion":"10.9.0","dist":{"integrity":"sha512-rii7Mlzg/kxyoGuJj1148b1NWUUvjzSv2IfC2ubPbBuOeq5OuIQjmWqCIMjpXTa6GPMaB+7jYNoq0yS3QF7G0Q==","shasum":"cd6ec5e459711ead3c495b32c90a1aa9756cfb56","tarball":"https://registry.npmjs.org/@baguskto/saham/-/saham-1.0.5.tgz","fileCount":84,"unpackedSize":1315021,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEWrnLLJeYUrIAxtFeU1NizvseqPPaPdlBBKAYANgLCYAiEA978qrbr8MA4PpEYcg/ECYPmCNkOyDHPp9n95IM8uYnw="}]},"_npmUser":{"name":"baguskto7","email":"baguskto@gmail.com"},"directories":{},"maintainers":[{"name":"baguskto7","email":"baguskto@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/saham_1.0.5_1755575791426_0.8837998267543432"},"_hasShrinkwrap":false}},"time":{"created":"2025-08-17T17:04:40.753Z","modified":"2025-08-19T03:56:31.855Z","1.0.0":"2025-08-17T17:04:41.051Z","1.0.1":"2025-08-17T17:07:30.935Z","1.0.2":"2025-08-17T17:16:39.827Z","1.0.3":"2025-08-18T17:21:35.178Z","1.0.4":"2025-08-18T20:31:52.826Z","1.0.5":"2025-08-19T03:56:31.649Z"},"bugs":{"url":"https://github.com/baguskto/saham/issues"},"author":{"name":"Bagus Kertoto","email":"baguskto@gmail.com"},"license":"MIT","homepage":"https://github.com/baguskto/saham#readme","keywords":["mcp","saham","stock","indonesia","idx","finance","typescript","yahoo-finance","model-context-protocol","claude","ai","technical-analysis","cli","baguskto"],"repository":{"type":"git","url":"git+https://github.com/baguskto/saham.git"},"description":"MCP Server untuk data saham Indonesia (IDX) - Implementasi Node.js/TypeScript","maintainers":[{"name":"baguskto7","email":"baguskto@gmail.com"}],"readme":"# Baguskto Saham - MCP Server untuk Data Saham Indonesia\n\n![Version](https://img.shields.io/badge/version-1.0.0-blue.svg)\n![Node](https://img.shields.io/badge/node-%3E%3D18.0.0-green.svg)\n![TypeScript](https://img.shields.io/badge/TypeScript-5.3.0-blue.svg)\n![License](https://img.shields.io/badge/license-MIT-green.svg)\n\nMCP Server untuk mengakses data Bursa Efek Indonesia (IDX). Dibangun dengan Node.js dan TypeScript, server ini memungkinkan AI assistant untuk mengambil informasi saham real-time, ringkasan pasar, data historis, dan performa sektor.\n\n## Features\n\n- 🏢 **Market Overview**: IHSG index, trading volume, top gainers/losers\n- 📈 **Stock Information**: Real-time prices, volume, market cap, ratios\n- 📊 **Historical Data**: OHLCV data for multiple time periods with technical analysis\n- 🏭 **Sector Performance**: Performance analysis across IDX sectors\n- 🔍 **Stock Search**: Find stocks by ticker or company name\n- 📈 **Stock Analysis**: Complete technical analysis with 15+ indicators\n- ⚖️ **Stock Comparison**: Compare multiple stocks performance\n- 📚 **Dataset Management**: Access to comprehensive historical dataset\n- ⚡ **High Performance**: In-memory caching with configurable TTL\n- 🔧 **Multiple Data Sources**: Yahoo Finance with web scraping fallback\n- 🛡️ **Type Safety**: Full TypeScript implementation with Zod validation\n\n## Quick Start\n\n### Instalasi dan Penggunaan dengan npx\n\nCara termudah menggunakan Baguskto Saham adalah dengan `npx`:\n\n```bash\n# Jalankan langsung dengan npx (otomatis install dan run)\nnpx @baguskto/saham\n\n# Test server\nnpx @baguskto/saham test\n\n# Lihat statistik\nnpx @baguskto/saham stats\n\n# Bersihkan cache\nnpx @baguskto/saham clear-cache\n```\n\n### Instalasi sebagai Dependency\n\n```bash\n# npm\nnpm install @baguskto/saham\n\n# yarn\nyarn add @baguskto/saham\n\n# pnpm\npnpm add @baguskto/saham\n```\n\n### Local Development\n\n```bash\n# Clone the repository\ngit clone https://github.com/baguskto/saham.git\ncd saham\n\n# Install dependencies\nnpm install\n\n# Build the project\nnpm run build\n\n# Run in development mode\nnpm run dev\n\n# Run tests\nnpm test\n```\n\n## MCP Tools\n\nThe server provides 9 comprehensive MCP tools:\n\n### 1. get_market_overview\n\nGet Indonesian stock market overview including IHSG index.\n\n```json\n{\n  \"name\": \"get_market_overview\",\n  \"arguments\": {}\n}\n```\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"ihsgValue\": 7234.56,\n    \"ihsgChange\": 45.23,\n    \"ihsgChangePercent\": 0.63,\n    \"tradingVolume\": 12300000000,\n    \"tradingValue\": 8700000000000,\n    \"marketStatus\": \"open\",\n    \"topGainers\": [\n      {\"ticker\": \"ADRO\", \"name\": \"Adaro Energy\", \"price\": 2840, \"changePercent\": 6.8}\n    ],\n    \"topLosers\": [\n      {\"ticker\": \"EMTK\", \"name\": \"Elang Mahkota\", \"price\": 156, \"changePercent\": -3.2}\n    ],\n    \"lastUpdated\": \"2025-01-15T08:30:00.000Z\"\n  },\n  \"source\": \"live\",\n  \"responseTime\": 1250\n}\n```\n\n### 2. get_stock_info\n\nGet detailed information for a specific Indonesian stock.\n\n```json\n{\n  \"name\": \"get_stock_info\",\n  \"arguments\": {\n    \"ticker\": \"BBCA\"\n  }\n}\n```\n\n**Response:**\n```json\n{\n  \"success\": true,\n  \"data\": {\n    \"ticker\": \"BBCA\",\n    \"name\": \"Bank Central Asia Tbk PT\",\n    \"currentPrice\": 8750,\n    \"priceChange\": 50,\n    \"priceChangePercent\": 0.57,\n    \"dayHigh\": 8825,\n    \"dayLow\": 8700,\n    \"volume\": 24300000,\n    \"marketCap\": 1081500000000000,\n    \"peRatio\": 24.3,\n    \"week52High\": 9075,\n    \"week52Low\": 7425,\n    \"lastUpdated\": \"2025-01-15T08:30:00.000Z\"\n  },\n  \"source\": \"cache\",\n  \"responseTime\": 12\n}\n```\n\n### 3. get_historical_data\n\nGet historical price data for a specific stock.\n\n```json\n{\n  \"name\": \"get_historical_data\",\n  \"arguments\": {\n    \"ticker\": \"TLKM\",\n    \"period\": \"1m\"\n  }\n}\n```\n\n**Parameters:**\n- `ticker`: Stock ticker symbol (required)\n- `period`: Time period - \"1d\", \"1w\", \"1m\", \"3m\", \"1y\" (default: \"1m\")\n\n### 4. get_sector_performance\n\nGet performance data for all IDX sectors.\n\n```json\n{\n  \"name\": \"get_sector_performance\",\n  \"arguments\": {}\n}\n```\n\n### 5. search_stocks\n\nSearch for stocks by company name or ticker symbol.\n\n```json\n{\n  \"name\": \"search_stocks\",\n  \"arguments\": {\n    \"query\": \"bank\"\n  }\n}\n```\n\n### 6. get_stock_analysis\n\nGet comprehensive technical analysis for a stock with indicators and recommendations.\n\n```json\n{\n  \"name\": \"get_stock_analysis\",\n  \"arguments\": {\n    \"ticker\": \"BBCA\",\n    \"period\": \"1y\"\n  }\n}\n```\n\n**Parameters:**\n- `ticker`: Stock ticker symbol (required)\n- `period`: Analysis period - \"1m\", \"3m\", \"6m\", \"1y\", \"2y\", \"5y\" (default: \"1y\")\n\n### 7. compare_stocks\n\nCompare performance of multiple stocks over a specified period.\n\n```json\n{\n  \"name\": \"compare_stocks\",\n  \"arguments\": {\n    \"tickers\": [\"BBCA\", \"BBRI\", \"BMRI\"],\n    \"period\": \"1y\"\n  }\n}\n```\n\n**Parameters:**\n- `tickers`: Array of 2-5 stock ticker symbols (required)\n- `period`: Comparison period - \"1m\", \"3m\", \"6m\", \"1y\", \"2y\" (default: \"1y\")\n\n### 8. get_available_stocks\n\nGet list of all available stock tickers in the historical dataset.\n\n```json\n{\n  \"name\": \"get_available_stocks\",\n  \"arguments\": {}\n}\n```\n\n### 9. get_dataset_info\n\nGet information about the historical dataset including last update and coverage.\n\n```json\n{\n  \"name\": \"get_dataset_info\",\n  \"arguments\": {}\n}\n```\n\n## Configuration\n\n### Environment Variables\n\nCreate a `.env` file or set environment variables:\n\n```bash\n# Server settings\nIDX_MCP_SERVER_NAME=\"IDX MCP Server\"\nIDX_MCP_DEBUG=false\n\n# Cache settings\nIDX_MCP_CACHE_TYPE=memory  # memory or redis\nIDX_MCP_CACHE_TTL_MARKET_OVERVIEW=60\nIDX_MCP_CACHE_TTL_STOCK_INFO=300\nIDX_MCP_CACHE_TTL_HISTORICAL=86400\n\n# Data source timeouts\nIDX_MCP_YAHOO_TIMEOUT=10000\nIDX_MCP_WEB_TIMEOUT=15000\n\n# Logging\nIDX_MCP_LOG_LEVEL=info  # error, warn, info, debug\n```\n\n### Integrasi Claude Desktop\n\nTambahkan ke file konfigurasi Claude Desktop:\n\n**macOS:** `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows:** `%APPDATA%/Claude/claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"baguskto-saham\": {\n      \"command\": \"npx\",\n      \"args\": [\"@baguskto/saham\"]\n    }\n  }\n}\n```\n\n## CLI Commands\n\n```bash\n# Start the MCP server (default)\nbaguskto-saham\nbaguskto-saham start\n\n# Start with debug mode\nbaguskto-saham start --debug\n\n# Test connectivity and data sources\nbaguskto-saham test\n\n# Show server statistics\nbaguskto-saham stats\n\n# Clear cache\nbaguskto-saham clear-cache\n```\n\n## API Usage Examples\n\n### Node.js Integration\n\n```typescript\nimport { createServer, getDataSourceManager } from '@baguskto/saham';\n\n// Create and start MCP server\nconst server = await createServer();\nawait server.run();\n\n// Or use data sources directly\nconst dataManager = getDataSourceManager();\nconst marketData = await dataManager.getMarketOverview();\nconsole.log('IHSG:', marketData?.ihsgValue);\n```\n\n### Sample Queries for AI Assistants\n\n```text\n\"What's the current IHSG value and how is the market performing today?\"\n\n\"Show me information about Bank Central Asia (BBCA) stock\"\n\n\"Analyze BBCA stock with technical indicators for the last year\"\n\n\"Compare performance of BBCA, BBRI, and BMRI over the last 6 months\"\n\n\"Get the historical price data for Telkom Indonesia (TLKM) for the last month\"\n\n\"Which sectors are performing best today?\"\n\n\"Search for banking stocks in IDX\"\n\n\"What stocks are available in the historical dataset?\"\n\n\"Show me information about the historical dataset coverage\"\n```\n\n## Data Sources\n\n1. **Yahoo Finance** (Primary)\n   - Real-time stock quotes\n   - Historical OHLCV data\n   - IHSG index data\n   - Priority: HIGH\n\n2. **Web Scraping** (Fallback)\n   - Market overview from financial websites\n   - Fallback when Yahoo Finance fails\n   - Priority: MEDIUM\n\n## Performance\n\n- **Response Time**: < 2 seconds for all queries\n- **Caching**: Intelligent caching with configurable TTL\n  - Market overview: 1 minute\n  - Stock info: 5 minutes\n  - Historical data: 24 hours\n- **Rate Limiting**: 60 requests per minute default\n- **Error Handling**: Graceful degradation with fallback sources\n\n## Development\n\n### Project Structure\n\n```\nsrc/\n├── types/          # TypeScript type definitions\n├── config/         # Configuration management\n├── utils/          # Utilities (logging, etc.)\n├── cache/          # Caching layer\n├── data-sources/   # Data source implementations\n├── server/         # MCP server implementation\n├── cli.ts          # CLI entry point\n└── index.ts        # Main exports\n```\n\n### Building\n\n```bash\n# Clean build\nnpm run clean && npm run build\n\n# Development build with watch\nnpm run dev\n\n# Type checking\nnpx tsc --noEmit\n\n# Linting\nnpm run lint\nnpm run lint:fix\n```\n\n### Testing\n\n```bash\n# Run tests\nnpm test\n\n# Test with coverage\nnpm test -- --coverage\n\n# Test server functionality\nnpm run build && node dist/cli.js test\n```\n\n## Troubleshooting\n\n### Common Issues\n\n1. **\"Module not found\" errors**\n   ```bash\n   npm run clean && npm install && npm run build\n   ```\n\n2. **Yahoo Finance timeouts**\n   - Increase timeout in configuration\n   - Check internet connectivity\n   - Use debug mode: `IDX_MCP_DEBUG=true`\n\n3. **Cache issues**\n   ```bash\n   npx @baguskto/saham clear-cache\n   ```\n\n### Debug Mode\n\n```bash\n# Enable debug logging\nIDX_MCP_DEBUG=true IDX_MCP_LOG_LEVEL=debug npx @baguskto/saham\n```\n\n## Contributing\n\n1. Fork the repository\n2. Create a feature branch\n3. Make your changes\n4. Add tests\n5. Submit a pull request\n\n## License\n\nMIT License - see [LICENSE](LICENSE) file for details.\n\n## Changelog\n\nSee [CHANGELOG.md](CHANGELOG.md) for version history.\n\n## Support\n\n- GitHub Issues: [Report bugs](https://github.com/baguskto/saham/issues)\n- Discussions: [Community discussions](https://github.com/baguskto/saham/discussions)\n\n---\n\n**Note**: This server provides market data for informational purposes only. Not intended for trading or investment decisions. Always verify data from official sources.","readmeFilename":"README.md"}