Skill: shulkme/temporam-skill (version 0.1.1)

--- name: temporam-temp-mail version: 1.1.0 author: Temporam description: "Provides temporary email receiving functionality using the Temporam API. Use for: generating temporary email addresses, listing emails for a given address, retrieving the content of specific emails, and polling the latest email for an address." --- # Temporam Temporary Mail Skill This skill enables Manus to interact with the Temporam API to manage temporary email addresses. It can generate new email addresses, check for incoming mail, and retrieve email content, which is useful for tasks requiring email verification or temporary communication. ## Capabilities - **Generate Temporary Email Address**: Automatically creates a new, unique email address using an available domain from the Temporam service. - **List Emails**: Retrieves a list of emails received by a specified temporary email address. - **Get Email Content**: Fetches the full content of a specific email using its ID. - **Get Latest Email**: Retrieves the most recent email (with full content) for a specific email address — ideal for polling verification emails without needing to list and then fetch by ID. ## Usage Instructions ### Prerequisites To use this skill, you must have a valid Temporam API Key. Set it as an environment variable named `TEMPORAM_API_KEY` in the sandbox environment before invoking any functions from this skill. ```bash export TEMPORAM_API_KEY="YOUR_API_KEY" ``` ### Generating a Temporary Email Address To generate a new temporary email address, use the `generate_random_email` function from the `client.py` script. Manus will automatically select an available domain. **Example Prompt:** "请帮我生成一个临时的邮箱地址。" **Internal Action (Manus will execute):** ```python from skills.temporam-temp-mail.scripts.client import TemporamClient client = TemporamClient() email_address = client.generate_random_email() print(f"Generated temporary email: {email_address}") ``` ### Listing Emails for an Address To list emails received by a specific temporary email address, use the `list_emails` function. You can specify pagination parameters if needed. **Example Prompt:** "查看 `[REDACTED_SECRET]` 这个邮箱收到了哪些邮件。" **Internal Action (Manus will execute):** ```python from skills.temporam-temp-mail.scripts.client import TemporamClient client = TemporamClient() email_address = "[REDACTED_SECRET]" # Replace with the actual email address emails = client.list_emails(email_address, page=1, limit=10) for email in emails: print(f"Subject: {email["subject"]}, From: {email["from_email"]}") ``` ### Getting Specific Email Content To retrieve the full content of a particular email, provide the email ID to the `get_email_detail` function. **Example Prompt:** "获取 ID 为 `12345` 的邮件内容。" **Internal Action (Manus will execute):** ```python from skills.temporam-temp-mail.scripts.client import TemporamClient client = TemporamClient() email_id = "12345" # Replace with the actual email ID email_detail = client.get_email_detail(email_id) if email_detail: print(f"Email Subject: {email_detail["subject"]}") print(f"Email Content: {email_detail["content"]}") ``` ### Getting the Latest Email for an Address To retrieve the most recent email received by a specific address (including full content), use `get_latest_email`. This is especially useful for polling scenarios where you just need to wait for the next incoming email. **Example Prompt:** "查看 `[REDACTED_SECRET]` 最新收到的邮件。" **Internal Action (Manus will execute):** ```python from skills.temporam-temp-mail.scripts.client import TemporamClient client = TemporamClient() latest = client.get_latest_email("[REDACTED_SECRET]") if latest: print(f"Subject: {latest["subject"]}") print(f"From: {latest["from_email"]}") print(f"Content: {latest["content"]}") else: print("No emails received yet.") ``` ## Workflow Example: Email Verification When a task requires email verification, Manus can perform the following steps: ### Method A: Using `get_latest_email` (Recommended) 1. Generate a temporary email address. 2. Provide this email address to the service requiring verification. 3. Periodically call `get_latest_email` to poll for the verification email. 4. Once received, extract the verification link or code from the `content` field. 5. Complete the verification process. ### Method B: Using `list_emails` + `get_email_detail` 1. Generate a temporary email address. 2. Provide this email address to the service requiring verification. 3. Periodically call `list_emails` to check for new emails. 4. Once a verification email is received, extract the verification link or code using `get_email_detail`. 5. Complete the verification process. ## References - [Temporam API Reference](https://www.temporam.com/docs/api-reference) [1] [1]: https://www.temporam.com/docs/api-reference "Temporam API Reference"

path: CHANGELOG.md
content: # Changelog

