# Step 1: Install the server
npm install -g @modelcontextprotocol/server-github
# Step 2: Set your token
export GITHUB_TOKEN="ghp_xxxxxxxxxxxx"
# Step 3: Run sandboxed
warden run --policy policy-github.yaml
Tips
Grant HOME if the server needs to read git config or .netrc
Never put GITHUB_TOKEN in the policy, give only the name; the value comes from the shell
Both GraphQL and REST are on api.github.com, so one entry is enough
Increase timeout_s for long-running PR reviews
Troubleshooting
Error
Fix
permission denied on network
Check that api.github.com is in network.allow
Token not found
Export GITHUB_TOKEN in the shell; the policy contains only the name