Skip to main content

MCP server for KSEI API access

Project description

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_DATA_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-mcp": {
      "type": "stdio",
      "command": "uvx",
      "args": ["ksei-mcp"]
    }
  }
}

🧪 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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ksei_mcp-1.3.0.tar.gz (158.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ksei_mcp-1.3.0-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file ksei_mcp-1.3.0.tar.gz.

File metadata

  • Download URL: ksei_mcp-1.3.0.tar.gz
  • Upload date:
  • Size: 158.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for ksei_mcp-1.3.0.tar.gz
Algorithm Hash digest
SHA256 55b5bedb410bb4a717814ca541c10ef7045dce64b3258b05375d123f5d938410
MD5 1bb1d8906307f728522b45b1817aa6fa
BLAKE2b-256 1c516d8777a28a681401819969292ded71dcd904c326efdce8573d1b50ba0297

See more details on using hashes here.

File details

Details for the file ksei_mcp-1.3.0-py3-none-any.whl.

File metadata

  • Download URL: ksei_mcp-1.3.0-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.8.3

File hashes

Hashes for ksei_mcp-1.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ef90c547db469b99d3fdca70c5ec954c82334b0f63eafbcb8a6c3dd3578280d7
MD5 e4ecb4e81f8c918affac45316116b81b
BLAKE2b-256 e84bf9afeac59a6c4706a738ab953db84b12a90116159687390d018d5e9152c0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page