LLLanyard

Guides

Run scripts with API keys from Claude Desktop

Claude Desktop on a Claude subscription has no API key of its own to protect, but it's very good at running the scripts you'd otherwise run by hand. The problem is giving those scripts their keys without pasting the keys into the chat or a config file.

Connect Claude Desktop

lllanyard setup claude-desktop --scripts-dir ~/Scripts

This adds LLLanyard's MCP server to Claude Desktop's settings. It keeps your other settings, saves a backup of the file, and only changes it while Claude Desktop is closed, because the app rewrites its settings when it quits. On macOS, --restart quits and reopens it for you. It works on a normal subscription: no API key and no API billing.

Scripts you approve once

Approve a script with the keys it needs:

lllanyard tool add deploy --keys github,sendgrid -- pwsh -File ~/Scripts/Deploy-App.ps1

Claude can now list and run deploy by name. The script runs with its keys, and Claude gets back its output, with the keys redacted, and its exit code. It can't change the command, and it can only add arguments if you approved the tool with --allow-args. If the script file changes, it won't run until you approve it again.

Any script in a folder, with a click

With --scripts-dir, Claude can also ask to run any script in that folder. LLLanyard shows a dialog with the script, its arguments and the keys it will get, and nothing runs until you click Run. Deny is the default. The dialog warns you if the script changed in the last day, since an AI may have written it, and the file is checked again at launch so an edit made while you decide isn't run.

Things to know

More guides