All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/), and this project adheres to [Semantic Versioning](https://semver.org/).

## [1.1.0] - 2026-04-15

### Added

- 新增 `get_latest_email` MCP Tool 和客户端方法，支持直接获取指定邮箱最近收到的一封邮件（含完整内容）
- 新增 OpenAPI 端点定义 `GET /v1/emails/latest`
- 新增 `get_latest_email` 工具参数定义（`tool_definition.json`）
- SKILL.md 新增「获取最新邮件」使用示例及推荐的轮询验证工作流

## [1.0.0] - 2026-03-18

### Added

- MCP Server 支持（基于 FastMCP），提供 `get_domains`、`list_emails`、`get_email_content` 三个 Tool
- Python 客户端封装（`TemporamClient`），支持域名查询、邮件列表、邮件详情、随机邮箱生成
- OpenAPI 3.0 接口定义
- Tool 参数定义（`tool_definition.json`）
- API 参考文档


path: clawhub.json
content: {
  "name": "Temporam Temp Mail",
  "tagline": "Generate temporary emails, receive and read messages via Temporam API",
  "description": "A skill that provides temporary email functionality powered by the Temporam API. It enables AI agents to generate disposable email addresses, list incoming emails for any address, and retrieve full email content — ideal for automated email verification, sign-up flows, and temporary communication scenarios.",
  "category": "utility",
  "tags": ["email", "temporary-email", "automation", "verification", "api"],
  "version": "1.1.0",
  "license": "MIT",
  "pricing": "free",
  "support_url": "https://github.com/shulkme/temporam-skill/issues",
  "homepage": "https://github.com/shulkme/temporam-skill"
}


path: README.md
content: # Temporam Temp Mail Skill

基于 [Temporam API](https://www.temporam.com/docs/api-reference) 的临时邮箱 Agent Skill，提供临时邮箱地址生成、邮件列表查询和邮件内容获取功能。适用于需要邮箱验证或临时通信的自动化场景。

## 功能

- **获取可用域名** — 从 Temporam 服务获取可用的邮箱域名列表
- **生成临时邮箱** — 自动生成随机的临时邮箱地址
- **查询邮件列表** — 查看指定临时邮箱收到的邮件，支持分页
- **获取邮件内容** — 根据邮件 ID 获取完整的邮件详情
- **获取最新邮件** — 直接获取指定邮箱最近收到的一封邮件（含完整内容），适合轮询验证码等场景

## 项目结构

```
.
├── SKILL.md          # Skill 定义与使用说明
├── clawhub.json      # ClawHub 发布元数据
├── mcp_server.py     # MCP Server（基于 FastMCP）
└── scripts/
    └── client.py     # Python 客户端封装
```

## 快速开始

### 环境要求

- Python 3.10+
- 有效的 Temporam API Key

### 安装依赖

```bash
pip install requests mcp
```

### 配置 API Key

```bash
export TEMPORAM_API_KEY="your_api_key_here"
```

### 作为 MCP Server 运行

```bash
python mcp_server.py
```

### 作为 Python 客户端使用

```python
from scripts.client import TemporamClient

client = TemporamClient()

# 生成临时邮箱
email = client.generate_random_email()
print(f"临时邮箱: {email}")

# 查询邮件列表
emails = client.list_emails(email)

# 获取邮件内容
detail = client.get_email_detail("<email_id>")

# 获取最新邮件（适合轮询场景）
latest = client.get_latest_email(email)
```

## MCP Tools

| Tool | 说明 |
|------|------|
| `get_domains` | 获取可用邮箱域名列表 |
| `list_emails` | 查询指定邮箱的邮件列表 |
| `get_email_content` | 根据 ID 获取邮件完整内容 |
| `get_latest_email` | 获取指定邮箱最近收到的一封邮件（含完整内容） |

## 许可证

MIT


path: mcp_server.py
content: import os
import requests
import json
from mcp.server.fastmcp import FastMCP

# Initialize FastMCP server
mcp = FastMCP("Temporam Temp Mail")

# Configuration
BASE_URL = "https://api.temporam.com/v1"
[REDACTED_SECRET]"TEMPORAM_API_KEY")

def get_headers():
    if not API_KEY:
        raise ValueError("TEMPORAM_API_KEY environment variable is not set.")
    return {"Authorization": f"Bearer {API_KEY}"}

@mcp.tool()
def get_domains():
    """Get a list of available email domains from Temporam."""
    response = requests.get(f"{BASE_URL}/domains", headers=get_headers())
    response.raise_for_status()
    data = response.json()
    if not data.get("error"):
        return [d["domain"] for d in data.get("data", [])]
    return []

@mcp.tool()
def list_emails(email: str, page: int = 1, limit: int = 20):
    """List emails received by a specific email address."""
    params = {"email": email, "page": page, "limit": limit}
    response = requests.get(f"{BASE_URL}/emails", headers=get_headers(), params=params)
    response.raise_for_status()
    data = response.json()
    if not data.get("error"):
        return data.get("data", [])
    return []

@mcp.tool()
def get_email_content(email_id: str):
    """Get the full content of a specific email by its ID."""
    response = requests.get(f"{BASE_URL}/emails/{email_id}", headers=get_headers())
    response.raise_for_status()
    data = response.json()
    if not data.get("error"):
        return data.get("data", {})
    return {}

@mcp.tool()
def get_latest_email(email: str):
    """Get the most recent email received by a specific email address, including full content."""
    params = {"email": email}
    response = requests.get(f"{BASE_URL}/emails/latest", headers=get_headers(), params=params)
    response.raise_for_status()
    data = response.json()
    if not data.get("error"):
        return data.get("data", {})
    return {}

if __name__ == "__main__":
    mcp.run()


path: scripts/client.py
content: 
import requests
import os
import random
import string

class TemporamClient:
    BASE_URL = "https://api.temporam.com/v1"

    def __init__(self, api_key=None):
        self.[REDACTED_SECRET] or os.environ.get("TEMPORAM_API_KEY")
        if not self.api_key:
            raise ValueError("API Key is required. Please set TEMPORAM_API_KEY environment variable or pass it to the constructor.")
        self.headers = {"Authorization": f"Bearer {self.api_key}"}

    def _make_request(self, method, endpoint, params=None, data=None):
        url = f"{self.BASE_URL}{endpoint}"
        try:
            response = requests.request(method, url, headers=self.headers, params=params, json=data)
            response.raise_for_status()  # Raise HTTPError for bad responses (4xx or 5xx)
            return response.json()
        except requests.exceptions.HTTPError as e:
            print(f"HTTP Error: {e.response.status_code} - {e.response.text}")
            raise
        except requests.exceptions.RequestException as e:
            print(f"Request Error: {e}")
            raise

    def get_domains(self):
        """Returns a list of available email domains."""
        response = self._make_request("GET", "/domains")
        if response and not response.get("error") and response.get("data"):
            return [d["domain"] for d in response["data"]]
        return []

    def list_emails(self, email_address, page=1, limit=20):
        """Returns a list of emails received by a specific email address."""
        params = {"email": email_address, "page": page, "limit": limit}
        response = self._make_request("GET", "/emails", params=params)
        if response and not response.get("error") and response.get("data"):
            return response["data"]
        return []

    def get_email_detail(self, email_id):
        """Returns full details of a specific email, including the email content."""
        endpoint = f"/emails/{email_id}"
        response = self._make_request("GET", endpoint)
        if response and not response.get("error") and response.get("data"):
            return response["data"]
        return None

    def get_latest_email(self, email_address):
        """Returns the most recent email received by a specific email address, including full content."""
        params = {"email": email_address}
        response = self._make_request("GET", "/emails/latest", params=params)
        if response and not response.get("error") and response.get("data"):
            return response["data"]
        return None

    def generate_random_email(self, domain=None):
        """Generates a random email address using an available domain."""
        if not domain:
            domains = self.get_domains()
            if not domains:
                raise ValueError("No available domains found.")
            domain = random.choice(domains)
        
        username_length = random.randint(8, 12)
        username = ''.join(random.choice(string.ascii_lowercase + string.digits) for _ in range(username_length))
        return f"{username}@{domain}"

if __name__ == '__main__':
    # Example usage (for testing purposes)
    # Set your API key as an environment variable: export TEMPORAM_API_KEY="YOUR_API_KEY"
    try:
        client = TemporamClient()
        
        # 1. Generate a random email
        print("Generating random email...")
        random_email = client.generate_random_email()
        print(f"Generated Email: {random_email}")

        # 2. List emails for the generated address (initially empty)
        print(f"\nListing emails for {random_email}...")
        emails = client.list_emails(random_email)
        if emails:
            for email in emails:
                print(f"  - Subject: {email['subject']}, From: {email['from_email']}")
        else:
            print("  No emails found yet.")

        # 3. (Optional) If you manually send an email to random_email, you can then fetch its content
        # email_id = "<ID_OF_A_RECEIVED_EMAIL>"
        # print(f"\nGetting detail for email ID {email_id}...")
        # email_detail = client.get_email_detail(email_id)
        # if email_detail:
        #     print(f"  Subject: {email_detail['subject']}")
        #     print(f"  Content: {email_detail['content'][:200]}...") # Print first 200 chars
        # else:
        #     print("  Email not found.")

    except ValueError as e:
        print(f"Error: {e}")
    except Exception as e:
        print(f"An unexpected error occurred: {e}")


Security scan verdicts — ClawScan: clean | static analysis: clean | VirusTotal: clean | SkillSpector: suspicious (HIGH)