Simulador de Prêmio de Seguro Veicular
raihanSss/simulasi-premi
Cálculo de prêmios de seguro veicular conforme OJK
Ver no GitHubMCP server para simulação de prêmios de seguro de veículos conforme regulação OJK SE 6/2017. Calcula prêmios para cobertura Compreensiva e TLO em todas as regiões da Indonésia, considerando tipo de veículo, uso (comercial/não-comercial) e coberturas adicionais.
Instalação
npx convez-ai raihanSss/simulasi-premi1 comando no terminal: detecta o formato do repositório (marketplace ou plugin avulso) e instala via Claude Code. Requer Node 18+ e o Claude Code instalado.
Métricas
Casos de uso
- Integração com plataformas de seguros para cálculo automático de prêmios
- Simulação de cotações para clientes finais
- Conformidade regulatória com tarifa OJK
Veredito

Solução especializada e robusta para o mercado de seguros indonésio, com implementação clara da regulação OJK. Adequado para integradores que precisam calcular prêmios veiculares em conformidade regulatória.
README
A tradução para o português deste README ainda está na fila.
premi-asuransi MCP Server
MCP (Model Context Protocol) server for vehicle insurance premium simulation — PT Asuransi Intra Asia.
Implements OJK regulation SE OJK No. 6/SEOJK.05/2017.
Architecture
┌─────────────────────────────────────────────┐
│ Docker Container │
│ │
│ ┌────────────────────┐ │
│ │ mcp-simulasi.py │ :8000 ◄── clients │
│ │ (FastMCP / SSE) │ │
│ └─────────┬──────────┘ │
│ │ HTTP POST (internal) │
│ ┌─────────▼──────────┐ │
│ │ api-simulasi- │ :1234 (internal) │
│ │ kendaraan.php │ │
│ └────────────────────┘ │
└─────────────────────────────────────────────┘
| Service | Port | Description |
|---|---|---|
| MCP HTTP server | 8000 | Public — SSE transport + REST /tools |
| PHP pricing API | 1234 | Internal — premium calculation engine |
Endpoints
| Method | Path | Description |
|---|---|---|
GET | /sse | MCP SSE connection (MCP clients) |
POST | /messages/ | MCP message posting |
GET | /tools | REST tool discovery (platform sync) |
GET | /health | Health check (PHP backend) |
Tool
hitung_premi_kendaraan
Calculates vehicle insurance premium based on OJK tariff tables.
Required parameters:
| Parameter | Type | Values |
|---|---|---|
tipe_kendaraan | string | non-bus-non-truck | truck-pickup | bus | motor |
region | string | region1 (Sumatera) | region2 (DKI/Jabar/Banten) | region3 (Jawa & lainnya) |
harga_pasar | number | Market value in IDR, e.g. 250000000 |
tipe_asuransi | string | Comprehensive | TLO |
pilihan_rate | string | bawah (minimum rate) | atas (maximum rate) |
kegunaan | string | non-komersial | komersial |
Optional parameters:
| Parameter | Type | Default | Description |
|---|---|---|---|
benefits | string[] | [] | flood-hurricane, earthquake-tsunami, strike-riot, terrorism-sabotage, personal-accident-driver, personal-accident-passenger, liability, authorized |
pa_driver_price | number | 0 | Personal accident driver coverage (IDR) |
pa_passenger_price | number | 0 | Personal accident passenger coverage per seat (IDR) |
third_party_price | number | 0 | Third-party liability coverage (IDR) |
Environment Variables
| Variable | Default | Description |
|---|---|---|
PORT | 8000 | MCP server listening port |
PHP_PORT | 1234 | Internal PHP API port |
API_URL | http://localhost:1234/api-simulasi-kendaraan.php | Full URL to the PHP pricing API |
Quickstart — Docker
Build
docker build -t premi-asuransi-mcp .
Run
docker run -d \
--name premi-mcp \
-p 8000:8000 \
premi-asuransi-mcp
Verify the server is up:
# Tool discovery
curl http://localhost:8000/tools
# PHP backend health
curl http://localhost:8000/health # proxied via router.php
Custom environment
docker run -d \
--name premi-mcp \
-p 8000:8000 \
-e PORT=8000 \
-e PHP_PORT=1234 \
premi-asuransi-mcp
Logs
docker logs -f premi-mcp
Local Development
Prerequisites
- Python 3.13+
- PHP 8.x CLI
Setup
# Install Python dependencies
pip install -r requirements.txt
# Terminal 1 — start PHP API
php -S 0.0.0.0:1234 router.php
# Terminal 2 — start MCP server
python mcp-simulasi.py
For a local XAMPP/Laragon environment, override API_URL:
API_URL="http://localhost:8080/intraasia_new/api-simulasi-kendaraan.php" python mcp-simulasi.py
Running Tests
pip install pytest pytest-asyncio
python -m pytest test_mcp_simulasi.py -v
Expected output: 19 passed.
Tests cover:
GET /tools— status, content-type, schema, POST → 405- Tool registration and enum schema
- Happy path: total premium, labels, format, benefit detail
- Error handling:
ConnectError,HTTPStatusError,success=false, unexpected exception
Deployment Notes
- Only port
8000needs to be exposed publicly — the PHP API on:1234stays internal. - The
/toolsendpoint allows platforms (e.g. privas.ai) to sync tool definitions viaGET /tools. - The MCP SSE connection is at
/sse; clients post messages to/messages/. - Log file is written to
premi_mcp.login the working directory. Mount a volume if log persistence is needed:docker run -d -p 8000:8000 -v $(pwd)/logs:/app premi-asuransi-mcp