agentlair — Claude Code MCP server: email, vault, trust score
Hands your agent an @agentlair.dev mailbox, an encrypted secret store and a behavioural trust score. Useful when the agent has to send mail and keep credentials.
claude mcp add agentlair -e AGENTLAIR_API_KEY=<AGENTLAIR_API_KEY> -- npx -y @agentlair/mcpWhat agentlair does
The server runs with npx @agentlair/mcp@latest and exposes nine tools to an MCP client: agent registration, sending and reading email, vault store and get, audit event emission, trust score lookups. No OAuth step — one POST to the register endpoint returns an api_key and a mailbox address.
Vault entries are encrypted client-side with AES-GCM, so the service only ever holds ciphertext. Actions land in an audit log signed with Ed25519, and the trust score runs 0 to 100 based on what the agent has actually done. There is also an Agent Attestation Token: a short-lived EdDSA JWT carrying the agent's did:web identity and score, which you pass in the Authorization header on a memory write. The receiving side verifies it through standard JWKS and can reject writes from agents below a chosen trust level.
Nothing starts without AGENTLAIR_API_KEY, and the key is shown once at registration — save it then. The free tier covers 10 emails per day, 100 API requests per day and 10 addresses. Pro is $5 per stack per month.
What it helps with
- give an agent its own email address without OAuth or human approval
- keep agent credentials encrypted instead of in plaintext config
- sign a shared-memory write so its author is provable
- produce a tamper-evident log of what the agent did
- isolate several agents into separate namespaces
Example prompts for the agent
- Check the inbox at
[email protected]and list unread messages - Send an email to
[email protected]with subject “Weekly report” and the body fromreport.md - Store
OPENAI_API_KEYin the vault under the nameopenai_key
How to install agentlair
Platform CLI
claude mcp add agentlair -e AGENTLAIR_API_KEY=<AGENTLAIR_API_KEY> -- npx -y @agentlair/mcpReplace <…> with your own values
Platform CLI
codex mcp add agentlair --env AGENTLAIR_API_KEY=<AGENTLAIR_API_KEY> -- npx -y @agentlair/mcpReplace <…> with your own values
Config file
{
"mcpServers": {
"agentlair": {
"command": "npx",
"args": [
"-y",
"@agentlair/mcp"
],
"env": {
"AGENTLAIR_API_KEY": "<AGENTLAIR_API_KEY>"
}
}
}
}Replace <…> with your own values
Config file
{
"servers": {
"agentlair": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@agentlair/mcp"
],
"env": {
"AGENTLAIR_API_KEY": "<AGENTLAIR_API_KEY>"
}
}
}
}Replace <…> with your own values
Platform CLI
gemini mcp add -e AGENTLAIR_API_KEY=<AGENTLAIR_API_KEY> agentlair npx -y @agentlair/mcpReplace <…> with your own values
Step by step, with commands for each platform: How to add an MCP server to Claude Code, Codex, Cursor, VS Code, Gemini CLI and more
Questions about agentlair
How do I install agentlair in Claude Code?
Run claude mcp add agentlair -e AGENTLAIR_API_KEY=<AGENTLAIR_API_KEY> -- npx -y @agentlair/mcp, replacing the placeholder with your own key.
What does agentlair do?
It gives an agent a mailbox on @agentlair.dev, an encrypted vault for secrets, a signed action log and a behavioural trust score, all reachable as MCP tools.
What do I need before running agentlair?
An AGENTLAIR_API_KEY, issued when you register an agent via POST https://agentlair.dev/v1/auth/agent-register. The server will not start without it.