Skip to main content
Glama
Leonamin

Naver Mail MCP Server

by Leonamin

list_folders

Retrieve all folder names from your Naver Mail account to organize and access emails efficiently within MCP-compatible clients.

Instructions

메일 폴더 목록 조회

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler logic for 'list_folders', which calls the mail service and formats the output.
    elif name == "list_folders":
        folder_info_list = mail_service.get_folder_list()
        folder_list = folder_info_list_to_folder_list(folder_info_list)
        import json
        content = json.dumps(
            [folder.to_dict() for folder in folder_list], ensure_ascii=False, indent=2)
        return [TextContent(type="text", text=content)]
  • server.py:100-108 (registration)
    Registration of the 'list_folders' tool in the MCP server setup.
    Tool(
        name="list_folders",
        description="메일 폴더 목록 조회",
        inputSchema={
            "type": "object",
            "properties": {},
            "required": [],
        }
    ),
  • Helper method in the MailService class that retrieves the folder list from the mailbox.
    def get_folder_list(self) -> List[FolderInfo]:
        """
        IMAP 형식에 맞는 폴더를 가져옵니다.
        """
        with self._get_mailbox_client() as mailbox:
            return mailbox.folder.list()

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/Leonamin/NaverMail-MCP-Server'

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