gustavoaalves/vacation-mcp-server
3.2
If you are the rightful owner of vacation-mcp-server and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to dayong@mcphub.com.
The MCP Vacation Server is designed to manage vacation requests and workflows using the Model Context Protocol, with JWT authentication and HTTP streamable transport.
Tools
4
Resources
0
Prompts
0
MCP Vacation Server
Servidor MCP (Model Context Protocol) para gerenciamento de férias com autenticação JWT e transporte HTTP streamable.
🚀 Como executar
1. Instalar dependências
npm install
2. Build do projeto
npm run build
3. Executar servidor
npm start
# ou
node build/index.js --port=3001
O servidor estará disponível em http://localhost:3001
🧪 Como testar
Teste básico (sem autenticação)
node test-server.js
Teste com cliente MCP
node test-client.js
Teste com curl
# Inicializar conexão MCP
curl -X POST http://localhost:3001/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "initialize",
"params": {
"protocolVersion": "2024-11-05",
"capabilities": {"tools": {}},
"clientInfo": {"name": "test-client", "version": "1.0.0"}
}
}'
🔐 Autenticação
O servidor requer autenticação JWT via header Authorization: Bearer <token>.
Variáveis de ambiente
VACATION_API_URL=http://localhost:3000 # URL da API de férias
USER_SECRET=your-secret # Secret do usuário
USER_ID=user-id # ID do usuário
PORT=3001 # Porta do servidor
🛠️ Ferramentas disponíveis
- get_my_vacations - Busca dados das férias do usuário
- create_vacation_flow - Inicia novo fluxo de férias
diasParaGozo: número de diasinicioFerias: data no formato dd-mm-yyyy
- get_vacation_requirements - Verifica requisitos da próxima etapa
- advance_vacation_wflow - Avança o fluxo de férias
data: objeto com dados necessários
📡 Endpoints
POST /mcp- Endpoint principal MCP (requer autenticação)GET /mcp- SSE stream para notificações (requer autenticação)
🔧 Desenvolvimento
# Modo desenvolvimento (watch)
npm run dev
# Build
npm run build
# Executar
npm start