Nunc GuardianMDM Setup · macOS · Windows · Linux
Lock Claude MCP via MDM
Deploy read-only managed-mcp.json and managed-settings.json policies so Claude Code and Claude Desktop connect exclusively to your governed Nunc MCP endpoints and reject user-added servers.
Prerequisites
- Console Admin role in Nunc to export your tenant's pre-populated policy bundle.
- An MDM or configuration management tool (Jamf Pro, Kandji, Microsoft Intune, or Ansible) running as
rootorSYSTEM. - Optional: Nunc Sidecar installed if you want continuous lock-file SHA-256 hash reporting in Console Posture.
1. Export or create the managed policy files
Download your bundle from Console → Account → Settings → Claude MCP or create the two JSON files below:
managed-mcp.json
{
"mcpServers": {
"nunc": {
"type": "http",
"url": "https://api.nunc.cloud/mcp"
},
"nunc-analytics": {
"type": "http",
"url": "https://api.nunc.cloud/mcp/analytics"
},
"nunc-sandbox": {
"type": "http",
"url": "https://api.nunc.cloud/mcp/sandbox"
}
}
}managed-settings.json
{
"allowManagedMcpServersOnly": true,
"allowedMcpServers": [
{ "serverName": "nunc" },
{ "serverName": "nunc-analytics" },
{ "serverName": "nunc-sandbox" }
]
}2. Deploy to root-owned OS policy directories
Place both files in the system directory for your OS with read-only permissions for standard users:
| OS | Policy Directory | Required Ownership & Mode |
|---|---|---|
| macOS | /Library/Application Support/ClaudeCode/ | root:wheel · 0644 |
| Windows | C:\ProgramData\ClaudeCode\ | SYSTEM / Administrators write, Users read |
| Linux | /etc/claude-code/ | root:root · 0644 |
# macOS MDM postinstall script (Jamf Pro / Kandji / Munki)
DIR="/Library/Application Support/ClaudeCode"
sudo mkdir -p "$DIR"
sudo install -o root -g wheel -m 0644 ./managed-mcp.json "$DIR/managed-mcp.json"
sudo install -o root -g wheel -m 0644 ./managed-settings.json "$DIR/managed-settings.json"3. Verify lock enforcement
Run claude mcp list on a managed workstation and confirm user-scoped additions are rejected:
$ claude mcp list
nunc: https://api.nunc.cloud/mcp (HTTP · managed)
nunc-analytics: https://api.nunc.cloud/mcp/analytics (HTTP · managed)
nunc-sandbox: https://api.nunc.cloud/mcp/sandbox (HTTP · managed)
$ claude mcp add custom-server https://example.com/mcp
Error: MCP server "custom-server" is blocked by enterprise policy (allowManagedMcpServersOnly).4. Troubleshooting
| Symptom | Cause | Fix |
|---|---|---|
| User can still run claude mcp add | managed-settings.json is missing allowManagedMcpServersOnly: true or is writable by the standard user. | Verify file ownership is root (macOS/Linux) or Administrators/SYSTEM (Windows) with mode 0644. |
| OAuth sign-in fails or times out | Corporate proxy or firewall blocks https://api.nunc.cloud or local loopback OAuth callback. | Allowlist api.nunc.cloud on port 443 and permit localhost loopback callbacks in your VPN/EDR policy. |
| Console Posture shows endpoint drift | Workstation has an older managed-mcp.json hash or Nunc Sidecar cannot read the policy directory. | Re-push the MDM payload from Jamf/Intune/Kandji and restart Claude Desktop or Claude Code. |
Related: Posture & AI-DSPM · Connect MCP Clients