Claude Code
Email checker with Claude Code. MCP Server setup for email verification in Claude.
Claude Code is Anthropic's CLI programmeerassistent die EmailVerify direct kan aanroepen om e-mails te verifiëren tijdens uw ontwikkelworkflow.
Wat is Claude Code?
Claude Code is een terminal-gebaseerde AI-assistent die ontwikkelaars helpt met:
- Code schrijven en debuggen
- Shell-commando's uitvoeren
- Bestandsbewerkingen
- API-interacties
Setup
Optie 1: MCP Server (Aanbevolen)
Voeg de EmailVerify MCP-server toe aan Claude Code:
claude mcp add emailverify -- npx -y @emailverify/mcp-serverOf voeg toe aan uw ~/.claude/claude_code_config.json:
{
"mcpServers": {
"emailverify": {
"command": "npx",
"args": ["-y", "@emailverify/mcp-server"],
"env": {
"EMAILVERIFY_API_KEY": "your-api-key-here"
}
}
}
}Optie 2: EmailVerify CLI
Installeer de EmailVerify CLI:
npm install -g @emailverify/cli
bv config set api-key YOUR_API_KEYClaude Code kan dan het bv commando direct gebruiken.
Gebruiksvoorbeelden
Verifieer een Enkele E-mail
U: Verify if john@example.com is a valid email
Claude Code:
I'll verify that email address for you.
Using the verify_email tool...
✅ john@example.com is VALID
- Deliverable: Yes
- Disposable: No
- Score: 0.95
This email appears to be valid and safe to use.Verifieer Meerdere E-mails
U: Check these emails from my .env file
Claude Code:
Let me read your .env file and verify any email addresses found.
Reading .env...
Found 3 email addresses:
- TEST_EMAIL=user@example.com
- ADMIN_EMAIL=admin@company.com
- SUPPORT_EMAIL=help@temp-mail.org
Verifying each one...
| Email | Status | Notes |
|-------|--------|-------|
| user@example.com | Unknown | Example domain |
| admin@company.com | Valid | Corporate email |
| help@temp-mail.org | Invalid | Disposable email |
Recommendation: Replace the temp-mail address with a real email for testing.Schoon E-maillijst Op
U: Clean the email list in contacts.csv and remove invalid addresses
Claude Code:
I'll process your contacts.csv file and verify each email.
Reading contacts.csv... Found 150 email addresses.
Verifying emails (this may take a moment)...
Results:
- Valid: 142 emails
- Invalid: 5 emails
- Unknown: 3 emails
Creating cleaned_contacts.csv with valid emails only...
Done! Removed 8 problematic emails.
Invalid emails removed:
- fake@asdfgh.xyz (domain doesn't exist)
- test@mailinator.com (disposable)
- bounce@invalid.net (mailbox not found)
...Controleer Voor Commit
U: Before I commit, verify the test emails in my test fixtures
Claude Code:
Let me check your test fixtures for email addresses.
Scanning test/ directory...
Found emails in test/fixtures/users.json
Verifying 5 test emails...
⚠️ Warning: Found potential issues:
1. test@mailinator.com - This is a disposable email
Consider using @example.com for test fixtures (RFC 2606 reserved)
2. admin@real-company.com - This appears to be a real company email
You probably don't want real emails in your test fixtures
Suggestions:
- Use @example.com, @example.org for test emails
- Use user{n}@example.com pattern
- Never use real company emails in testsWorkflow Patronen
Pre-commit Hook
Vraag Claude Code om e-mailvalidatie in uw workflow in te stellen:
U: Add a pre-commit hook that verifies any new email addresses in config files
Claude Code:
I'll create a pre-commit hook for email verification.
Creating .husky/pre-commit...
#!/bin/sh
# Check for new email addresses in config files
emails=$(git diff --cached --diff-filter=ACMR -- "*.json" "*.yaml" "*.env*" | \
grep -oE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}')
if [ -n "$emails" ]; then
echo "Verifying new email addresses..."
for email in $emails; do
result=$(bv verify "$email" --quiet)
if [ $? -eq 1 ]; then
echo "❌ Invalid email found: $email"
exit 1
fi
done
echo "✅ All emails verified"
fi
Done! The hook will verify emails before each commit.CI/CD-integratie
U: Add email verification to my GitHub Actions workflow
Claude Code:
I'll add an email verification step to your workflow.
Updating .github/workflows/ci.yml...
- name: Verify Test Emails
env:
EMAILVERIFY_API_KEY: ${{ secrets.EMAILVERIFY_API_KEY }}
run: |
npm install -g @emailverify/cli
# Extract and verify emails from test fixtures
grep -rhoE '[a-zA-Z0-9._%+-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,}' test/ | \
sort -u | while read email; do
if ! bv verify "$email" --quiet; then
echo "Invalid email in tests: $email"
exit 1
fi
done
Don't forget to add EMAILVERIFY_API_KEY to your repository secrets.Tips
1. Natuurlijke Taal
Beschrijf gewoon wat u nodig heeft:
- "Check if this email is real"
- "Verify the signup emails in my database seed"
- "Find and validate all email addresses in this project"
2. Batch-operaties
Voor meerdere e-mails, vraag Claude Code om ze te batchen:
- "Verify all emails in contacts.json"
- "Check the email column in users.csv"
3. Integratie-suggesties
Vraag om best practices:
- "How should I validate emails in my signup form?"
- "What's the best way to clean my mailing list?"