# 🚀 SETUP MCP SERVER ## ⚡ REGULI DE AUR (NICIODATA NU ȘTERG!) 1. **NICI UN TASK NU SE CONSIDERĂ ÎNDEPLINIT** până nu se îndeplinesc criteriile de acceptanță definite 2. **NU ÎNCEPEM UN TASK** până nu definim criteriile de acceptanță 3. **UN SINGUR TASK ÎN LUCRU** - restul în standby 4. **DOCUMENTAȚIA RĂMÂNE ÎN ARBORE** - toate fișierele conectate 5. **NU LUCREZI NICIODATĂ LA ALTCEVA** decât ți s-a spus explicit 6. **NICIODATA NU HARDCODEZ VARIABILE!** 7. **NICIODATA NU ADAUGAM SETARI FAILOVERS** - Dacă ceva nu e bine, vrem să știm imediat 8. **Salvez date relevante taskului curent** în DEBUG_CURRENT_TASK.md 9. **Salvez întotdeauna ce am modificat** pentru rollback dacă e nevoie 10. **Creez criterii de acceptanță** înainte de a testa/finaliza 11. **Când task-uri depind de API changes** → salvez în TASK_IN_STANDBY.md [← Înapoi la CLAUDE.md](../CLAUDE.md) ## 📋 PREREQUISITES - Node.js 18+ - npm sau yarn - TypeScript 5+ ## 🔧 INSTALARE ### 1. Clone și Setup Initial ```bash cd /Projects/mcp npm install ``` ### 2. Configurare Environment ```bash # .env (NEVER COMMIT!) MCP_HOST=127.0.0.1 MCP_PORT=19017 MCP_LOG_LEVEL=info ``` ### 3. Build ```bash npm run build ``` ## 🏃 RULARE ### Development Mode ```bash npm run dev # Server pornește la 127.0.0.1:19017 ``` ### Production Mode ```bash npm start ``` ## 🔗 CONECTARE CLAUDE ### 1. Configurare Claude Settings Adaugă în `claude_desktop_config.json`: ```json { "mcpServers": { "custom-mcp": { "command": "node", "args": ["/Projects/mcp/dist/server.js"], "env": { "MCP_HOST": "127.0.0.1", "MCP_PORT": "19017" } } } } ``` ### 2. Restart Claude Desktop După configurare, restart aplicația Claude. ## 🌐 NGINX PROXY SETUP Pentru access extern via `mcp.runningwolf.com`: ```nginx server { server_name mcp.runningwolf.com; location / { proxy_pass http://127.0.0.1:19017; proxy_http_version 1.1; proxy_set_header Upgrade $http_upgrade; proxy_set_header Connection 'upgrade'; proxy_set_header Host $host; proxy_cache_bypass $http_upgrade; } # SSL config aici } ``` ## 🧪 TESTARE ```bash # Unit tests npm test # Integration tests npm run test:integration # Test conexiune curl http://127.0.0.1:19017/health ``` ## 🔍 TROUBLESHOOTING ### Port deja ocupat ```bash lsof -i :19017 # Kill procesul dacă e necesar ``` ### Erori TypeScript ```bash npm run typecheck ``` ### Logs ```bash # Development tail -f logs/mcp-dev.log # Production tail -f logs/mcp.log ``` ## 🔗 LEGĂTURI - [Arhitectură](./ARHITECTURA.md) - [Tools Disponibile](./TOOLS.md) - [Task Management](./TASKS.md) --- *Actualizat: 25 Iulie 2025*