An MCP (Model Context Protocol) server based on the ChatTempMail API, providing temporary email address management functionality.
Features
Email Address Management
- ✅ Get available domains
- ✅ Create temporary email addresses
- ✅ Display email address list
- ✅ Delete email addresses
Message Management
- ✅ Get message list for email addresses
- ✅ Display detailed message content
- ✅ Delete messages
Webhook Configuration
- ✅ Get Webhook settings
- ✅ Configure Webhook settings
Installation and Usage
1. Get API Key
- Visit chat-tempmail.com
- Register an account and log in
- Create an API key on the profile page
2. Setup in MCP Client
Please add the configuration to the settings file of MCP-supported applications like Claude Desktop or Cursor. Be sure to set the API key as an environment variable:
Install from source code:
{
"mcpServers": {
"tempmail": {
"command": "npx",
"args": [
"--from",
"git+https://github.com/Selenium39/mcp-server-tempmail.git",
"mcp-server-tempmail"
],
"env": {
"TEMPMAIL_API_KEY": "your-api-key-here",
"TEMPMAIL_BASE_URL": "https://chat-tempmail.com"
}
}
}
}
Install from package manager:
{
"mcpServers": {
"tempmail": {
"command": "npx",
"args": ["mcp-server-tempmail"],
"env": {
"TEMPMAIL_API_KEY": "your-api-key-here",
"TEMPMAIL_BASE_URL": "https://chat-tempmail.com"
}
}
}
}
⚠️ Important:
- Please replace
your-api-key-here
with the actual API key obtained from chat-tempmail.com -
TEMPMAIL_BASE_URL
is optional, if not specified, the default ishttps://chat-tempmail.com
3. Restart Application
After setup is complete, restart the corresponding MCP client application to use it.
MCP Tool Description
Email Address Management Tools
get_email_domains
Get all available email domains in the system.
Parameters: No parameters
create_email
Create a new temporary email address.
Parameters:
-
name
(required): Email address prefix name -
domain
(required): Email domain -
expiryTime
(required): Expiration time, options:-
3600000
- 1 hour -
86400000
- 1 day -
259200000
- 3 days -
0
- Permanent
-
list_emails
Get all email addresses in the account.
Parameters:
-
cursor
(optional): Paging cursor
delete_email
Delete the specified email address.
Parameters:
-
emailId
(required): Email address ID
Message Management Tools
get_messages
Get all messages for the specified email address.
Parameters:
-
emailId
(required): Email address ID -
cursor
(optional): Paging cursor
get_message_detail
Get detailed content of the specified message.
Parameters:
-
emailId
(required): Email address ID -
messageId
(required): Message ID
delete_message
Delete the specified message.
Parameters:
-
emailId
(required): Email address ID -
messageId
(required): Message ID
Webhook Configuration Tools
get_webhook_config
Get current webhook configuration information.
Parameters: No parameters
set_webhook_config
Set or update webhook configuration.
Parameters:
-
url
(required): Webhook URL address -
enabled
(required): Whether to enable Webhook
Usage Examples
Get Available Domains
Please get all available email domains.
Create Temporary Email Address
Please create an email address named "test" using the domain "chat-tempmail.com" with an expiration time of 1 hour.
Display Messages for Email Address
Please display all messages for email address ID "c2c4f894-c672-4d5b-a918-abca95aff1f7".
Display Message Details
Please display the detailed content of message ID "fd13a8df-1465-4fbc-a612-ca7311c31ff2" for email address ID "c2c4f894-c672-4d5b-a918-abca95aff1f7".
Real-World Usage Scenarios
1. Automated Testing and Development
Scenario: Testing email verification processes in applications
1. Create temporary email for testing
2. Use email in application registration process
3. Monitor verification emails
4. Automatically extract verification codes
5. Complete verification process
AI Command Example:
Please create a temporary email named "test-user" with a 1-hour expiration time, then monitor any incoming emails and extract any verification codes.
2. API Integration Testing
Scenario: Testing third-party services that require email verification
1. Generate temporary email for API testing
2. Use email in service registration
3. Monitor confirmation emails
4. Extract API keys or access tokens
5. Clean up temporary resources
3. Privacy Protection During Development
Scenario: Protecting your real email during development and testing
1. Create temporary emails for different test scenarios
2. Use them in development environments
3. Monitor email flows without exposing personal data
4. Automatically clean up expired emails
Security Risks and Best Practices
Connecting any data source to LLMs carries inherent risks, especially when it stores sensitive data. ChatTempMail is no exception, so it's important to understand the risks you should be aware of and the additional precautions you can take to mitigate these risks.
Prompt Injection
The primary attack vector unique to LLMs is prompt injection, where LLMs may be tricked into following untrusted commands in user content.
Important Note: Most MCP clients (such as Cursor) require you to manually approve each tool call before execution. We recommend you always keep this setting enabled and always review the details before executing tool calls.
Recommendations
To mitigate security risks when using the ChatTempMail MCP server, we recommend adopting the following best practices:
Don't connect to production data: Use the MCP server with test data, not production data. LLMs are excellent at helping design and test applications, so leverage them in a safe environment without exposing real data.
Don't provide to customers: The MCP server runs in your developer permission context, so it should not be provided to your customers or end users. Instead, use it as an internal developer tool to help you build and test applications.
API key protection: Store API keys securely in environment variables and never expose them in public repositories or client-side code.
Regular cleanup: Set up automatic cleanup of expired emails and regularly delete unused temporary emails.
Monitor usage: Monitor API usage for suspicious activity and implement appropriate error handling and retry logic.
Supported MCP Clients
The ChatTempMail MCP server is compatible with the following MCP-supported clients:
- Cursor
- Windsurf (Codium)
- Visual Studio Code (Copilot)
- Cline (VS Code extension)
- Claude desktop
- Claude code
- Amp
Resources
Notes
- Please set the API key as the environment variable
TEMPMAIL_API_KEY
. Be careful not to lose it, and do not leak it in public places - The base URL can be customized via the environment variable
TEMPMAIL_BASE_URL
(default ishttps://chat-tempmail.com
) - Temporary email addresses will automatically expire according to the set expiration time
- Use
nextCursor
in paging queries to get more data - Ensure environment variables are correctly set in the MCP client configuration file
License
MIT
Contribution
Issues and Pull Requests are welcome.
Top comments (0)