# agentlair

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.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 5
- Author: piiiico
- License: MIT · policy=link-only · description only; the file stays with the author
- Source: https://github.com/piiiico/agentlair
- Updated: 2026-08-22
- HTML: https://affpapa.org/en/nevibecode/mcp/agentlair

## What it 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.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `AGENTLAIR_API_KEY` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add agentlair -e AGENTLAIR_API_KEY=<AGENTLAIR_API_KEY> -- npx -y @agentlair/mcp
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add agentlair --env AGENTLAIR_API_KEY=<AGENTLAIR_API_KEY> -- npx -y @agentlair/mcp
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "agentlair": {
            "command": "npx",
            "args": [
                "-y",
                "@agentlair/mcp"
            ],
            "env": {
                "AGENTLAIR_API_KEY": "<AGENTLAIR_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "agentlair": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@agentlair/mcp"
            ],
            "env": {
                "AGENTLAIR_API_KEY": "<AGENTLAIR_API_KEY>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e AGENTLAIR_API_KEY=<AGENTLAIR_API_KEY> agentlair npx -y @agentlair/mcp
```
Replace <…> with your own values

## When to use it
- 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
- Check the inbox at `my-research-agent@agentlair.dev` and list unread messages
- Send an email to `team@example.com` with subject “Weekly report” and the body from `report.md`
- Store `OPENAI_API_KEY` in the vault under the name `openai_key`

## Similar
- [email-quality-auditor](https://affpapa.org/en/nevibecode/skills/email-quality-auditor.md) — skill · 1000 installs
- [Hlido Agent Reviews](https://affpapa.org/en/nevibecode/mcp/hlido-agent-reviews.md) — MCP server
- [onepassword](https://affpapa.org/en/nevibecode/mcp/onepassword.md) — MCP server · ★ 81
- [aegis](https://affpapa.org/en/nevibecode/mcp/aegis.md) — MCP server · ★ 15
- [enigmagent-mcp](https://affpapa.org/en/nevibecode/mcp/enigmagent-mcp.md) — MCP server · ★ 6
- [secrets-management](https://affpapa.org/en/nevibecode/skills/secrets-management.md) — skill · 13122 installs

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
