Skip to main content
Glama
TimeCyber

Email MCP Server

by TimeCyber

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);
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It hints at advanced usage but doesn't specify if this is a write operation (likely, given 'configure'), what permissions are required, whether changes are reversible, or any rate limits. For a configuration tool with 8 parameters and no annotations, this is a significant gap in transparency about its effects and constraints.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence in Chinese: '手动配置邮箱服务器设置(高级用户使用)'. It's front-loaded with the core action and resource, and the parenthetical adds context without verbosity. However, it could be more structured by explicitly separating purpose from guidelines, but it earns a 4 for being appropriately sized with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the complexity (8 parameters, configuration tool), lack of annotations, and no output schema, the description is incomplete. It doesn't explain what happens after configuration (e.g., success/failure states, return values), behavioral risks, or integration with sibling tools. For a tool that likely mutates system settings, more context is needed to guide safe and effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, with all 8 parameters clearly documented in the input schema (e.g., SMTP/IMAP settings, user credentials). The description adds no additional parameter information beyond the schema, such as format examples or interdependencies. Given the high schema coverage, the baseline score of 3 is appropriate, as the schema does the heavy lifting without description enhancement.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states the tool's purpose as 'manually configure email server settings (for advanced users)', which is clear but vague. It specifies the action ('configure') and resource ('email server settings'), but lacks detail on what exactly is configured. It distinguishes from siblings like 'send_email' or 'get_email_content' by focusing on configuration, but doesn't explicitly differentiate from 'setup_email_account' or 'test_email_connection', which might overlap in purpose.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides minimal guidance: it mentions 'for advanced users', implying complexity or risk, but offers no explicit when-to-use rules, prerequisites, or alternatives. It doesn't clarify when to use this versus 'setup_email_account' (which might be simpler) or 'test_email_connection' (which might be for validation), leaving the agent with little direction on tool selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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