Portable MCP memory layer. Each user signs in, connects their own GitHub repo + PAT, and AI clients use a per-user MCP API key or OAuth. Context is written into that user’s repo only.
AI client ──MCP + OAuth or API key──► Kankali (Vercel)
│
Firestore user record
(encrypted GitHub PAT)
│
▼
user's GitHub repo
/domains/<slug>/context.md
/activity-log/YYYY-MM-DD.md
- Auth: Google via NextAuth
- User data: Firebase Firestore (
users/{uid}) - GitHub PATs: AES-256-GCM encrypted with
ENCRYPTION_KEY - Expiry emails: daily Vercel Cron → Gmail SMTP
- MCP:
/mcp— toolslist_domains,read_context,write_context,search_context - OAuth (Claude web): DCR + PKCE on same origin
- Sign in with Google
- Settings → paste fine-grained PAT + owner/repo (+ optional expiry date)
- Connect AI:
- Claude web: custom connector URL only (OAuth login)
- Claude Code / Cursor / Grok: MCP API key in headers
- AIs store context in that user’s GitHub repo
Universal connector URL (no API key in the UI):
https://kankali-context.vercel.app/mcp
- Claude → Customize → Connectors → Add custom connector
- Paste the URL above (leave OAuth Client ID/Secret empty)
- Click Connect → Google sign-in on Kankali → Allow access
- Claude receives a per-user token scoped to your GitHub context only
Static Authorization: Bearer <mcpApiKey> still works for Claude Code, Cursor, and Grok.
OAuth endpoints (auto-discovered by Claude):
/.well-known/oauth-protected-resource/.well-known/oauth-authorization-server/oauth/register(DCR)/oauth/authorize(login + consent)/oauth/token
See .env.example. Required: NextAuth, Google OAuth, Firebase service account, ENCRYPTION_KEY, Gmail for reminders.
npx vercel --prod
# set env vars in Vercel dashboard, then redeployAdd your production URL to Google OAuth Authorized JavaScript origins and redirect URIs
(https://your-app.vercel.app/api/auth/callback/google).
- Never commit
serviceAccount.jsonor client secrets - Rotate any credentials that were shared in chat
- Fine-grained PATs scoped to one repo recommended