https://github.com/nichsedge/ksei-mcp
Unofficial MCP server for AKSes KSEI (akses.ksei.co.id) portfolio data
https://github.com/nichsedge/ksei-mcp
finance-data indonesia ksei mcp
Last synced: 3 months ago
JSON representation
Unofficial MCP server for AKSes KSEI (akses.ksei.co.id) portfolio data
- Host: GitHub
- URL: https://github.com/nichsedge/ksei-mcp
- Owner: nichsedge
- Created: 2025-07-24T14:34:51.000Z (11 months ago)
- Default Branch: master
- Last Pushed: 2025-08-04T12:09:20.000Z (11 months ago)
- Last Synced: 2025-12-17T01:16:34.795Z (7 months ago)
- Topics: finance-data, indonesia, ksei, mcp
- Language: Python
- Homepage:
- Size: 156 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# KSEI MCP
An **unofficial Model Context Protocol (MCP)** server for accessing your [AKSes KSEI](https://akses.ksei.co.id) (Acuan Kepemilikan Sekuritas Kustodian Sentral Efek Indonesia) portfolio data.
This server enables AI assistants to retrieve Indonesian securities portfolio information, including:
* Cash balances
* Equity holdings
* Mutual funds
* Bonds
* Other investments
---
## ๐ง Prerequisites
* Python 3.11 or higher
* Valid KSEI account credentials
* [`uv`](https://docs.astral.sh/uv/getting-started/installation/) installed (recommended for quick execution)
---
## โ๏ธ Installation & Setup
### 1. Set Environment Variables
Set the following environment variables:
```bash
export KSEI_USERNAME="your_ksei_username"
export KSEI_PASSWORD="your_ksei_password"
export KSEI_AUTH_PATH="./data" # Optional, defaults to "./data" for saving auth tokens
```
### 2. Run with `uvx` (Recommended)
The easiest way to start the server is with [`uvx`](https://docs.astral.sh/uv/reference/cli/#uvx):
```bash
# Run directly from PyPI
uvx ksei-mcp
# Or run from the local directory
uvx --from . ksei-mcp
```
### 3. Alternative: Traditional Installation
If you prefer manual installation:
```bash
# Install dependencies
pip install -e .
```
---
## ๐ค Usage with MCP Clients
Add this configuration to your MCP-compatible client:
```json
{
"mcpServers": {
"ksei": {
"type": "stdio",
"command": "uvx",
"args": ["ksei-mcp@latest"]
}
}
}
```
---
## ๐งช Development: Using MCP Inspector
For local testing and development:
```bash
# Install MCP Inspector
npm install -g @modelcontextprotocol/inspector
# Run with inspector
mcp-inspector uvx --from . ksei-mcp
```
---
## ๐ฌ Example Queries
Once integrated into your AI assistant, you can ask:
```
"Show me my KSEI portfolio summary"
"What are my current cash balances?"
"List all my equity holdings"
"Get my mutual fund investments"
"Fetch all portfolio data"
```
### Example (Using Gemini CLI)

Other supported clients include GitHub Copilot, Claude, and any MCP-compatible assistant.
---
## ๐ Security Considerations
* **Credentials**: Never commit credentials to version control. Use environment variables or secure vaults.
* **Token Storage**: Auth tokens are stored locally as JSON files.
* **Secure Transport**: All communication with KSEI uses HTTPS.
* **Access Control**: Restrict file system access to the authentication and data directories.
---
## ๐ ๏ธ Contributing
1. Fork this repository
2. Create a feature branch
3. Implement your changes
4. Add tests (if applicable)
5. Open a pull request
---
## ๐ License
Licensed under the MIT License. See the [LICENSE](./LICENSE) file for details.
---
## โ ๏ธ Disclaimer
This software is intended for **educational and personal use only**. Users are responsible for complying with KSEI's terms of service and all relevant regulations.
> **Note**: This is an **unofficial client** for KSEI services. It is not affiliated with or endorsed by KSEI.
### Acknowledgement
This project is an adaptation from [chickenzord/goksei](https://github.com/chickenzord/goksei). Many thanks to the original author for their work and inspiration.