NabehApp Documentation for AI Agents
NabehApp equips autonomous AI agents with dedicated, sandboxed email inboxesβallowing them to receive incoming mail and extract OTP verification codes in real-time via the Model Context Protocol (MCP) or modern REST APIs.
get_latest_otp directly and completes the workflow autonomously.
60-Second Quickstart #
Follow these 3 simple steps to connect your agent:
Create an Agent Mailbox in Dashboard
Go to the NabehApp Dashboard and click + Add New Agent. Pick a username (e.g. coder@nabehapp.com).
Copy the One-Time API Key
Your secure agent key (pn_agt_...) is revealed exactly once. Copy it immediately to your agent's .env file. For security, it is permanently encrypted after reveal.
Add the Remote MCP Server to your Agent
Paste the pre-built configuration into your IDE (Cursor, Claude Desktop, or Cline) and start operating immediately.
Connect with Cursor & Cline (Remote MCP) #
NabehApp officially supports the Remote Model Context Protocol (MCP). Add this to .cursor/mcp.json or Cline in VS Code:
{
"mcpServers": {
"nabeh-mail": {
"type": "remote",
"url": "https://portal.nabehapp.com/api/mcp",
"headers": {
"Authorization": "Bearer pn_agt_YOUR_AGENT_KEY",
"X-Mail-Token": "pn_agt_YOUR_AGENT_KEY",
"X-Mailbox": "your_agent@nabehapp.com"
}
}
}
}
pn_agt_YOUR_AGENT_KEY with your copied secret key, and your_agent@nabehapp.com with your mailbox address.
Connect with Claude Desktop #
Add to your claude_desktop_config.json file:
- macOS:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json - Linux:
~/.config/Claude/claude_desktop_config.json
{
"mcpServers": {
"nabeh-agent-inbox": {
"type": "remote",
"url": "https://portal.nabehapp.com/api/mcp",
"headers": {
"Authorization": "Bearer pn_agt_YOUR_AGENT_KEY",
"X-Mailbox": "your_agent@nabehapp.com"
}
}
}
}
Environment Variables (.env) #
If you are building custom agents with Python, Node.js, LangChain, or CrewAI, add these variables to your .env file:
# NabehApp Agent Mail Configuration
NABEH_AGENT_KEY="pn_agt_YOUR_AGENT_KEY"
NABEH_MAILBOX="your_agent@nabehapp.com"
NABEH_MCP_URL="https://portal.nabehapp.com/api/mcp"
Direct Python API Call #
Simple Python snippet to fetch the latest OTP code directly via MCP tool invocation:
import os
import requests
AGENT_KEY = os.getenv("NABEH_AGENT_KEY", "pn_agt_YOUR_AGENT_KEY")
MAILBOX = os.getenv("NABEH_MAILBOX", "your_agent@nabehapp.com")
def get_latest_otp():
"""Extract the latest OTP verification code received by the agent"""
url = "https://portal.nabehapp.com/api/mcp"
payload = {
"jsonrpc": "2.0",
"id": "1",
"method": "tools/call",
"params": {
"name": "get_latest_otp",
"arguments": {
"mailbox": MAILBOX
}
}
}
headers = {
"Authorization": f"Bearer {AGENT_KEY}",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
data = response.json()
return data.get("result", {})
if __name__ == "__main__":
result = get_latest_otp()
print("Latest OTP Result:", result)
The 7 MCP Mail Tools Reference #
The NabehApp Remote MCP Server provides 7 specialized tools for full autonomous email capability:
1. get_latest_otp β (Primary Tool)
Instant sub-second extraction of the most recent OTP verification code with optional immediate consumption (consume: true).
2. list_incoming_emails
Lists incoming messages for the mailbox with message IDs, timestamps, sender details, and content snippets.
3. read_email
Retrieves the full MIME body, attachments, and decoded HTML/text content for a specific numeric email id.
4. send_email
Sends outbound or transactional email using verified domains and automatic idempotency key handling.
5. search_emails
Searches mailbox messages by keyword across subject lines, senders, and message bodies.
6. delete_email
Permanently deletes a processed message from the mailbox for privacy and hygiene.
7. clear_temporary_otps
Purges all temporary verification codes and ephemeral OTP records for the mailbox with a single command.
Security, Privacy & Isolation #
One-Time Key Reveal & SHA-256 Encryption
Following industry standards (similar to OpenAI and Anthropic), API keys are revealed to users exactly once upon creation. Once copied, plaintext keys are wiped from memory and permanently stored encrypted in D1 database records.
Agent Mailbox Sandboxing
Each agent mailbox operates in complete tenant isolation. Agents cannot inspect messages belonging to other mailboxes without explicit authorization, ensuring total safety when utilizing third-party autonomous AI swarms.
Frequently Asked Questions (FAQ) #
How fast is OTP code delivery?
Incoming emails are processed instantly at Cloudflare's global edge network in sub-second speeds.
What if I lose my agent's API key?
In the dashboard, open your mailbox and click π Generate New Key. The old key is revoked immediately and a new key is revealed once for you to copy.
Can I connect custom domains?
Yes! Pro and Team plans support connecting custom domains (e.g. @agent.yourbrand.com) with full MCP protocol compatibility.