Skip to main content
Glama

configure_email_server

Manually configure email server settings for sending and receiving emails. Specify SMTP and IMAP parameters like host, port, security, and credentials to connect email accounts.

Instructions

手动配置邮箱服务器设置(高级用户使用)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
smtpHostNoSMTP服务器地址
smtpPortNoSMTP端口
smtpSecureNo是否使用SSL
imapHostNoIMAP服务器地址
imapPortNoIMAP端口
imapSecureNo是否使用SSL
userYes邮箱账号
passwordYes邮箱密码或授权码

Implementation Reference

  • The core handler function for the 'configure_email_server' tool. It destructures the input arguments and updates the corresponding environment variables for SMTP and IMAP configurations. Then it constructs a summary of the updated configuration and returns it as a text response.
    async configureEmailServer(args) { const { smtpHost, smtpPort, smtpSecure, imapHost, imapPort, imapSecure, user, password } = args; // 更新环境变量 if (smtpHost) process.env.EMAIL_SMTP_HOST = smtpHost; if (smtpPort) process.env.EMAIL_SMTP_PORT = smtpPort.toString(); if (smtpSecure !== undefined) process.env.EMAIL_SMTP_SECURE = smtpSecure.toString(); if (imapHost) process.env.EMAIL_IMAP_HOST = imapHost; if (imapPort) process.env.EMAIL_IMAP_PORT = imapPort.toString(); if (imapSecure !== undefined) process.env.EMAIL_IMAP_SECURE = imapSecure.toString(); if (user) process.env.EMAIL_USER = user; if (password) process.env.EMAIL_PASSWORD = password; let configInfo = '邮箱配置已更新:\n'; configInfo += `SMTP服务器: ${process.env.EMAIL_SMTP_HOST || '未设置'}\n`; configInfo += `SMTP端口: ${process.env.EMAIL_SMTP_PORT || '未设置'}\n`; configInfo += `SMTP SSL: ${process.env.EMAIL_SMTP_SECURE || '未设置'}\n`; configInfo += `IMAP服务器: ${process.env.EMAIL_IMAP_HOST || '未设置'}\n`; configInfo += `IMAP端口: ${process.env.EMAIL_IMAP_PORT || '未设置'}\n`; configInfo += `IMAP SSL: ${process.env.EMAIL_IMAP_SECURE || '未设置'}\n`; configInfo += `用户: ${user || '未更新'}`; return { content: [ { type: 'text', text: configInfo } ] }; }
  • Input schema definition for the 'configure_email_server' tool, specifying properties for SMTP and IMAP server configurations, user credentials, with required fields 'user' and 'password'.
    inputSchema: { type: 'object', properties: { smtpHost: { type: 'string', description: 'SMTP服务器地址' }, smtpPort: { type: 'number', description: 'SMTP端口' }, smtpSecure: { type: 'boolean', description: '是否使用SSL' }, imapHost: { type: 'string', description: 'IMAP服务器地址' }, imapPort: { type: 'number', description: 'IMAP端口' }, imapSecure: { type: 'boolean', description: '是否使用SSL' }, user: { type: 'string', description: '邮箱账号' }, password: { type: 'string', description: '邮箱密码或授权码' } }, required: ['user', 'password'] }
  • index.js:279-320 (registration)
    Tool registration in the list of available tools returned by ListToolsRequestSchema, including name, description, and input schema.
    { name: 'configure_email_server', description: '手动配置邮箱服务器设置(高级用户使用)', inputSchema: { type: 'object', properties: { smtpHost: { type: 'string', description: 'SMTP服务器地址' }, smtpPort: { type: 'number', description: 'SMTP端口' }, smtpSecure: { type: 'boolean', description: '是否使用SSL' }, imapHost: { type: 'string', description: 'IMAP服务器地址' }, imapPort: { type: 'number', description: 'IMAP端口' }, imapSecure: { type: 'boolean', description: '是否使用SSL' }, user: { type: 'string', description: '邮箱账号' }, password: { type: 'string', description: '邮箱密码或授权码' } }, required: ['user', 'password'] } },
  • index.js:356-357 (registration)
    Dispatcher case in the CallToolRequestSchema handler that routes calls to the 'configure_email_server' handler method.
    case 'configure_email_server': return await this.configureEmailServer(args);

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/TimeCyber/email-mcp'

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