Claude Code secrets: let your agents use API keys and GitHub without ever seeing them
Every AI agent that works with an online service wants the key, the secret code the service gives you to let software in. So keys end up pasted into prompts, settings files and environment variables in a .env file.
In this article
Part of harnsy Max. See what Max adds →
After a while you don’t know where each one lives, or which agent has seen it.
Here is what changes with a key store.
Add a key once
You add a key once in “Keys”:
- its name
- the service’s hosts, the web addresses it is meant for
- which projects and roles may use it
That’s the only place the key goes.
The agent calls, harnsy puts the key in
Your agent asks harnsy to make the call. harnsy adds the key on the way and sends the request to that key’s host, and nowhere else.
The value stays out of the agent’s context, its transcripts and its logs. The agent gets its work done; the key never passes through its hands.
See every step of a key on the Key store page →
API key management with your AI manager
When your AI manager needs a new service, it drafts the entry: the name and the service. You paste the value yourself. A draft gives nobody anything until you do.
So the AI manager can plan the work, and the key itself still comes only from you.
A Claude Code GitHub integration that works the same way
Connect a fine-grained GitHub token in Connections, with only the repositories and permissions your agents need. A fine-grained token is one you limit to exactly those repositories and rights. Your agents reach GitHub’s API through harnsy without seeing it.
AI agent security: give each key only what it needs
Access by project and role decides who uses a key in daily work, but it isn’t a wall: any agent on the same machine can seat a helper on a role that has a key. The value still stays hidden. So give each key only the access it really needs, the same way you set up the GitHub token above.
The key store works well with Usage: your agents work with your services, and Usage shows how much of each AI subscription they used today.
One place for every key
Keys stop living in prompts and files. You add each one once, decide who may use it, and your agents work with your services without holding the value.
New to harnsy? Start free and add Max later.
Get the key store with harnsy Max
Start free, then add harnsy Max when you want the key store for your team.
See harnsy MaxJoin the people who run it
Ask questions, see what others built.
Join the Discordharnsy is not affiliated with Anthropic, OpenAI or OpenCode; their names are theirs.