Skip to main content
Glama
jhw7500

Email MCP Server

by jhw7500

read_email

Retrieve complete email content including body text and attachment lists by specifying the email ID. This tool accesses messages from email servers for viewing and analysis.

Instructions

특정 이메일의 전체 내용을 읽습니다. 본문과 첨부파일 목록을 포함합니다.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYes이메일 ID (list_emails에서 반환된 id)

Implementation Reference

  • Implementation of the 'read_email' tool handler. It uses the POP3 client to fetch email details by ID and formats the output.
    case "read_email": {
      const id = args.id as number;
      const email = await withConnection(config, (client) => client.getEmail(id));
    
      let text =
        `**${email.subject}**\n` +
        `From: ${email.from}\n` +
        `To: ${email.to}\n` +
        (email.cc ? `CC: ${email.cc}\n` : "") +
        `Date: ${email.date ? new Date(email.date).toLocaleString("ko-KR") : ""}\n\n` +
        `---\n\n${email.body || "(본문 없음)"}`;
    
      if (email.attachments.length > 0) {
        text +=
          `\n\n---\n**첨부파일 (${email.attachments.length}개):**\n` +
          email.attachments
            .map((a) => `- ${a.filename} (${(a.size / 1024).toFixed(1)}KB)`)
            .join("\n");
      }
      return { content: [{ type: "text" as const, text }] };
    }
  • Tool definition and input schema for 'read_email'.
      name: "read_email",
      description: "특정 이메일의 전체 내용을 읽습니다. 본문과 첨부파일 목록을 포함합니다.",
      inputSchema: {
        type: "object" as const,
        properties: {
          id: { type: "number", description: "이메일 ID (list_emails에서 반환된 id)" },
        },
        required: ["id"],
      },
    },

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/jhw7500/email-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server