# Docs - [Workspace Guides](/llms.mdx/docs/guides/llms-full.txt): Mail triage, AI privacy shield, MCP agents & shortcuts - [Welcome to Bryfo](/llms.mdx/docs/guides.md): Overview of the privacy-first, AI-native email workspace for self-hosted teams and cloud users. - [Connecting Mailboxes & Import](/llms.mdx/docs/guides/connecting-mail.md): Connect Gmail, Outlook, NetEase 163, QQ, LarkSuite, iCloud, custom IMAP/SMTP, or managed domain mailboxes. - [Calm Triage, The Feed & AI Briefs](/llms.mdx/docs/guides/calm-triage.md): Keep your primary Inbox quiet with Screener, newsletter magazine view, twice-daily AI briefs, and follow-up reminders. - [Hybrid Search, AI Shield & 0-Credit BYOK](/llms.mdx/docs/guides/search-and-ai.md): Structured query operators, local attachment indexing, bidirectional PII redaction, personal voice, and Bring Your Own Key. - [External MCP Agents, Themes & Shortcuts](/llms.mdx/docs/guides/mcp-and-shortcuts.md): Connect Claude, Cursor, or Codex to /mcp with human-in-the-loop write approvals, switch theme skins, and master keyboard triage. - [Self-Hosting & Admin](/llms.mdx/docs/self-hosting/llms-full.txt): 4-variable Docker deployment, /admin control plane, Stalwart & SRE runbook - [4-Variable Docker Quick Start](/llms.mdx/docs/self-hosting.md): Launch Bryfo in minutes with Docker Compose and 4 bootstrap environment variables. - [Hardened Compose, Split Modes & Reverse Proxy](/llms.mdx/docs/self-hosting/production-hardening.md): Production container sandboxing, APP_MODE split topologies, and SSE-safe Nginx/Caddy templates. - [/admin Control Plane & Hot Settings](/llms.mdx/docs/self-hosting/admin-console.md): Configure OIDC, XOAUTH2, S3/R2 storage, AI routing, and 5 emergency circuit breakers live without container restarts. - [Managed Mail Server (Stalwart v1.2.1)](/llms.mdx/docs/self-hosting/stalwart-mailserver.md): Host custom-domain mailboxes via the optional Stalwart v1.2.1 JMAP sidecar and automated DNS verification. - [Operations, Backups, Key Rotation & Cloud Mode](/llms.mdx/docs/self-hosting/operations-and-cloud.md): Upgrades, age-encrypted disaster recovery drills, zero-downtime KeyRing rotation, Prometheus/Grafana, and cloud billing. - [API & MCP Reference](/llms.mdx/docs/api/llms-full.txt): HTTP /api/v1, real-time SSE, Streamable HTTP /mcp & OpenAPI - [HTTP Conventions, CSRF, Step-Up & Error Codes](/llms.mdx/docs/api.md): Authentication cookies, X-Bryfo-Step-Up elevation, CSRF checks, Redis rate limits, and structured JSON errors. - [Real-Time SSE & Streamable HTTP MCP](/llms.mdx/docs/api/sse-and-mcp.md): Event payloads on /api/v1/events and the 12 tools exposed by the built-in bryfo-mail MCP server. - [Managed Mail Server Contract (Rev 2)](/llms.mdx/docs/api/mailserver-contract.md): Wire contract, durable 202 operations, localpart validation, and error codes for Stalwart v1.2.1 domain mailboxes. - Interactive OpenAPI - [AI](/llms.mdx/docs/api/rest/ai.md): Bidirectional PII-redacted AI briefs, personal writing style, rules compiler, and BYOK. - [Authentication](/llms.mdx/docs/api/rest/authentication.md): Session auth, TOTP 2FA, OIDC SSO, and 10-minute X-Bryfo-Step-Up elevation. - [Infrastructure](/llms.mdx/docs/api/rest/infrastructure.md): Liveness, readiness, anti-indexing, and Prometheus scrape probes. - [Mail](/llms.mdx/docs/api/rest/mail.md): Unified threads, hybrid search, Screener, The Feed, and RFC 8058 bulk unsubscribe. - [Mailserver](/llms.mdx/docs/api/rest/mailserver.md): Stalwart v1.2.1 JMAP domain provisioning, DNS checks, and self-claim mailboxes. - [MCP](/llms.mdx/docs/api/rest/mcp.md): Scoped Bearer token management and Streamable HTTP /mcp human-approval controls. - [Architecture & Security](/llms.mdx/docs/architecture/llms-full.txt): System topology, SHA-256 dedup, PII engine, netguard & ledger - [System Topology, Storage & Hybrid RAG](/llms.mdx/docs/architecture.md): Single-binary Go + React architecture, bounded IMAP streaming, SHA-256 blob deduplication, and RRF vector search. - [Bidirectional PII Engine & Defense-in-Depth Security](/llms.mdx/docs/architecture/privacy-and-security.md): 7-validator PII masking, Magpie tool loop, netguard anti-SSRF/anti-rebinding, SandboxMediaCSP, and KeyRing cryptography. - [Commercial Ledger & Dual-Currency Economics](/llms.mdx/docs/architecture/commercial-ledger.md): Integer minor-unit USD/CNY pricing, append-only dual-pool credit_ledger, fail-closed webhooks, and on-demand IMAP caching. # Docs - [使用指南](/llms.mdx/zh/docs/guides/llms-full.txt): 邮箱接入、安静收件箱分流、AI 双向脱敏、MCP 代理与快捷键 - [欢迎使用 Bryfo](/llms.mdx/zh/docs/guides.md): 面向个人、自托管团队与云端用户的隐私优先 AI 邮件工作台概览。 - [连接邮箱账号与归档导入](/llms.mdx/zh/docs/guides/connecting-mail.md): 接入 Gmail、Outlook、网易 163、QQ、飞书、iCloud、自定义 IMAP/SMTP 或自建域名邮箱。 - [安静收件箱分流、订阅流与 AI 简报](/llms.mdx/zh/docs/guides/calm-triage.md): 使用 Screener 陌生人拦截、The Feed 杂志流、早晚 AI 简报与未回复跟进提醒保持主收件箱清爽。 - [混合搜索、AI 隐私护盾与 0 积分 BYOK](/llms.mdx/zh/docs/guides/search-and-ai.md): 搜索算子速查、附件全文与向量检索、双向 PII 脱敏沙盒、个人文风学习与自有密钥接入。 - [外部 MCP 代理、主题皮肤与快捷键](/llms.mdx/zh/docs/guides/mcp-and-shortcuts.md): 将 Claude、Cursor 或 Codex 接入 /mcp(支持写操作人工审批),切换 5 套主题皮肤并掌握全键盘操作。 - [自托管与管理台](/llms.mdx/zh/docs/self-hosting/llms-full.txt): 4 变量 Docker 快速部署、/admin 热配置控制台、Stalwart 自建邮局与生产运维 - [4 变量 Docker 快速启动](/llms.mdx/zh/docs/self-hosting.md): 仅需 4 个基础环境变量即可拉起完整的自托管 Bryfo 实例。 - [生产加固编排、进程拆分与反向代理](/llms.mdx/zh/docs/self-hosting/production-hardening.md): 只读容器沙盒、APP_MODE 拆分扩缩容,以及支持 SSE 流式直通的 Nginx/Caddy 反代模板。 - [/admin 管理控制面与热配置](/llms.mdx/zh/docs/self-hosting/admin-console.md): 无需重启容器,在线配置 OIDC、邮箱 XOAUTH2、S3/R2 对象存储、AI 模型池与 5 大蓝队紧急熔断开关。 - [自建托管域名邮局(Stalwart v1.2.1)](/llms.mdx/zh/docs/self-hosting/stalwart-mailserver.md): 通过可选的 Stalwart v1.2.1 JMAP Sidecar 编排自建域名邮箱与自动化 DNS 核验。 - [生产运维、加密备份、密钥轮换与云模式](/llms.mdx/zh/docs/self-hosting/operations-and-cloud.md): 无停机密钥重加密、age 加密备份与异机演练、Prometheus/Grafana 监控及商业云运维规范。 - [接口与 MCP 协议](/llms.mdx/zh/docs/api/llms-full.txt): HTTP /api/v1 规范、SSE 事件流、内置 MCP 服务端与交互式 OpenAPI - [HTTP 通用规范、CSRF、Step-Up 与错误码](/llms.mdx/zh/docs/api.md): 会话 Cookie、X-Bryfo-Step-Up 提权头、CSRF 校验、Redis 限流矩阵与统一 JSON 错误信封。 - [实时 SSE 事件流与内置 MCP 服务端](/llms.mdx/zh/docs/api/sse-and-mcp.md): /api/v1/events 推送契约与 bryfo-mail v0.2.0 暴露的 12 个 MCP 工具说明。 - [托管自建邮局 API 契约(Rev 2)](/llms.mdx/zh/docs/api/mailserver-contract.md): Stalwart v1.2.1 托管域名邮箱的路由、202 异步持久队列、前缀校验与错误码规范。 - 交互式 OpenAPI - [AI](/llms.mdx/zh/docs/api/rest/ai.md): Bidirectional PII-redacted AI briefs, personal writing style, rules compiler, and BYOK. - [Authentication](/llms.mdx/zh/docs/api/rest/authentication.md): Session auth, TOTP 2FA, OIDC SSO, and 10-minute X-Bryfo-Step-Up elevation. - [Infrastructure](/llms.mdx/zh/docs/api/rest/infrastructure.md): Liveness, readiness, anti-indexing, and Prometheus scrape probes. - [Mail](/llms.mdx/zh/docs/api/rest/mail.md): Unified threads, hybrid search, Screener, The Feed, and RFC 8058 bulk unsubscribe. - [Mailserver](/llms.mdx/zh/docs/api/rest/mailserver.md): Stalwart v1.2.1 JMAP domain provisioning, DNS checks, and self-claim mailboxes. - [MCP](/llms.mdx/zh/docs/api/rest/mcp.md): Scoped Bearer token management and Streamable HTTP /mcp human-approval controls. - [安全与系统架构](/llms.mdx/zh/docs/architecture/llms-full.txt): 分层拓扑、SHA-256 去重存储、双向 PII 引擎、netguard 防护与双池账本 - [系统分层拓扑、存储去重与混合检索](/llms.mdx/zh/docs/architecture.md): Go 单二进制分层边界、有界 IMAP 流式拉取、SHA-256 内容寻址去重与 RRF 混合搜索架构。 - [双向 PII 脱敏引擎与纵深安全防线](/llms.mdx/zh/docs/architecture/privacy-and-security.md): 7 类校验器脱敏流水线、6 轮工具还原闭环、netguard 防 DNS 重绑定、CSP 媒体沙盒与密钥环加密。 - [商业双资金池账本与云存储经济学](/llms.mdx/zh/docs/architecture/commercial-ledger.md): 整数分/美分双币种定价、只追加双池积分账本、Fail-Closed 支付回调与大附件按需流式缓存。