Diversion MCP Server
MCP server untuk connect Claude dengan Diversion version control API.
Tools Available
| Tool | Description |
|---|---|
test_auth | Test API token |
list_repos | List semua repos |
get_repo | Get details sesebuah repo |
list_branches | List branches dalam repo |
create_branch | Buat branch baru |
get_branch | Get details sesebuah branch |
list_commits | List commits |
get_commit | Get details sesebuah commit |
list_workspaces | List workspaces |
workspace_status | Check workspace status (modified files) |
get_file_tree | Get file tree sesebuah repo |
get_file_history | Get commit history untuk file tertentu |
list_reviews | List reviews/PRs |
list_collaborators | List collaborators |
Deploy ke Railway (Paling Mudah)
1. Push ke GitHub dulu
git init
git add .
git commit -m "init diversion mcp server"
gh repo create diversion-mcp --public --push
2. Deploy kat Railway
- Pergi https://railway.app
- New Project → Deploy from GitHub repo
- Pilih repo
diversion-mcp - Add environment variable:
DIVERSION_API_KEY= (API key kau, optional — boleh pass per-request)
- Railway auto-detect Node.js dan build sendiri
- Copy URL yang Railway bagi (format:
https://xxx.railway.app)
3. Tambah dalam Claude
- Pergi Settings → Connectors → Add custom connector
- URL:
https://xxx.railway.app/mcp - Dalam Advanced Settings, letak Authorization header:
- Key:
Authorization - Value:
Bearer <DIVERSION_API_KEY_KAU>
- Key:
- Save ✅
Deploy ke Render (Free Tier Available)
- Push ke GitHub
- Pergi https://render.com → New Web Service
- Connect GitHub repo
- Settings:
- Build Command:
npm install && npm run build - Start Command:
npm start - Environment:
DIVERSION_API_KEY=<token_kau>
- Build Command:
- Copy URL → tambah
/mcp→ letak dalam Claude connectors
Run Locally (Testing)
npm install
npm run dev
Server akan run kat http://localhost:3000/mcp
Untuk test, gunakan MCP Inspector atau curl:
curl -X POST http://localhost:3000/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <DIVERSION_API_KEY>" \
-d '{"jsonrpc":"2.0","method":"tools/list","id":1}'
Authentication
Server support dua cara auth:
- Per-request — Pass
Authorization: Bearer <token>dalam setiap request (recommended, lebih secure) - Environment variable — Set
DIVERSION_API_KEYdan server akan guna tu kalau header tak ada