mcp-tomticket
# mcp-tomticket
[](https://www.npmjs.com/package/mcp-tomticket)
[](https://registry.modelcontextprotocol.io)
[](https://glama.ai/mcp/servers/glira/mcp-tomticket)
Servidor [MCP](https://modelcontextprotocol.io) para a [API TomTicket v2](https://tomticket.tomticket.com/kb/api). Lista, responde, lança horário e finaliza chamados e também cobre clientes, organizações, chats, departamentos e base de conhecimento.
Não existe endpoint de login. O Bearer Token é criado no painel: **Administração → Configurações da Conta → API → Novo Token**. Marque **Pode criar e modificar dados** para respostas, horário e finalização.
O token vai só em variável de ambiente. Nunca o commite.
## Requisitos
- Node.js >= 18
- Token de API do TomTicket (conta Premium/Enterprise)
## Instalação
Via npm (recomendado):
```bash
npx mcp-tomticket
```
No Cursor (`~/.cursor/mcp.json`):
```json
{
"mcpServers": {
"tomticket": {
"command": "npx",
"args": ["-y", "mcp-tomticket"],
"env": {
"TOMTICKET_TOKEN": "cole-o-token-aqui"
}
}
}
}
```
Clone local:
```bash
git clone https://github.com/glira/mcp-tomticket.git
cd mcp-tomticket
npm install
cp .env.example .env
# edite .env e cole o TOMTICKET_TOKEN
npm run build
```
Validação rápida (somente leitura):
```bash
npm run smoke
```
Opcional — cria, comenta, responde e finaliza **um chamado de teste** com assunto `[MCP TESTE]`:
```bash
npx tsx scripts/smoke.ts --write
```
Recarregue os MCPs em **Settings → MCP**. Exemplo local em [`.cursor/mcp.json.example`](.cursor/mcp.json.example).
## Tools principais
| Tool | Ação |
| --- | --- |
| `tomticket_list_open_tickets` | Chamados abertos |
| `tomticket_list_tickets` | Todos, com filtros |
| `tomticket_get_ticket` | Detalhe + respostas + horários |
| `tomticket_reply_ticket` | Resposta do atendente (`start_date`/`end_date` lançam horário) |
| `tomticket_comment_ticket` | Comentário interno |
| `tomticket_finish_ticket` | Finaliza (`time_work` em minutos) |
| `tomticket_start_status` / `tomticket_close_status` | Cronômetro de status |
| `tomticket_create_ticket` | Abre chamado |
| `tomticket_transfer_ticket` / `tomticket_assign_operator` | Transferir / vincular atendente |
Há também tools de clientes, organizações, chats, departamentos, KB e campos personalizados. Operações de escrita avisam que alteram produção. Finalizar um chamado exige atendente vinculado (`tomticket_assign_operator`).
## Rate limit
A API aceita **3 requisições por segundo**. O client aplica intervalo mínimo de 350 ms.
## Variáveis
| Variável | Obrigatória | Descrição |
| --- | --- | --- |
| `TOMTICKET_TOKEN` | sim | Bearer Token do painel |
| `TOMTICKET_BASE_URL` | não | Padrão `https://api.tomticket.com/v2.0` |
## Licença
[MIT](LICENSE)
TDQS
Scored across 49 tools
Most tools are clearly distinct, but several families overlap: tomticket_list_departments already includes categories, operators, and statuses, while separate department-list tools exist. Similarly, tomticket_list_custom_fields overlaps with five scoped custom-field listers. The descriptions help, but the boundaries are not always obvious in a 49-tool set.
The tools overwhelmingly follow a clear tomticket_verb_noun snake_case pattern, such as list_tickets, create_customer, and finish_ticket. Minor deviations like tomticket_customer_exists and tomticket_customer_quick_access break the verb-first convention, but the overall naming scheme remains predictable and readable.
49 tools is well above the 25+ threshold and creates unnecessary navigation burden. Many tools could be consolidated with parameters, such as the six custom-field listers and four department listers, making the surface heavier than the domain requires.
Core ticket, customer, and article workflows are well covered, including mutation operations. However, notable gaps exist: there is no general ticket update/delete, no delete for articles/customers/organizations, no article-category management beyond listing, and chat tools are read-only with no reply capability.