KSEI MCP
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@KSEI MCPShow me my KSEI portfolio summary"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
KSEI
A Python client library and Model Context Protocol (MCP) server for accessing your AKSes KSEI (Acuan Kepemilikan Sekuritas Kustodian Sentral Efek Indonesia) portfolio data.
Retrieve complete Indonesian securities portfolio information:
๐ต Cash balances (RDN)
๐ Equity holdings (Saham)
๐ Mutual funds (Reksadana)
๐ Bonds (Obligasi & SBN)
๐ผ Other investment instruments
๐ค Account identity & SID
๐ง Prerequisites
Python 3.11 or higher
Valid KSEI account credentials
uv(recommended for fast package management)
Related MCP server: ibkr-mcp
โ๏ธ Configuration
Set your KSEI credentials via environment variables or a .env file:
export KSEI_USERNAME="your_ksei_username"
export KSEI_PASSWORD="your_ksei_password"
# Optional: Override token cache location (defaults automatically to ~/.cache/ksei)
# export KSEI_AUTH_PATH="/custom/path"๐ Usage
1. As a Python Library
Tokens are automatically cached in ~/.cache/ksei with restricted 0o700/0o600 permissions.
import asyncio
from ksei import KSEIClient
# Initialize client (no auth_store boilerplate needed!)
client = KSEIClient(username="your_username", password="your_password")
# Synchronous usage
summary = client.get_portfolio_summary()
cash = client.get_cash_balances()
equities = client.get_equity_balances()
funds = client.get_mutual_fund_balances()
bonds = client.get_bond_balances()
# Asynchronous usage (fast parallel fetch)
async def main():
async with KSEIClient(username="your_username", password="your_password") as client:
all_portfolios = await client.get_all_portfolios_async()
print(all_portfolios)
asyncio.run(main())2. As an MCP Server (for AI Assistants)
Quick Run with uvx
# Run directly with uvx
uvx ksei-mcp
# Or run from local checkout
uvx --from . ksei-mcpMCP Client Configuration
Add this configuration to your MCP client (Claude Desktop, Cursor, Gemini CLI, etc.):
{
"mcpServers": {
"ksei": {
"type": "stdio",
"command": "uvx",
"args": ["ksei-mcp"],
"env": {
"KSEI_USERNAME": "your_ksei_username",
"KSEI_PASSWORD": "your_ksei_password"
}
}
}
}3. CLI Commands
# Start MCP server
uv run ksei mcp
# Fetch and dump raw portfolio JSON
uv run ksei dump --output ./data๐งช Testing with MCP Inspector
For local MCP debugging:
npx @modelcontextprotocol/inspector uv run ksei-mcp๐ Security & Privacy
Zero Boilerplate Cache: Tokens are cached automatically in
~/.cache/ksei(XDG standard) with user-only permissions (0o700directory,0o600files).Secret Protection: Passwords and tokens are never logged or exposed in
__repr__or unhandled exceptions.Auto 401 Recovery: The client transparently refreshes expired tokens on 401 Unauthorized responses.
Secure Transport: All requests communicate with official KSEI endpoints via HTTPS.
๐ License
Licensed under the MIT License. See LICENSE for details.
โ ๏ธ Disclaimer
This is an unofficial client for educational and personal use only. It is not affiliated with or endorsed by PT Kustodian Sentral Efek Indonesia (KSEI).
Acknowledgement
Adapted and inspired by chickenzord/goksei.
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Servers
- AlicenseAqualityCmaintenanceMCP Server for publicly available real-time Indian Mutual Funds data127MIT
- Flicense-qualityCmaintenanceAn MCP server that turns Interactive Brokers into a question-answering portfolio analyst.4
- Alicense-qualityCmaintenanceA read-only MCP server for Trade Republic that provides portfolio, cash balance, real-time quotes, and instrument search via an unofficial API.MIT
- Alicense-qualityBmaintenanceA read-only MCP server that provides filtered account and portfolio data from Portfolio Performance .portfolio files to generate reports.4MIT
Related MCP Connectors
Open-source MCP server for Zerodha Kite Connect. Portfolio, market data, backtesting, alerts.
This MCP server provides seamless access to Malaysia's government open data, including datasets, wโฆ
MFAPI.in MCP โ Indian mutual-fund NAV (net asset value) data.
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/nichsedge/ksei'
If you have feedback or need assistance with the MCP directory API, please join our Discord server