API keys and MCP: connect scripts and Claude
Make a key for a script, another system or an AI assistant, and connect Claude to your server over MCP.
Applies to Shadow Manager server 1.95.0 and the macOS agent.
From server 1.95.0, you can give a script, another system or an AI assistant such as Claude its own key to your Shadow Manager server. Keys go straight to your server; nothing passes through us.
Make a key
- 1Sign in as an admin and open Settings › Server › API keys and MCP.
- 2Give the key a name that says what it's for, for example
claude-deskorweekly-report. - 3Choose its role: Viewer can look, Approver can also approve updates and stop remote sessions, Admin can change settings.
- 4Choose when it expires: 30, 90 or 365 days, or never.
- 5Copy the key (it starts
smk_). It's shown once and only a fingerprint of it is kept, so store it in your password manager.
Give each script or assistant its own key with the lowest role it needs. Revoke stops a key at once, and a key can never make or revoke other keys.
Connect Claude Code or another assistant
Your server answers MCP (the Model Context Protocol) at /mcp, using the same key. In Claude Code:
claude mcp add --transport http shadow-manager https://your-server/mcp --header "Authorization: Bearer smk_…"Other assistants that support remote MCP servers over HTTP connect the same way: the address is https://your-server/mcp and the key goes in an Authorization: Bearer header.
What an assistant can do
| Tool | What it does | Role needed |
|---|---|---|
| get_overview | What needs attention across your Macs | Any key |
| list_devices | Macs, their owners and when they last checked in | Any key |
| find_tools | Where an AI tool or CLI is installed, and its version | Any key |
| list_ai_risks | Personal accounts, risky extensions and MCP servers | Any key |
| list_updates | Updates waiting, installed or failed | Any key |
| list_remote_sessions | Who's using a Mac remotely right now | Any key |
| list_exception_requests | Requests from staff to use a tool | Any key |
| decide_updates | Approve or reject waiting updates | Approver or Admin |
| stop_remote_session | Stop a remote session | Approver or Admin |
| get_activity | The activity log | Admin |
An assistant only sees the tools its key's role can use, and each one runs through the same checks as the dashboard.
Use a key in your own scripts
Send the key as Authorization: Bearer smk_… on any /api/… call. It can do what its role can and no more.
Keeping track
- Everything a key does is in the activity log as
api-key:followed by its name. - The key list shows each key's role, when it was last used and when it expires.
- Requests from other websites are refused, so a page someone opens can't use a key.
- On a public demo server, keys can only read.
Was this article helpful?