Give an AI agent an API key without pasting it into chat
SEAL teamYour agent needs a service key to finish a task. Ask for it through SEAL: you enter the value in a separate dialog or web page, and the tool returns a private file path.
This guide is from the SEAL team. It describes the documented workflow, checked on 22 October 2026.
1. Connect the local MCP server
Add SEAL to your MCP host using command npx and arguments ["-y", "sealnet-mcp@latest"]. The server uses local stdio transport.
2. Describe the request
Ask the agent: “Request my staging API key through SEAL. Use it only for the approved program; do not print it or read its contents into this conversation.”
Example MCP tool call, not a shell command:
seal_request({"what":"Staging API key for the report task","kind":"secret","wait":true})
3. Answer outside the chat
On your computer, SEAL can open a system dialog. When the agent runs elsewhere, it can provide a seal.net request page. Compare the three words on that page with the words shown in the conversation before answering. A paired SEAL inbox can also hold the request as a card.
The response is encrypted to the requesting agent. The MCP result gives the path of a private file, rather than the key’s value.
4. Use the file with the intended program
Have the approved program read the returned file through its supported configuration mechanism. Keep the value out of generated code, chat replies and diagnostic output. For a first walkthrough, use a dummy value rather than a working credential.
Know the boundary
The receiving agent can read or store a secret it has permission to access. This workflow does not sandbox that agent. Separately, seal_run can pass secrets from SEAL links or inbox items to a program and replace exact secret values in captured output; transformed values can escape that replacement.