BitOps

Como o MCP funciona

Arquitetura Tokio-first. Host de IA fala MCP; o servidor mantém sessão multi-plane no Portal Parceiros.

AI Host  →  seguros-mcp (stdio | http)
              ├─ meta / catalog tools (sem login)
              └─ TokioMarineClient
                   ├─ OpenAM HTTP jar → BFF (policies, parcelas, book)
                   └─ Playwright Cotador warm → packages (soft_reload_calc)

Sessão multi-plane

  • sso/bff — cookie jar OpenAM + BFF
  • cotador_auto — JSESSION path-scoped Cotador (não misturar com BFF inject)
  • partner_api — Integração comercial (parked até adesão)

Regras de produto

  • Não scrapear Agger / Quiver / Segfy
  • Quote ops: list · get · create only
  • Nunca inventar prêmio
  • Secrets só em .secrets/ (local) ou vault multi-tenant (roadmap)
  • OPIN parked até certificados/directory

Tools documentados (29)

Amostra alinhada ao monorepo. Profile stable esconde writes para mcp.ai.

ping

meta both none

Health check. Returns pong with server timestamp.

server_info

meta both none

Product metadata, vendor, version, tool_profile, liveAdapters.

list_capabilities

meta both none

Capability groups + planned tool catalog from research.

list_insurers

catalog both none

Static research catalog of insurers (no live login).

get_insurer

catalog both none

One insurer research row by slug.

connect_insurer

connection both secret

Open/reuse Tokio session from operator secrets (portal login).

connection_status

connection both none

Multi-plane session health (SSO / BFF / Cotador).

refresh_session

connection both secret

Force soft re-auth / jar refresh.

list_adapter_capabilities

connection both none

What the live adapter supports for a slug.

list_portal_apps

connection both none

Catalog of Tokio portal product apps and mapped MCP tools.

list_broker_quotes

quotes both none

Broker book: hoje / CPF / período / status. Prefer for carteira. Read-only enrich (vehicle/placa).

get_quote

quotes both soft_reload_calc

One quote. include_pricing=true loads Cotador packages via soft_reload_calc on same cdCotac (not clone).

find_quotes_by_plate

quotes both none

Find broker quotes by vehicle plate (pass CPF when known).

create_quote

quotes full soft_write

WRITE soft: dry_run first. Live needs dry_run=false+confirm=true. Never transmit. Hidden when TOOL_PROFILE=stable.

list_quotes

quotes both none

Visão Cliente thin by document — NOT broker book. Prefer list_broker_quotes.

search_by_document

portfolio both none

Find policies/client by CPF/CNPJ/placa/nome (consulta-unica).

list_policies

portfolio both none

List policies for a document with filters.

get_policy

portfolio both none

Policy detail by number / idepol.

list_pending_installments

portfolio both none

Parcelas overdue / due_today / due_soon (GraphQL buscarParcelas).

list_renewals

portfolio both none

Massificados renovações (AU/MR/… families).

list_claims

claims both none

Claims by document (read-only).

list_policy_documents

documents both none

List downloadable docs for a policy.

download_document

documents both none

Fetch PDF via docstore (rewrites broken hosts).

list_commissions

commissions both none

Commission extrato (bank fields stripped).

daily_ops_brief

ops both none

Composite brief: parcelas + renovações + propostas (prefer specific tools when possible).

broker_dashboard

ops both none

Portal home dashboard cards.

get_broker_identity

ops both none

Corretor identity from dash-graphql / brokertech.

list_write_actions

writes both none

Catalog of soft-write actions (dry-run aware).

simulate_write

writes both none

Dry-run simulate a catalog write action.