Priority MCP Platform
מערכת MCP רב-לקוחית שמחברת Claude/AI ל-Priority ERP דרך OData, עם ממשק ניהול Web.
ארכיטקטורה
- Web (Vercel) — Next.js Admin UI
- MCP Server (Render) — Streamable HTTP MCP + Priority OData client
- Supabase — Postgres, Auth, migrations
Claude → MCP Server (Render) → Priority OData
Admin → Web (Vercel) → Supabase + Render Internal API
התחלה מהירה (מקומי)
1. התקנת תלויות
pnpm install
pnpm build
2. Supabase
- צור פרויקט ב-Supabase
- הרץ migrations:
npx supabase link --project-ref <your-ref>
npx supabase db push
- צור משתמש אדמין ב-Authentication → Users
3. משתני סביבה
העתק .env.example לכל אפליקציה:
apps/mcp-server/.env `` SUPABASE_URL= SUPABASE_SERVICE_ROLE_KEY= ENCRYPTION_KEY= # node -e "console.log(require('crypto').randomBytes(32).toString('base64'))" CORS_ORIGINS=http://localhost:3000 PORT=3001 ``
apps/web/.env.local `` NEXT_PUBLIC_SUPABASE_URL= NEXT_PUBLIC_SUPABASE_ANON_KEY= RENDER_INTERNAL_API_URL=http://localhost:3001/internal NEXT_PUBLIC_MCP_SERVER_URL=http://localhost:3001/mcp ``
4. הרצה
pnpm dev
- Web: http://localhost:3000
- MCP: http://localhost:3001/mcp
- Health: http://localhost:3001/health
Deploy
Render (MCP Server)
- חבר את ה-repo ל-Render
- השתמש ב-render.yaml
- הגדר env vars:
SUPABASE_URL,SUPABASE_SERVICE_ROLE_KEY,ENCRYPTION_KEY,CORS_ORIGINS
Vercel (Web)
- Import הפרויקט, root directory:
apps/web - הגדר env vars מ-
.env.example - עדכן
RENDER_INTERNAL_API_URLו-NEXT_PUBLIC_MCP_SERVER_URLלכתובות Render
Supabase
הרץ migrations על הפרויקט ב-production.
חיבור Claude
- בממשק הניהול → לקוח → "יצירת מפתח MCP"
- הוסף ל-Claude Desktop config:
{
"mcpServers": {
"priority-mcp": {
"url": "https://<render-app>.onrender.com/mcp",
"headers": {
"Authorization": "Bearer <tenant_api_key>"
}
}
}
}
MVP — Read Only
המערכת תומכת רק ב-GET OData. כל ה-tools מוגדרים כ-read_only.
מבנה הפרויקט
apps/web/ # Next.js admin
apps/mcp-server/ # MCP + Priority client + internal API
packages/shared/ # types, schemas, crypto, odata helpers
supabase/ # migrations











