mirror of
https://github.com/hoshikawa2/compass_backoffice.git
synced 2026-07-09 22:04:20 +00:00
55 lines
1.0 KiB
Markdown
55 lines
1.0 KiB
Markdown
# Backoffice MCP HTTP Server
|
|
|
|
Servidor HTTP compatível com o `MCPToolRouter` do framework.
|
|
|
|
## Configuração
|
|
|
|
Copie o arquivo de exemplo:
|
|
|
|
```bash
|
|
cp .env.backoffice_mcp.example .env.backoffice_mcp
|
|
```
|
|
|
|
Principais variáveis:
|
|
|
|
```text
|
|
BACKOFFICE_MCP_HOST=0.0.0.0
|
|
BACKOFFICE_MCP_PORT=8010
|
|
BACKOFFICE_MCP_USE_MOCK=true
|
|
BACKOFFICE_MCP_BACKEND_TYPE=mock
|
|
BACKOFFICE_MCP_REST_BASE_URL=http://localhost:8080/backoffice
|
|
BACKOFFICE_MCP_REST_API_KEY=
|
|
BACKOFFICE_MCP_ORACLE_USER=
|
|
BACKOFFICE_MCP_ORACLE_PASSWORD=
|
|
BACKOFFICE_MCP_ORACLE_DSN=
|
|
```
|
|
|
|
## Execução local
|
|
|
|
```bash
|
|
./scripts/run_backoffice_mcp.sh
|
|
```
|
|
|
|
## Health
|
|
|
|
```bash
|
|
curl http://localhost:8010/health
|
|
```
|
|
|
|
## Contrato
|
|
|
|
- `GET /tools/list`
|
|
- `POST /tools/call`
|
|
|
|
Tools iniciais:
|
|
|
|
- `consultar_reclamacao`
|
|
- `consultar_cliente_backoffice`
|
|
- `registrar_acao_backoffice`
|
|
|
|
## Backends
|
|
|
|
- `mock`: dados em memória.
|
|
- `rest`: chama endpoints REST configurados por `BACKOFFICE_MCP_REST_BASE_URL`.
|
|
- `oracle`: placeholder explícito para receber queries/procedures reais quando o backoffice original for anexado.
|