Skip to main content
Archived

This project has been archived by its maintainers, and is no longer receiving any updates.

KSEI MCP

An unofficial Model Context Protocol (MCP) server for accessing your AKSes KSEI (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 installed (recommended for quick execution)

⚙️ Installation & Setup

1. Set Environment Variables

Set the following environment variables:

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:

# 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:

# Install dependencies
pip install -e .

🤖 Usage with MCP Clients

Add this configuration to your MCP-compatible client:

{
  "mcpServers": {
    "ksei": {
      "type": "stdio",
      "command": "uvx",
      "args": ["ksei-mcp@latest"]
    }
  }
}

🧪 Development: Using MCP Inspector

For local testing and development:

# 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)

Gemini CLI Example

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 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. Many thanks to the original author for their work and inspiration.

Metadata

Release files for ksei-mcp 1.4.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for ksei-mcp 1.4.0
File Size Uploaded
ksei_mcp-1.4.0.tar.gz 158.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for ksei-mcp 1.4.0
File Interpreter ABI Platform
ksei_mcp-1.4.0-py3-none-any.whl Python 3 none any Details

Total release size: 164.3 kB

Release files / ksei_mcp-1.4.0.tar.gz

Download URL ksei_mcp-1.4.0.tar.gz
Size 158.2 kB
Tags Source
SHA-256 checksum
How to use checksums
6afed081aa9c84bc0d14b23ebfca957e0fc1d053623de9a4fc5b1b6f5616b208
BLAKE2b-256 checksum
How to use checksums
be5ed0ea75f7f86fe0676684fcdbb73e101736d417109e4014d580371ef4e6db
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4

Release files / ksei_mcp-1.4.0-py3-none-any.whl

Download URL ksei_mcp-1.4.0-py3-none-any.whl
Size 6.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
137111d63ef03b21f6fa0626399cb38f6189f447b08f3cdecf444344504bd03d
BLAKE2b-256 checksum
How to use checksums
d85ef192c436a2787875e2c1e32ec58c1d63a29a8b28ac594c83c0ee33d30424
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.8.4
Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page