MCP Financeiro
A multi-tenant SaaS API that integrates Hinova SGA ERP and Atomos chat platforms to automate billing and financial workflows. It enables AI agents to process vehicle information and manage customer payment requests via webhooks.
README
MCP Financeiro - API Multi-Empresas
Servidor API em Node.js + TypeScript + Hono para orquestrar integrações SGA (Hinova) e Chat Atomos em modelo SaaS multi-empresas.
Pré-requisitos
- Node.js 18+
- Conta Supabase
- Tokens: token_erp (Hinova SGA), token_chat e token_canal (Atomos)
Setup
1. Instalar dependências
npm install
2. Configurar variáveis de ambiente
Copie .env.example para .env e preencha:
SUPABASE_URL=https://seu-projeto.supabase.co
SUPABASE_SERVICE_ROLE_KEY=sua-service-role-key
3. Executar migrations no Supabase
No Supabase Dashboard > SQL Editor, execute o conteúdo do arquivo:
supabase/migrations/001_initial_schema.sql
4. Iniciar o servidor
npm run dev
O servidor estará em http://localhost:3000.
Endpoints
POST /api/v1/clientes
Cadastra um cliente com todas as configurações em uma única chamada.
Body:
{
"nome": "Cliente X",
"ativo": true,
"token_erp": "...",
"token_chat": "...",
"token_canal": "...",
"perfil_sistema": "SGA",
"base_url": "https://api.hinova.com.br/api/sga/v2",
"configuracoes_boleto": {
"dias_antes_vencimento": 15,
"dias_depois_vencimento": 5,
"situacoes_envio_direto": ["ATIVO"],
"situacoes_com_checagem_vencimento": ["INADIMPLENTE"],
"dias_checagem_vencimento": 2
},
"configuracoes_respostas": {
"response_sucesso": "Boleto e pix enviados! Vencimento: {{ data_vencimento }} Valor: {{ valor_boleto }}",
"response_regularizacao_moto": "...",
"response_regularizacao_veiculo": "...",
"response_boleto_baixado": "..."
},
"configuracoes_revistoria": {
"enviar_midia": true,
"video_moto": "https://...",
"video_carro": "https://..."
}
}
POST /api/v1/webhook
Recebe eventos do agente de IA (placa, telefone) e processa o fluxo de boleto.
Body ou Header X-Client-Id:
{
"placa": "NPU0901",
"telefone": "83998700386",
"client_id": "uuid-do-cliente"
}
Response: { "message": "..." } - texto formatado para a LLM.
PATCH /api/v1/clientes/:id/configuracoes
Atualiza configurações parciais de um cliente.
Scripts
npm run dev- Inicia em modo watchnpm run start- Inicia em produçãonpm run typecheck- Verifica tipos TypeScript
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.