MCP Server
Stamp0 MCP server for AI agents. Enable Claude, Cursor, and other AI tools to manage email inboxes autonomously.
The Stamp0 MCP (Model Context Protocol) server allows AI agents like Claude to create inboxes, check emails, and verify email flows autonomously. This is perfect for AI-assisted testing and development.
What is MCP?
MCP (Model Context Protocol) is an open protocol that allows AI models to interact with external tools and services. With the Stamp0 MCP server, AI agents can:
- Create disposable email inboxes
- Wait for and retrieve emails
- Extract verification links and OTPs
- Complete email verification flows
Installation
Claude Code
Add Stamp0 to your Claude Code MCP configuration:
{
"mcpServers": {
"stamp0": {
"command": "npx",
"args": ["@stamp0/mcp-server"],
"env": {
"STAMP0_API_KEY": "sk_live_your_api_key_here",
"STAMP0_PROJECT_ID": "prj_abc123"
}
}
}
}Cursor
Add to your Cursor MCP settings:
{
"mcpServers": {
"stamp0": {
"command": "npx",
"args": ["@stamp0/mcp-server"],
"env": {
"STAMP0_API_KEY": "sk_live_your_api_key_here",
"STAMP0_PROJECT_ID": "prj_abc123"
}
}
}
}Generic MCP Client
For any MCP-compatible client:
npx @stamp0/mcp-serverRequired environment variables:
STAMP0_API_KEY: Your Stamp0 API keySTAMP0_PROJECT_ID: Default project for creating inboxes
Available Tools
The MCP server exposes the following tools to AI agents:
stamp0_create_inbox
Create a new disposable email inbox.
{
"name": "stamp0_create_inbox",
"description": "Create a new disposable email inbox",
"inputSchema": {
"type": "object",
"properties": {
"projectId": {
"type": "string",
"description": "Project ID (optional, uses default)"
}
}
}
}Returns:
{
"id": "inb_xyz789",
"address": "abc123xyz@stamp0.com"
}stamp0_wait_for_email
Wait for an email to arrive in an inbox.
{
"name": "stamp0_wait_for_email",
"description": "Wait for an email to arrive in an inbox",
"inputSchema": {
"type": "object",
"properties": {
"inboxId": {
"type": "string",
"description": "The inbox ID to wait for email in"
},
"timeout": {
"type": "number",
"description": "Timeout in seconds (default: 30)"
}
},
"required": ["inboxId"]
}
}Returns:
{
"id": "eml_abc123",
"from": "noreply@example.com",
"subject": "Verify your email",
"body": "Click here to verify: https://..."
}stamp0_get_emails
Get all emails in an inbox.
{
"name": "stamp0_get_emails",
"description": "Get all emails in an inbox",
"inputSchema": {
"type": "object",
"properties": {
"inboxId": {
"type": "string",
"description": "The inbox ID"
}
},
"required": ["inboxId"]
}
}stamp0_delete_inbox
Delete an inbox and all its emails.
{
"name": "stamp0_delete_inbox",
"description": "Delete an inbox",
"inputSchema": {
"type": "object",
"properties": {
"inboxId": {
"type": "string",
"description": "The inbox ID to delete"
}
},
"required": ["inboxId"]
}
}Example Prompts
Here are example prompts you can use with AI agents:
Testing User Signup
Create a Stamp0 inbox and use it to test the signup flow on our application.
Sign up with the inbox email, wait for the verification email, extract the
verification link, and complete the verification process.Testing Password Reset
Test the password reset flow:
1. Create a new Stamp0 inbox
2. Request a password reset for that email
3. Wait for the reset email
4. Extract the reset link from the email
5. Visit the link and set a new passwordTesting OTP Verification
Test the OTP login flow:
1. Create a Stamp0 inbox
2. Attempt to login with that email
3. Wait for the OTP email
4. Extract the 6-digit code from the email
5. Enter the code to complete loginAI Agent Workflow
Here's how an AI agent typically uses Stamp0:
Create Inbox
The agent creates a fresh inbox for the test:
Using stamp0_create_inbox...
Created inbox: abc123xyz@stamp0.com (inb_xyz789)Use Email Address
The agent uses the inbox address in the application:
Filling signup form with email: abc123xyz@stamp0.com
Submitting form...Wait for Email
The agent waits for the email to arrive:
Using stamp0_wait_for_email for inbox inb_xyz789...
Received email: "Verify your email address"Extract and Use Content
The agent extracts links or codes:
Found verification link: https://app.example.com/verify?token=abc123
Navigating to verification link...Complete Flow
The agent completes the verification:
Email verified successfully!
User is now logged in.Best Practices
Tips for using Stamp0 with AI agents:
- Fresh inboxes: Always create a new inbox for each test flow
- Reasonable timeouts: Use 30 second timeouts for email waits
- Clean up: Delete inboxes after tests when possible
- Extract carefully: Use robust patterns for link/OTP extraction
Example Agent Instructions
Include these instructions in your AI agent's system prompt:
When testing email flows:
1. Use stamp0_create_inbox to create a fresh inbox
2. Use the inbox address (ends with @stamp0.com) in forms
3. Use stamp0_wait_for_email after triggering emails
4. Extract verification links using regex patterns
5. Extract OTPs by finding 6-digit numbers in the email bodyTroubleshooting
MCP server not connecting?
- Verify your API key is correct
- Check the MCP configuration path
- Ensure
npxcan run the package
Emails not arriving?
- Check the inbox ID is correct
- Verify your application is sending to the right address
- Increase the timeout if emails are slow
Security
API Key Security:
- Never commit API keys to version control
- Use environment variables or secret management
- Create separate API keys for different environments
- Rotate keys periodically
Next Steps
- SDK Reference - Use Stamp0 programmatically
- API Keys - Manage API access
- Playwright Guide - Traditional E2E testing