{"_id":"@codefuturist/email-mcp","_rev":"7-cdd166ca367dd912faf9d513d098a5e2","name":"@codefuturist/email-mcp","dist-tags":{"latest":"0.5.1"},"versions":{"0.1.0":{"name":"@codefuturist/email-mcp","version":"0.1.0","keywords":["email","mcp","imap","smtp","model-context-protocol"],"author":{"name":"Colin"},"license":"LGPL-3.0-or-later","_id":"@codefuturist/email-mcp@0.1.0","maintainers":[{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"}],"homepage":"https://github.com/codefuturist/email-mcp#readme","bugs":{"url":"https://github.com/codefuturist/email-mcp/issues"},"bin":{"email-mcp":"dist/main.js"},"dist":{"shasum":"572194e8652378baa8d00549216ab2a208e81edd","tarball":"https://registry.npmjs.org/@codefuturist/email-mcp/-/email-mcp-0.1.0.tgz","fileCount":215,"integrity":"sha512-JkJEbY+1A+KlgTErXRyIMW1hyMycRa355YP1vDge7acZAdehFGfyhkW0A/PpmcNKBaeCS+ZvMIk9Bh4mBS6wkA==","signatures":[{"sig":"MEUCIQDyVby46thVhJfXqxssXlBRcJ9EGc3NKnCd9fcFsueutgIgHXh99eMnH3b44Z/Sk+YWYVFaaCaybZyAVQ5aqruorzs=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":507818},"main":"./dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=22.0.0"},"gitHead":"3c44c226e7b3bf2666479e4d5761c8777d8c5e9c","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","build":"tsc","check":"biome check src/ && eslint src/","start":"node dist/main.js","commit":"cog commit","format":"biome format --write src/","lint:fix":"eslint src/ --fix","changelog":"cog changelog","typecheck":"tsc --noEmit","version:log":"cog log","format:check":"biome check src/","version:bump":"cog bump --auto","version:check":"cog check","prepublishOnly":"tsc","version:bump:minor":"cog bump --minor","version:bump:patch":"cog bump --patch"},"_npmUser":{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"},"repository":{"url":"git+https://github.com/codefuturist/email-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Email MCP server with IMAP + SMTP support","directories":{},"_nodeVersion":"25.6.1","dependencies":{"zod":"^4.3.6","imapflow":"^1.2.9","node-ical":"^0.25.2","smol-toml":"^1.6.0","nodemailer":"^8.0.1","@clack/prompts":"^1.0.1","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.15.0","devDependencies":{"eslint":"^9.39.2","@eslint/js":"^9.39.2","typescript":"^5.9.3","@types/node":"^25.2.3","@biomejs/biome":"^2.4.0","@eslint/compat":"^2.0.2","@types/nodemailer":"^7.0.10","eslint-config-airbnb-extended":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/email-mcp_0.1.0_1771410290971_0.5667403110088696","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@codefuturist/email-mcp","version":"0.1.1","keywords":["email","mcp","imap","smtp","model-context-protocol","mcp-server","claude","anthropic","ai-tools","llm","nodejs"],"author":{"url":"https://github.com/codefuturist","name":"codefuturist"},"license":"LGPL-3.0-or-later","_id":"@codefuturist/email-mcp@0.1.1","maintainers":[{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"}],"homepage":"https://github.com/codefuturist/email-mcp#readme","bugs":{"url":"https://github.com/codefuturist/email-mcp/issues"},"bin":{"email-mcp":"dist/main.js"},"dist":{"shasum":"3c44b4f93f2ea4ef6e01a4b0299ed803f0f8783a","tarball":"https://registry.npmjs.org/@codefuturist/email-mcp/-/email-mcp-0.1.1.tgz","fileCount":295,"integrity":"sha512-iH8EubPPR0IPw5+TcDLKKjvQa7bgA0upaNb0Fnfczu6R4jPCPfdspslG77He4h4p2tCEtQJcHCmSnJ5+hqT2hQ==","signatures":[{"sig":"MEQCIErb0UalrF1JUvzocGkNLQb6AYXtGW+8ovf1PlmaGQadAiBv/Qn8fVvwN77XgZ3HVimY5z8b1AbAhs76dOVD7+wg6A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":956111},"main":"./dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=22.0.0"},"gitHead":"4718b0259a084eeb3e7ea2aee51e406982d90638","mcpName":"io.github.codefuturist/email-mcp","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","test":"vitest run","build":"tsc -p tsconfig.build.json","check":"biome check src/ && eslint src/","start":"node dist/main.js","commit":"cog commit","format":"biome format --write src/","lint:fix":"eslint src/ --fix","changelog":"cog changelog","typecheck":"tsc --noEmit","test:watch":"vitest","version:log":"cog log","format:check":"biome check src/","version:bump":"cog bump --auto","test:coverage":"vitest run --coverage","version:check":"cog check","prepublishOnly":"tsc -p tsconfig.build.json","version:bump:minor":"cog bump --minor","version:bump:patch":"cog bump --patch"},"_npmUser":{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"},"repository":{"url":"git+https://github.com/codefuturist/email-mcp.git","type":"git"},"_npmVersion":"11.9.0","description":"Email MCP server with IMAP + SMTP support","directories":{},"_nodeVersion":"25.6.1","dependencies":{"zod":"^4.3.6","imapflow":"^1.2.9","node-ical":"^0.25.2","smol-toml":"^1.6.0","nodemailer":"^8.0.1","@clack/prompts":"^1.0.1","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.15.0","devDependencies":{"tsx":"^4.21.0","eslint":"^9.39.2","vitest":"^4.0.18","@eslint/js":"^9.39.2","typescript":"^5.9.3","@types/node":"^25.2.3","@biomejs/biome":"^2.4.0","@eslint/compat":"^2.0.2","@types/nodemailer":"^7.0.10","@vitest/coverage-v8":"^4.0.18","eslint-config-airbnb-extended":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/email-mcp_0.1.1_1771423021749_0.33426580837337094","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@codefuturist/email-mcp","version":"0.2.0","keywords":["email","mcp","imap","smtp","model-context-protocol","mcp-server","claude","anthropic","ai-tools","llm","nodejs"],"author":{"url":"https://github.com/codefuturist","name":"codefuturist"},"license":"LGPL-3.0-or-later","_id":"@codefuturist/email-mcp@0.2.0","maintainers":[{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"}],"homepage":"https://github.com/codefuturist/email-mcp#readme","bugs":{"url":"https://github.com/codefuturist/email-mcp/issues"},"bin":{"email-mcp":"dist/main.js"},"dist":{"shasum":"0eb9e0d8b6cc1e68e3364b864e1cbfb9bc6adb4c","tarball":"https://registry.npmjs.org/@codefuturist/email-mcp/-/email-mcp-0.2.0.tgz","fileCount":295,"integrity":"sha512-mPatyD3rL0YDcXc5I4KR/SOCbMIMijE6w8+dDfoM2WFPr21USp0QIL7bSVXhdHM7q3KU9wpXJv5PhvsqLXkNBw==","signatures":[{"sig":"MEUCIQDpviPqrMrKWRW9Hz5VzWdnQde3rhJWpQ+zjHfS3060PgIgHLIGXueRJ0tCkye0kx3SHwP8VSSqQ3OM4LQ9FzaSIeQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codefuturist%2femail-mcp@0.2.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":981589},"main":"./dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=22.0.0"},"gitHead":"982bcd71ed56648adbc383d8b38227bd56d44f85","mcpName":"io.github.codefuturist/email-mcp","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","test":"vitest run","build":"tsc -p tsconfig.build.json","check":"biome check src/ && eslint src/","start":"node dist/main.js","commit":"cog commit","format":"biome format --write src/","lint:fix":"eslint src/ --fix","changelog":"cog changelog","typecheck":"tsc --noEmit","test:watch":"vitest","version:log":"cog log","format:check":"biome check src/","version:bump":"cog bump --auto","test:coverage":"vitest run --coverage","version:check":"cog check","prepublishOnly":"tsc -p tsconfig.build.json","version:bump:minor":"cog bump --minor","version:bump:patch":"cog bump --patch"},"_npmUser":{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"},"repository":{"url":"git+https://github.com/codefuturist/email-mcp.git","type":"git"},"_npmVersion":"10.9.4","description":"Email MCP server with IMAP + SMTP support","directories":{},"_nodeVersion":"22.22.0","dependencies":{"zod":"^4.3.6","imapflow":"^1.2.9","node-ical":"^0.25.2","smol-toml":"^1.6.0","nodemailer":"^8.0.1","@clack/prompts":"^1.0.1","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.15.0","devDependencies":{"tsx":"^4.21.0","eslint":"^9.39.2","vitest":"^4.0.18","@eslint/js":"^9.39.2","typescript":"^5.9.3","@types/node":"^25.2.3","@biomejs/biome":"^2.4.2","@eslint/compat":"^2.0.2","@types/nodemailer":"^7.0.10","@vitest/coverage-v8":"^4.0.18","eslint-config-airbnb-extended":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/email-mcp_0.2.0_1771426128564_0.9841077059923318","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@codefuturist/email-mcp","version":"0.2.1","keywords":["email","mcp","imap","smtp","model-context-protocol","mcp-server","claude","anthropic","ai-tools","llm","nodejs"],"author":{"url":"https://github.com/codefuturist","name":"codefuturist"},"license":"LGPL-3.0-or-later","_id":"@codefuturist/email-mcp@0.2.1","maintainers":[{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"}],"homepage":"https://github.com/codefuturist/email-mcp#readme","bugs":{"url":"https://github.com/codefuturist/email-mcp/issues"},"bin":{"email-mcp":"dist/main.js"},"dist":{"shasum":"8c33b579d29c422068c273521c85f66683f32bf7","tarball":"https://registry.npmjs.org/@codefuturist/email-mcp/-/email-mcp-0.2.1.tgz","fileCount":295,"integrity":"sha512-0OERQqXMhW+xBS6M4V4pekpsaf+qnkTzZCM6tAn09NDe0N2IfinDtm3Zgmdgcn/EsyxCeGFDLB2sobdp/uXeZg==","signatures":[{"sig":"MEUCIEB4sA3Qg9Na9EmZ39w/wx1hjdx40hU0UgZUwYJoEEnmAiEA6mrj/XcAAGt8o8E3saPj1VPM/r/Ld0gMvMK7USjPWjQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codefuturist%2femail-mcp@0.2.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":989432},"main":"./dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=24.0.0"},"gitHead":"5aac3ca3f5faf18f5acb20d1a81a26ebfe543500","mcpName":"io.github.codefuturist/email-mcp","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","test":"vitest run","build":"tsc -p tsconfig.build.json","check":"biome check src/ && eslint src/","start":"node dist/main.js","commit":"cog commit","format":"biome format --write src/","report":"mkdir -p reports && biome check src/ --reporter=json > reports/biome.json 2>&1; eslint src/ -f json -o reports/eslint.json; actionlint -format '{{json .}}' > reports/actionlint.json 2>&1; pnpm test","prepare":"lefthook install || true","lint:fix":"eslint src/ --fix","test:all":"vitest run && vitest run --config vitest.config.integration.ts","changelog":"cog changelog","typecheck":"tsc --noEmit","docker:run":"docker run --rm -i -v ~/.config/email-mcp:/home/node/.config/email-mcp:ro codefuturist/email-mcp","test:watch":"vitest","version:log":"cog log","docker:build":"docker build -t codefuturist/email-mcp .","docker:clean":"docker images --format '{{.Repository}}:{{.Tag}}' | grep email-mcp | xargs docker rmi -f 2>/dev/null; true","docker:prune":"docker image prune -f && docker buildx prune -f","format:check":"biome check src/","version:bump":"cog bump --auto","hooks:install":"lefthook install --force","release:check":"goreleaser check","test:coverage":"vitest run --coverage","version:check":"cog check","docker:compose":"docker compose up","prepublishOnly":"tsc -p tsconfig.build.json","hooks:uninstall":"lefthook uninstall","release:dry-run":"goreleaser release --skip=publish --clean && pnpm docker:clean","release:snapshot":"goreleaser release --snapshot --clean && pnpm docker:clean","test:integration":"vitest run --config vitest.config.integration.ts","version:bump:minor":"cog bump --minor","version:bump:patch":"cog bump --patch"},"_npmUser":{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"},"repository":{"url":"git+https://github.com/codefuturist/email-mcp.git","type":"git"},"_npmVersion":"11.6.2","description":"Email MCP server with IMAP + SMTP support","directories":{},"_nodeVersion":"24.13.0","dependencies":{"zod":"^4.3.6","imapflow":"^1.2.9","node-ical":"^0.25.2","smol-toml":"^1.6.0","nodemailer":"^8.0.1","@clack/prompts":"^1.0.1","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.15.0","devDependencies":{"tsx":"^4.21.0","eslint":"^9.39.2","vitest":"^4.0.18","lefthook":"^2.1.1","@eslint/js":"^9.39.2","typescript":"^5.9.3","@types/node":"^25.2.3","@biomejs/biome":"^2.4.2","@eslint/compat":"^2.0.2","testcontainers":"^11.12.0","@types/nodemailer":"^7.0.10","@vitest/coverage-v8":"^4.0.18","eslint-config-airbnb-extended":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/email-mcp_0.2.1_1771604214098_0.37461225467674897","host":"s3://npm-registry-packages-npm-production"}},"0.2.3":{"name":"@codefuturist/email-mcp","version":"0.2.3","keywords":["email","mcp","imap","smtp","model-context-protocol","mcp-server","claude","anthropic","ai-tools","llm","nodejs"],"author":{"url":"https://github.com/codefuturist","name":"codefuturist"},"license":"LGPL-3.0-or-later","_id":"@codefuturist/email-mcp@0.2.3","maintainers":[{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"}],"homepage":"https://github.com/codefuturist/email-mcp#readme","bugs":{"url":"https://github.com/codefuturist/email-mcp/issues"},"bin":{"email-mcp":"dist/main.js"},"dist":{"shasum":"f5b16a5c54ba230e82d15aa3cb059fe4a7653a80","tarball":"https://registry.npmjs.org/@codefuturist/email-mcp/-/email-mcp-0.2.3.tgz","fileCount":295,"integrity":"sha512-J9fG/HCZ0Kixy5k326WHDfvPOV9S4RTO+xSU5vvfEHcOfYkHiZfQz4dRx+xBg+QaOK5bqisKW+pCENCfQxpniw==","signatures":[{"sig":"MEYCIQDK5dKflAdIn9I60o+D/1mlV7hyCYMdNxsS52F6TF8t0wIhAJ8p1SzSlIsu8MgJSpQFt8RnRHVgnm9W19TusVNlm95B","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codefuturist%2femail-mcp@0.2.3","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1006321},"main":"./dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=24.0.0"},"gitHead":"36eb8cab977aeb49f3da484f57a62150ad976702","mcpName":"io.github.codefuturist/email-mcp","scripts":{"dev":"tsx watch src/main.ts","lint":"eslint src/","test":"vitest run","build":"tsc -p tsconfig.build.json","check":"biome check src/ && eslint src/","start":"node dist/main.js","commit":"cog commit","format":"biome format --write src/","report":"mkdir -p reports && biome check src/ --reporter=json > reports/biome.json 2>&1; eslint src/ -f json -o reports/eslint.json; actionlint -format '{{json .}}' > reports/actionlint.json 2>&1; pnpm test","prepare":"lefthook install || true","lint:fix":"eslint src/ --fix","test:all":"vitest run && vitest run --config vitest.config.integration.ts","changelog":"cog changelog","typecheck":"tsc --noEmit","docker:run":"docker run --rm -i -v ~/.config/email-mcp:/home/node/.config/email-mcp:ro codefuturist/email-mcp","test:watch":"vitest","version:log":"cog log","docker:build":"docker build -t codefuturist/email-mcp .","docker:clean":"docker images --format '{{.Repository}}:{{.Tag}}' | grep email-mcp | xargs docker rmi -f 2>/dev/null; true","docker:prune":"docker image prune -f && docker buildx prune -f","format:check":"biome check src/","version:bump":"cog bump --auto","hooks:install":"lefthook install --force","release:check":"goreleaser check","test:coverage":"vitest run --coverage","version:check":"cog check","docker:compose":"docker compose up","prepublishOnly":"tsc -p tsconfig.build.json","hooks:uninstall":"lefthook uninstall","release:dry-run":"goreleaser release --skip=publish --clean && pnpm docker:clean","release:snapshot":"goreleaser release --snapshot --clean && pnpm docker:clean","test:integration":"vitest run --config vitest.config.integration.ts","version:bump:minor":"cog bump --minor","version:bump:patch":"cog bump --patch"},"_npmUser":{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"},"repository":{"url":"git+https://github.com/codefuturist/email-mcp.git","type":"git"},"_npmVersion":"11.12.1","description":"Email MCP server with IMAP + SMTP support","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^4.3.6","imapflow":"^1.2.9","node-ical":"^0.25.2","smol-toml":"^1.6.0","nodemailer":"^8.0.1","@clack/prompts":"^1.0.1","@modelcontextprotocol/sdk":"^1.26.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@9.15.0","devDependencies":{"tsx":"^4.21.0","eslint":"^9.39.2","vitest":"^4.0.18","lefthook":"^2.1.1","@eslint/js":"^9.39.2","typescript":"^5.9.3","@types/node":"^25.2.3","@biomejs/biome":"^2.4.2","@eslint/compat":"^2.0.2","testcontainers":"^11.12.0","@types/nodemailer":"^7.0.10","@vitest/coverage-v8":"^4.0.18","eslint-config-airbnb-extended":"^3.0.1"},"_npmOperationalInternal":{"tmp":"tmp/email-mcp_0.2.3_1778943270302_0.39173410357385063","host":"s3://npm-registry-packages-npm-production"}},"0.5.0":{"name":"@codefuturist/email-mcp","version":"0.5.0","keywords":["email","mcp","imap","smtp","model-context-protocol","mcp-server","claude","anthropic","ai-tools","llm","nodejs"],"author":{"url":"https://github.com/codefuturist","name":"codefuturist"},"license":"LGPL-3.0-or-later","_id":"@codefuturist/email-mcp@0.5.0","maintainers":[{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"}],"homepage":"https://github.com/codefuturist/email-mcp#readme","bugs":{"url":"https://github.com/codefuturist/email-mcp/issues"},"bin":{"email-mcp":"dist/main.js"},"dist":{"shasum":"957752079c5c2f5bbaed7611a67e1dc60b191e6e","tarball":"https://registry.npmjs.org/@codefuturist/email-mcp/-/email-mcp-0.5.0.tgz","fileCount":383,"integrity":"sha512-wwCaL/UIz9V0yoMuObhWTMxqQqkCJc2y1gqJiL5gILDAFYb0UntAGUphHLbgT7fbQLnJAtENmWgl4AO5nRAmpQ==","signatures":[{"sig":"MEUCIQDR4SwYI871r+LE9ij8Ggd6oUWJIEDqjYm761azi9hNCAIgRfg4ZtgkAXjIuP8OrpKjp+1peK8JSvwPSWvm5cFG62M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCtIM6Qegipofrd1oBEmyQ6i9pJLElGkmIyUM2Go1LySAIgEJWQKEiwfqVYbLdzHgCra10WuLltyplIRGc2379HCCA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codefuturist%2femail-mcp@0.5.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1481820},"main":"./dist/main.js","type":"module","types":"./dist/main.d.ts","engines":{"node":">=24.0.0"},"gitHead":"6cd7fa9dd990a0b7d1f025a0142e3b43daef7d70","mcpName":"io.github.codefuturist/email-mcp","scripts":{"dev":"tsx watch src/main.ts","lint":"biome lint src/","test":"vitest run","build":"tsc -p tsconfig.build.json","check":"biome check src/","smoke":"tsx scripts/e2e-smoke.mts","start":"node dist/main.js","commit":"cog commit","format":"biome format --write src/","report":"mkdir -p reports && biome check src/ --reporter=json > reports/biome.json 2>&1; actionlint -format '{{json .}}' > reports/actionlint.json 2>&1; pnpm test","prepare":"lefthook install || true","lint:fix":"biome lint --write src/","test:all":"vitest run && vitest run --config vitest.config.integration.ts","changelog":"cog changelog","typecheck":"tsc --noEmit","docker:run":"docker run --rm -i -v ~/.config/email-mcp:/home/node/.config/email-mcp:ro codefuturist/email-mcp","test:watch":"vitest","version:log":"cog log","build:binary":"bun build --compile --minify --bytecode src/main.ts --outfile build/email-mcp","docker:build":"docker build -t codefuturist/email-mcp .","docker:clean":"docker images --format '{{.Repository}}:{{.Tag}}' | grep email-mcp | xargs docker rmi -f 2>/dev/null; true","docker:prune":"docker image prune -f && docker buildx prune -f","format:check":"biome format src/","version:bump":"cog bump --auto","hooks:install":"lefthook install --force","release:check":"goreleaser check","test:coverage":"vitest run --coverage","version:check":"cog check","build:binaries":"bash scripts/build-binaries.sh","docker:compose":"docker compose up","prepublishOnly":"tsc -p tsconfig.build.json","hooks:uninstall":"lefthook uninstall","release:dry-run":"goreleaser release --skip=publish --clean && pnpm docker:clean","release:snapshot":"goreleaser release --snapshot --clean && pnpm docker:clean","test:integration":"vitest run --config vitest.config.integration.ts","version:bump:minor":"cog bump --minor","version:bump:patch":"cog bump --patch"},"_npmUser":{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"},"repository":{"url":"git+https://github.com/codefuturist/email-mcp.git","type":"git"},"_npmVersion":"11.19.0","description":"Email MCP server with IMAP + SMTP support","directories":{},"_nodeVersion":"24.21.0","dependencies":{"zod":"^4.6.5","imapflow":"^2.0.7","node-ical":"^0.27.2","smol-toml":"^1.9.0","nodemailer":"^10.0.10","@clack/prompts":"^1.8.1","@modelcontextprotocol/sdk":"^1.30.1","@modelcontextprotocol/node":"^2.1.0","@modelcontextprotocol/server":"^2.1.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.22.0","devDependencies":{"tsx":"^4.23.15","vitest":"^5.0.2","lefthook":"^2.1.14","typescript":"^7.0.2","@types/node":"^26.6.2","@biomejs/biome":"^2.5.14","testcontainers":"^12.1.0","@types/nodemailer":"^8.0.2","@vitest/coverage-v8":"^5.0.2"},"_npmOperationalInternal":{"tmp":"tmp/email-mcp_0.5.0_1790437570217_0.4023384129135257","host":"s3://npm-registry-packages-npm-production"}},"0.5.1":{"_id":"@codefuturist/email-mcp@0.5.1","bin":{"email-mcp":"dist/main.js"},"bugs":{"url":"https://github.com/codefuturist/email-mcp/issues"},"dist":{"shasum":"d8e852e7d4f646fe10d4159fda94c4865725c813","tarball":"https://registry.npmjs.org/@codefuturist/email-mcp/-/email-mcp-0.5.1.tgz","fileCount":387,"integrity":"sha512-rgKHVC6deki5ctNk5rhkGZUKGzOd7meGDgWfDGfLd5v+GRZIitykYYpQhpaOt17/Lb8MSE2ffN6s8blev+v2ZQ==","signatures":[{"sig":"MEQCIDer6wAF10/5Ljdr+UutK/PTaPa4sv03Ae0qc89uPA+oAiAl9A1CDih70ryY/2DjzJzrY8DD3NIKTEaIFGzJec1wTw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBAO560/EodVQHyd/7BG1ZuGHyAmKmcyqnm2jDloBen4AiAmWYkj5A2fFnctkM7SBh/AzZzMttbCpQTDL8rBgkAm1w=="}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@codefuturist%2femail-mcp@0.5.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":1484933},"main":"./dist/main.js","name":"@codefuturist/email-mcp","type":"module","types":"./dist/main.d.ts","author":{"url":"https://github.com/codefuturist","name":"codefuturist"},"engines":{"node":">=24.0.0"},"gitHead":"198c047c0bea1838a3d4c7dbef8860893f1e338d","license":"LGPL-3.0-or-later","mcpName":"io.github.codefuturist/email-mcp","scripts":{"dev":"tsx watch src/main.ts","lint":"biome lint src/","test":"vitest run","build":"tsc -p tsconfig.build.json","check":"biome check src/","smoke":"tsx scripts/e2e-smoke.mts","start":"node dist/main.js","commit":"cog commit","format":"biome format --write src/","report":"mkdir -p reports && biome check src/ --reporter=json > reports/biome.json 2>&1; actionlint -format '{{json .}}' > reports/actionlint.json 2>&1; pnpm test","prepare":"lefthook install || true","lint:fix":"biome lint --write src/","test:all":"vitest run && vitest run --config vitest.config.integration.ts","changelog":"cog changelog","typecheck":"tsc --noEmit","docker:run":"docker run --rm -i -v ~/.config/email-mcp:/home/node/.config/email-mcp:ro codefuturist/email-mcp","test:watch":"vitest","version:log":"cog log","build:binary":"bun build --compile --minify --bytecode src/main.ts --outfile build/email-mcp","docker:build":"docker build -t codefuturist/email-mcp .","docker:clean":"docker images --format '{{.Repository}}:{{.Tag}}' | grep email-mcp | xargs docker rmi -f 2>/dev/null; true","docker:prune":"docker image prune -f && docker buildx prune -f","format:check":"biome format src/","version:bump":"cog bump --auto","hooks:install":"lefthook install --force","release:check":"goreleaser check","test:coverage":"vitest run --coverage","version:check":"cog check","build:binaries":"bash scripts/build-binaries.sh","docker:compose":"docker compose up","prepublishOnly":"tsc -p tsconfig.build.json","hooks:uninstall":"lefthook uninstall","release:dry-run":"goreleaser release --skip=publish --clean && pnpm docker:clean","release:snapshot":"goreleaser release --snapshot --clean && pnpm docker:clean","test:integration":"vitest run --config vitest.config.integration.ts","version:bump:minor":"cog bump --minor","version:bump:patch":"cog bump --patch"},"version":"0.5.1","_npmUser":{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"},"homepage":"https://github.com/codefuturist/email-mcp#readme","keywords":["email","mcp","imap","smtp","model-context-protocol","mcp-server","claude","anthropic","ai-tools","llm","nodejs"],"repository":{"url":"git+https://github.com/codefuturist/email-mcp.git","type":"git"},"_npmVersion":"11.19.0","description":"Email MCP server with IMAP + SMTP support","directories":{},"maintainers":[{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"}],"_nodeVersion":"24.21.0","dependencies":{"zod":"^4.6.5","imapflow":"^2.0.7","node-ical":"^0.27.2","smol-toml":"^1.9.0","nodemailer":"^10.0.10","@clack/prompts":"^1.8.1","@modelcontextprotocol/sdk":"^1.30.1","@modelcontextprotocol/node":"^2.1.0","@modelcontextprotocol/server":"^2.1.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@11.22.0","devDependencies":{"tsx":"^4.23.15","vitest":"^5.0.2","lefthook":"^2.1.14","typescript":"^7.0.2","@types/node":"^26.6.2","@biomejs/biome":"^2.5.14","testcontainers":"^12.1.0","@types/nodemailer":"^8.0.2","@vitest/coverage-v8":"^5.0.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/email-mcp_0.5.1_1790440083081_0.34502395482580894"}}},"time":{"created":"2026-02-18T10:24:50.845Z","modified":"2026-09-26T16:28:03.583Z","0.1.0":"2026-02-18T10:24:51.204Z","0.1.1":"2026-02-18T13:57:01.938Z","0.2.0":"2026-02-18T14:48:48.786Z","0.2.1":"2026-02-20T16:16:54.282Z","0.2.3":"2026-05-16T14:54:30.461Z","0.5.0":"2026-09-26T15:46:10.319Z","0.5.1":"2026-09-26T16:28:03.227Z"},"bugs":{"url":"https://github.com/codefuturist/email-mcp/issues"},"author":{"url":"https://github.com/codefuturist","name":"codefuturist"},"license":"LGPL-3.0-or-later","homepage":"https://github.com/codefuturist/email-mcp#readme","keywords":["email","mcp","imap","smtp","model-context-protocol","mcp-server","claude","anthropic","ai-tools","llm","nodejs"],"repository":{"url":"git+https://github.com/codefuturist/email-mcp.git","type":"git"},"description":"Email MCP server with IMAP + SMTP support","maintainers":[{"name":"codefuturist","email":"npmjs.w2q4s@allcloud.dev"}],"readme":"# Email MCP Server\n\n[![standard-readme compliant](https://img.shields.io/badge/readme%20style-standard-brightgreen.svg?style=flat-square)](https://github.com/RichardLitt/standard-readme)\n[![license](https://img.shields.io/github/license/codefuturist/email-mcp.svg?style=flat-square)](LICENSE)\n[![npm version](https://img.shields.io/npm/v/@codefuturist/email-mcp.svg?style=flat-square)](https://www.npmjs.com/package/@codefuturist/email-mcp)\n[![npm downloads](https://img.shields.io/npm/dm/@codefuturist/email-mcp.svg?style=flat-square)](https://www.npmjs.com/package/@codefuturist/email-mcp)\n[![CI](https://img.shields.io/github/actions/workflow/status/codefuturist/email-mcp/ci.yml?branch=main&style=flat-square&label=CI)](https://github.com/codefuturist/email-mcp/actions/workflows/ci.yml)\n\nAn MCP (Model Context Protocol) server providing comprehensive email capabilities via IMAP and SMTP.\n\nEnables AI assistants to read, search, send, manage, schedule, and analyze emails across multiple accounts. Exposes 52 tools, 7 prompts, and 6 resources over the MCP protocol with OAuth2 support _(experimental)_, email scheduling, calendar extraction, analytics, provider-aware label management, real-time IMAP IDLE watcher with AI-powered triage, instant verification-code catching with clipboard copy, customizable presets and static rules, and a guided setup wizard.\n\nBuilt on the MCP TypeScript SDK v2 (spec revision 2026-07-28), it serves over **stdio** for local clients or **Streamable HTTP** for networked access — existing stdio configurations keep working unchanged.\n\n## Highlights\n\n| Feature | email-mcp | Typical MCP email |\n|---------|:---------:|:-----------------:|\n| Multi-account | ✅ | ❌ |\n| Send / reply / forward | ✅ | ✅ |\n| Drafts & templates | ✅ | ❌ |\n| Labels & bulk ops | ✅ provider-aware | ❌ |\n| Schedule future emails | ✅ | ❌ |\n| Real-time IMAP IDLE watcher | ✅ | ❌ |\n| Verification codes → clipboard | ✅ concealed + auto-clear | ❌ |\n| AI triage with presets | ✅ | ❌ |\n| Desktop & webhook alerts | ✅ | ❌ |\n| Calendar (ICS) extraction | ✅ | ❌ |\n| Email analytics | ✅ | ❌ |\n| OAuth2 (Gmail / M365) | ✅ _experimental_ | ❌ |\n| Guided setup wizard | ✅ auto-detect | ❌ |\n| Streamable HTTP transport | ✅ | ❌ |\n\n## Table of Contents\n\n- [Highlights](#highlights)\n- [Security](#security)\n- [Background](#background)\n- [Install](#install)\n- [Usage](#usage)\n- [API](#api)\n- [Maintainers](#maintainers)\n- [Contributing](#contributing)\n- [License](#license)\n\n## Security\n\n- All connections use TLS/STARTTLS encryption\n- Passwords are never logged; audit trail records operations without credentials\n- Token-bucket rate limiter prevents abuse (configurable per account)\n- OAuth2 XOAUTH2 authentication for Gmail and Microsoft 365 _(experimental)_\n- Attachment downloads capped at 5 MB with base64 encoding\n\n## Background\n\nMost MCP email implementations provide only basic read/send. This server aims to be a full-featured email client for AI assistants, covering the entire lifecycle: reading, composing, managing, scheduling, and analyzing email — all from a single MCP server.\n\nKey design decisions:\n\n- **XDG-compliant config** — TOML at `~/.config/email-mcp/config.toml`\n- **Multi-account** — Operate across multiple IMAP/SMTP accounts simultaneously\n- **Layered services** — Business logic is decoupled from MCP wiring for testability\n- **Provider auto-detection** — Gmail, Outlook, Yahoo, iCloud, Fastmail, ProtonMail, Zoho, GMX\n\n## Install\n\nRequires Node.js ≥ 22.\n\n```bash\n# Run directly (no install needed)\nnpx @codefuturist/email-mcp setup\n# or\npnpm dlx @codefuturist/email-mcp setup\n\n# Or install globally\nnpm install -g @codefuturist/email-mcp\n# or\npnpm add -g @codefuturist/email-mcp\n```\n\n### Native binary (Bun)\n\nA dependency-free single binary (minified + bytecode-precompiled, ~32 ms cold\nstart, no Node.js at runtime) can be compiled with [Bun](https://bun.sh):\n\n```bash\nbun run build:binary          # native binary → build/email-mcp\ncp build/email-mcp ~/.local/bin/\n\nbun run build:binaries        # release matrix: darwin-arm64/x64, linux-x64/arm64,\n                              # windows-x64 → build/release/*.{tar.gz,zip} + sha256 checksums\n```\n\nPrebuilt binaries for every release are built by CI with GoReleaser Pro\n(`.goreleaser.yaml`) for all common platforms — Linux glibc + musl, macOS, and\nWindows, each x64 + arm64 where Bun supports it — provenance-attested (verify with\n`gh attestation verify <asset> --repo codefuturist/email-mcp`) and shipped with\n[GitHub releases](https://github.com/codefuturist/email-mcp/releases) —\ninstallable via mise: `mise use -g ubi:codefuturist/email-mcp`.\n\n`server install` from the binary points the launchd login item at it. Requires the\nbundled imapflow patch (`patches/`) — imapflow passes `servername: false` to\ntls.connect for IP hosts, which Bun's stricter node:tls rejects.\n\n### Docker\n\nNo Node.js required — just Docker.\n\n```bash\n# Latest stable release\ndocker pull ghcr.io/codefuturist/email-mcp:latest\n\n# Pin to an exact version (immutable)\ndocker pull ghcr.io/codefuturist/email-mcp:0.2.3\n\n# Auto-update patches within a minor version\ndocker pull ghcr.io/codefuturist/email-mcp:0.2\n\n# Track a major version (won't cross breaking-change boundary)\ndocker pull ghcr.io/codefuturist/email-mcp:0\n\n# Pin to an exact git commit (immutable, CI traceability)\ndocker pull ghcr.io/codefuturist/email-mcp:sha-abc1234\n\n# Or build from source\ndocker build -t ghcr.io/codefuturist/email-mcp .\n```\n\n> **Tag convention:** Tags follow bare semver (no `v` prefix), matching Docker ecosystem standards (e.g. `node:24`, `nginx:1.25`). The `latest` tag is only updated on stable releases, never pre-releases.\n\n> **Note:** By default, the server uses stdio transport. Config must be created on the host first\n> (via `npx @codefuturist/email-mcp setup` or manually) and mounted into the container.\n\n## Usage\n\n### Setup\n\n```bash\n# Add an email account interactively (recommended)\nemail-mcp account add\n\n# Or use the legacy alias\nemail-mcp setup\n\n# Or create a template config manually\nemail-mcp config init\n```\n\nThe setup wizard auto-detects server settings, tests connections, saves config, and outputs the MCP client config snippet.\n\n### Test Connections\n\n```bash\nemail-mcp test            # all accounts\nemail-mcp test personal   # specific account\n```\n\n### Configure Your MCP Client\n\nThe snippets below use the default **stdio** transport, best for local desktop clients. For networked or remote access over **Streamable HTTP**, see [Streamable HTTP (networked)](#streamable-http-networked) below.\n\n**Recommended — use the guided installer** (auto-detects Claude Desktop, VS Code, Cursor, Windsurf):\n\n```bash\nemail-mcp install\n```\n\nOr add manually using the snippets below.\n\n<details>\n<summary><strong>Claude Desktop</strong></summary>\n\nEdit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\\Claude\\claude_desktop_config.json` (Windows):\n\n```json\n{\n  \"mcpServers\": {\n    \"email\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>VS Code (GitHub Copilot)</strong></summary>\n\n**Option 1 — Extensions gallery (easiest):**\n1. Open the Extensions view (<kbd>⇧⌘X</kbd> / <kbd>Ctrl+Shift+X</kbd>)\n2. Search `@mcp email-mcp`\n3. Click **Install** (user-wide) or right-click → **Install in Workspace**\n\n**Option 2 — Workspace config** (`.vscode/mcp.json`, committed to source control):\n\n```json\n{\n  \"servers\": {\n    \"email\": {\n      \"type\": \"stdio\",\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"]\n    }\n  }\n}\n```\n\n**Option 3 — User config** (`settings.json`, applies to all workspaces):\n\nOpen the Command Palette → **Preferences: Open User Settings (JSON)** and add:\n\n```json\n{\n  \"mcp\": {\n    \"servers\": {\n      \"email\": {\n        \"type\": \"stdio\",\n        \"command\": \"npx\",\n        \"args\": [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"]\n      }\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Cursor</strong></summary>\n\nEdit `~/.cursor/mcp.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"email\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Windsurf</strong></summary>\n\nEdit `~/.codeium/windsurf/mcp_config.json`:\n\n```json\n{\n  \"mcpServers\": {\n    \"email\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Zed</strong></summary>\n\nEdit `~/.config/zed/settings.json`:\n\n```json\n{\n  \"context_servers\": {\n    \"email\": {\n      \"command\": {\n        \"path\": \"npx\",\n        \"args\": [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"]\n      }\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Mistral Vibe</strong></summary>\n\nAdd to `~/.vibe/config.toml`:\n\n```toml\n[[mcp_servers]]\nname = \"email-mcp\"\ntransport = \"stdio\"\ncommand = \"npx\"\nargs = [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"]\n```\n\nTo pass credentials directly instead of using a config file, use the `env` field:\n\n```toml\n[[mcp_servers]]\nname = \"email-mcp\"\ntransport = \"stdio\"\ncommand = \"npx\"\nargs = [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"]\nenv = { \"EMAIL_ACCOUNTS\" = \"<your-accounts-json>\" }\n```\n\nMCP tools are exposed as `email-mcp_<tool_name>` (e.g. `email-mcp_list_emails`). Restart Vibe after editing the config.\n\n</details>\n\n<details>\n<summary><strong>Docker (any MCP client)</strong></summary>\n\nRun the server in a container — mount your config directory read-only:\n\n```bash\ndocker run --rm -i \\\n  -v ~/.config/email-mcp:/home/node/.config/email-mcp:ro \\\n  ghcr.io/codefuturist/email-mcp\n```\n\nFor MCP client configuration (e.g. Claude Desktop):\n\n```json\n{\n  \"mcpServers\": {\n    \"email\": {\n      \"command\": \"docker\",\n      \"args\": [\n        \"run\", \"--rm\", \"-i\",\n        \"-v\", \"~/.config/email-mcp:/home/node/.config/email-mcp:ro\",\n        \"ghcr.io/codefuturist/email-mcp\"\n      ]\n    }\n  }\n}\n```\n</details>\n\n<details>\n<summary><strong>Single-account via environment variables (no config file needed)</strong></summary>\n\n```json\n{\n  \"mcpServers\": {\n    \"email\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@codefuturist/email-mcp\", \"stdio\"],\n      \"env\": {\n        \"MCP_EMAIL_ADDRESS\": \"you@gmail.com\",\n        \"MCP_EMAIL_PASSWORD\": \"your-app-password\",\n        \"MCP_EMAIL_IMAP_HOST\": \"imap.gmail.com\",\n        \"MCP_EMAIL_SMTP_HOST\": \"smtp.gmail.com\"\n      }\n    }\n  }\n}\n```\n</details>\n\n### Always-on server (detached)\n\nThe stdio transport lives only as long as an MCP client keeps it open — which also\nmeans the IMAP watcher (and verification catching) stop with it. `email-mcp server`\nruns the Streamable HTTP server as a background service instead, iMCP-style:\n\n```bash\nemail-mcp server start              # detached on http://127.0.0.1:8080/mcp\nemail-mcp server start --port 3199  # any http flags pass through (--host, --token, …)\nemail-mcp server start --attach     # foreground instead (Ctrl-C stops)\nemail-mcp server status             # pid, address, /healthz, uptime\nemail-mcp server logs -n 50         # tail the daemon log\nemail-mcp server restart            # reuses the previous flags\nemail-mcp server stop               # graceful SIGTERM (add --force for SIGKILL)\n```\n\nThe binding lives in the config file, so a plain `server start` is deterministic:\n\n```toml\n[settings.server]\nhost = \"127.0.0.1\"\nport = 8080\npath = \"/mcp\"\ntoken = \"\"            # bearer token; empty = no auth (loopback only)\nallowed_hosts = []    # Host-header allowlist for reverse proxies\n```\n\nPrecedence: CLI flags → `EMAIL_MCP_HTTP_*` env → `[settings.server]` → defaults —\nfor `email-mcp http`, `server start`, and the launchd login item alike. Edit it\ninteractively with `config edit server` (the token renders masked). `--insecure`\nis deliberately flag-only and cannot be persisted.\n\n**Start at login (macOS):** `email-mcp server install` writes a launchd login item\n(`com.email-mcp.server`, RunAtLoad + KeepAlive) running `email-mcp http` with no\nflags — the config file is its single source of truth across reboots and crashes.\n`server status` recognizes the launchd mode; `server uninstall` removes it.\n\nState lives in `$XDG_STATE_HOME/email-mcp/daemon.json`, logs in `server.log` next to\nit (rotated at 5 MB). `stop` only ever signals a process whose command line is\nverifiably this server (PID-reuse safe). Point HTTP-capable MCP clients at\n`http://127.0.0.1:8080/mcp`; binding non-loopback hosts still requires a token.\n\n### Streamable HTTP (networked)\n\nBy default the server speaks MCP over **stdio**, ideal for local desktop clients (see the snippets above). For networked or remote access, run it as a **Streamable HTTP** server instead:\n\n```bash\nemail-mcp http --port 8080\n```\n\nThis serves MCP at `http://127.0.0.1:8080/mcp`, with a health probe at `GET /healthz`.\n\n#### Flags & environment variables\n\n| Flag | Environment variable | Default | Description |\n|------|----------------------|---------|-------------|\n| `--host <addr>` | `EMAIL_MCP_HTTP_HOST` | `127.0.0.1` | Address to bind |\n| `--port <n>` | `EMAIL_MCP_HTTP_PORT` | `8080` | Port to listen on |\n| `--path <path>` | `EMAIL_MCP_HTTP_PATH` | `/mcp` | HTTP path serving MCP |\n| `--token <secret>` | `EMAIL_MCP_HTTP_TOKEN` | — | Require `Authorization: Bearer <secret>` on every request |\n| `--allowed-hosts a,b,c` | `EMAIL_MCP_HTTP_ALLOWED_HOSTS` | _loopback names + bind host_ | Comma-separated `Host` header allowlist (DNS-rebinding protection); `*` disables the check |\n| `--insecure` | — | `false` | Allow binding a non-loopback host without a token |\n\n#### Security\n\n- **Token auth** — When a token is set, every request must send `Authorization: Bearer <token>`.\n- **Non-loopback bind guard** — Binding a non-loopback host (e.g. `0.0.0.0`) **without** a token is refused unless `--insecure` is passed. Use `--insecure` only when TLS and authentication are terminated by an upstream reverse proxy.\n- **DNS-rebinding protection** — The `Host` header is validated against an allowlist (loopback names plus the bind host by default). Set `EMAIL_MCP_HTTP_ALLOWED_HOSTS` to your public domain, or `*` to disable the check when a proxy already enforces it.\n\n#### Client configuration\n\nFor clients that support the Streamable HTTP transport:\n\n```json\n{\n  \"mcpServers\": {\n    \"email\": {\n      \"type\": \"streamable-http\",\n      \"url\": \"http://127.0.0.1:8080/mcp\"\n    }\n  }\n}\n```\n\nWhen a token is configured, add an `Authorization: Bearer <token>` header if your client supports custom headers.\n\n#### Docker\n\n```bash\ndocker compose --profile http up\n```\n\nRequires `EMAIL_MCP_HTTP_TOKEN` to be set; the image `EXPOSE`s port `8080`.\n\n### CLI Commands\n\n```\nemail-mcp [command]\n\nCommands:\n  stdio                     Run as MCP server over stdio (default)\n  http                      Run as MCP server over Streamable HTTP (networked)\n  server start [--attach]   Start an always-on HTTP server (detached by default)\n  server stop [--force]     Stop the detached server\n  server status             Show pid, address, health, uptime (exit 1 if stopped)\n  server restart            Stop and start again (reuses previous flags)\n  server logs [-n N]        Show the last N daemon log lines\n  server install            Install as macOS login item (launchd, survives reboots)\n  server uninstall          Remove the login item and stop the server\n  account list              List all configured accounts\n  account add               Add a new email account interactively\n  account edit [name]       Edit an existing account\n  account delete [name]     Remove an account\n  setup                     Alias for 'account add'\n  test                      Test connections for all or a specific account\n  install                   Register email-mcp with MCP clients interactively\n  install status            Show registration status for detected clients\n  install remove            Unregister email-mcp from MCP clients\n  config show               Show config (passwords masked)\n  config edit [section]     Interactive settings editor (general, server, watcher, verification, cache, hooks, alerts)\n  config validate           Check syntax, schema, typo'd keys, and cross-setting consistency\n  completion zsh|bash|fish  Print shell completion script (accounts and sections complete dynamically)\n  config path               Print config file path\n  config init               Create template config\n  scheduler check           Process pending scheduled emails\n  scheduler list            Show all scheduled emails\n  scheduler install         Install OS-level scheduler (launchd/crontab)\n  scheduler uninstall       Remove OS-level scheduler\n  scheduler status          Show scheduler installation status\n  help                      Show help\n```\n\n### Shell completion\n\n```bash\n# zsh (one line in ~/.zshrc)\nsource <(email-mcp completion zsh)\n\n# bash\nsource <(email-mcp completion bash)\n\n# fish\nemail-mcp completion fish > ~/.config/fish/completions/email-mcp.fish\n```\n\nCompletions cover every command, subcommand, and flag — and complete **account\nnames from your config** (`email-mcp test <TAB>`, `account edit <TAB>`) and\n**settings sections** (`config edit <TAB>`) dynamically.\n\n### Configuration\n\nLocated at `$XDG_CONFIG_HOME/email-mcp/config.toml` (default: `~/.config/email-mcp/config.toml`). Validate it with `email-mcp config validate` (TOML syntax, schema, typo'd keys with did-you-mean, cross-setting consistency; exit 1 on errors — CI-friendly) and edit it interactively with `email-mcp config edit [section]` — every save validates first and backs up the previous file to `config.toml.bak`. Note: programmatic saves rewrite the file without TOML comments (the backup keeps them).\n\n```toml\n[settings]\nrate_limit = 10  # max emails per minute per account\n\n[[accounts]]\nname = \"personal\"\nemail = \"you@gmail.com\"\nfull_name = \"Your Name\"\npassword = \"your-app-password\"\n\n[accounts.imap]\nhost = \"imap.gmail.com\"\nport = 993\ntls = true\n\n[accounts.smtp]\nhost = \"smtp.gmail.com\"\nport = 465\ntls = true\nstarttls = false\nverify_ssl = true\n\n[accounts.smtp.pool]\nenabled = true\nmax_connections = 1\nmax_messages = 100\n```\n\n#### OAuth2 _(experimental)_\n\n> **Note:** OAuth2 support is experimental. Token refresh and provider-specific flows may require additional testing in your environment.\n\n```toml\n[[accounts]]\nname = \"work\"\nemail = \"you@company.com\"\nfull_name = \"Your Name\"\n\n[accounts.oauth2]\nprovider = \"google\"            # or \"microsoft\"\nclient_id = \"your-client-id\"\nclient_secret = \"your-client-secret\"\nrefresh_token = \"your-refresh-token\"\n\n[accounts.imap]\nhost = \"imap.gmail.com\"\nport = 993\ntls = true\n\n[accounts.smtp]\nhost = \"smtp.gmail.com\"\nport = 465\ntls = true\n\n[accounts.smtp.pool]\nenabled = true\nmax_connections = 1\nmax_messages = 100\n```\n\n#### Environment Variables\n\nFor single-account setups (overrides config file):\n\n| Variable | Default | Description |\n|----------|---------|-------------|\n| `MCP_EMAIL_ADDRESS` | *required* | Email address |\n| `MCP_EMAIL_PASSWORD` | *required* | Password or app password |\n| `MCP_EMAIL_IMAP_HOST` | *required* | IMAP server hostname |\n| `MCP_EMAIL_SMTP_HOST` | *required* | SMTP server hostname |\n| `MCP_EMAIL_ACCOUNT_NAME` | `default` | Account name |\n| `MCP_EMAIL_FULL_NAME` | — | Display name |\n| `MCP_EMAIL_USERNAME` | *email* | Login username |\n| `MCP_EMAIL_IMAP_PORT` | `993` | IMAP port |\n| `MCP_EMAIL_IMAP_TLS` | `true` | IMAP TLS |\n| `MCP_EMAIL_SMTP_PORT` | `465` | SMTP port |\n| `MCP_EMAIL_SMTP_TLS` | `true` | SMTP TLS |\n| `MCP_EMAIL_SMTP_STARTTLS` | `false` | SMTP STARTTLS |\n| `MCP_EMAIL_SMTP_VERIFY_SSL` | `true` | Verify SSL certificates |\n| `MCP_EMAIL_SMTP_POOL_ENABLED` | `true` | Enable SMTP transport pooling |\n| `MCP_EMAIL_SMTP_POOL_MAX_CONNECTIONS` | `1` | Max pooled SMTP connections |\n| `MCP_EMAIL_SMTP_POOL_MAX_MESSAGES` | `100` | Max messages per pooled connection |\n| `MCP_EMAIL_RATE_LIMIT` | `10` | Max sends per minute |\n\n### Email Scheduling\n\nThe scheduler enables future email delivery with a layered architecture:\n\n1. **MCP auto-check** — Processes the queue on server startup and every 60 seconds while the MCP server is running\n2. **CLI** — `email-mcp scheduler check` for manual or cron-based processing\n3. **OS-level daemon** — `email-mcp scheduler install` sets up launchd (macOS) or crontab (Linux) to run every minute, independently of the MCP server\n\n> **Important — the daemon must be installed for reliable delivery.**\n> Without it, scheduled emails only fire while an AI client is actively connected.\n> Your machine also needs to be running at the scheduled time; if it's asleep or\n> off, the daemon will process overdue emails on next wake/startup. Failed sends\n> are retried up to **3 times** before being marked `failed`.\n\n#### Setting up the daemon\n\n```bash\n# Install (macOS launchd / Linux crontab — runs every minute)\nemail-mcp scheduler install\n\n# Verify it's running\nemail-mcp scheduler status\n\n# View pending / sent / failed scheduled emails\nemail-mcp scheduler list\n\n# Trigger a manual check immediately\nemail-mcp scheduler check\n\n# Remove the daemon\nemail-mcp scheduler uninstall\n```\n\nScheduled emails are stored as JSON files in `~/.local/state/email-mcp/scheduled/` with status-based locking. Each entry tracks attempts (max 3) and the last error, so you can inspect failures with `scheduler list`.\n\n### Real-time Watcher & AI Hooks\n\nThe IMAP IDLE watcher monitors configured mailboxes in real-time using persistent IDLE connections (separate from tool connections). When new emails arrive:\n\n1. **Static rules** — Pattern-match on from/to/subject → apply labels, flag, or mark read instantly (no AI)\n2. **AI triage** — Remaining emails are analyzed via MCP sampling with a customizable preset prompt\n3. **Notify mode** — Falls back to logging if AI triage is disabled\n\nConfigure in `config.toml`:\n\n```toml\n[settings.watcher]\nenabled = true\nfolders = [\"INBOX\"]\nidle_timeout = 1740     # 29 minutes (IMAP spec max is 30)\n\n[settings.hooks]\non_new_email = \"triage\" # \"triage\" | \"notify\" | \"none\"\npreset = \"inbox-zero\"   # \"inbox-zero\" | \"gtd\" | \"priority-focus\" | \"notification-only\" | \"custom\"\nauto_label = true       # apply AI-suggested labels\nauto_flag = true        # flag urgent emails\nbatch_delay = 5         # seconds to batch before triage\n\n# User context — appended to preset's AI prompt\ncustom_instructions = \"\"\"\nI'm a software engineer. Emails from @mycompany.com are always high priority.\nNewsletters I read: TL;DR, Hacker Newsletter.\n\"\"\"\n\n# Static rules — run BEFORE AI, skip AI if matched\n[[settings.hooks.rules]]\nname = \"GitHub Notifications\"\nmatch = { from = \"*@github.com\" }\nactions = { labels = [\"Dev\"], mark_read = true }\n\n[[settings.hooks.rules]]\nname = \"Newsletter Archive\"\nmatch = { from = \"*@substack.com|*@buttondown.email\" }\nactions = { labels = [\"Newsletter\"] }\n\n[[settings.hooks.rules]]\nname = \"VIP Contacts\"\nmatch = { from = \"ceo@company.com|cto@company.com\" }\nactions = { flag = true, labels = [\"VIP\"] }\n```\n\n#### Presets\n\n| Preset | Focus | Suggested Labels |\n|--------|-------|------------------|\n| `inbox-zero` | Aggressive categorization + archiving | Newsletter, Notification, Updates, Finance, Social, Promo |\n| `gtd` | Getting Things Done contexts | @Action, @Waiting, @Reference, @Someday, @Delegated |\n| `priority-focus` | Simple priority classification (default) | _(none — just priority + flag)_ |\n| `notification-only` | No AI triage, just log | _(none)_ |\n| `custom` | User defines full system prompt | User-defined |\n\n#### Static Rules\n\nStatic rules use glob-style patterns (`*@github.com`) with `|` as OR separator (`*@github.com|*@gitlab.com`). All conditions within a match are AND'd. First matching rule wins.\n\nAvailable actions: `labels` (string array), `flag` (boolean), `mark_read` (boolean), `alert` (boolean — forces desktop notification).\n\n#### Alerts\n\nUrgency-based multi-channel notification routing — grab attention for important emails even when you're not looking at the chat. All channels are **opt-in** and disabled by default.\n\n| Priority | Desktop | Sound | MCP Log Level | Webhook |\n|----------|---------|-------|---------------|---------|\n| `urgent` | ✅ Banner | 🔊 Alert | `alert` | ✅ |\n| `high` | ✅ Banner | 🔇 Silent | `warning` | ✅ |\n| `normal` | ❌ | ❌ | `info` | ❌ |\n| `low` | ❌ | ❌ | `debug` | ❌ |\n\n```toml\n[settings.hooks.alerts]\ndesktop = true              # OS-level notifications (macOS/Linux/Windows)\nsound = true                # play sound for urgent emails\nurgency_threshold = \"high\"  # minimum priority to trigger desktop alert\nwebhook_url = \"https://ntfy.sh/my-email-alerts\"  # optional: Slack, Discord, ntfy.sh, etc.\nwebhook_events = [\"urgent\", \"high\"]\n```\n\n**Supported platforms:** macOS (Notification Center via `osascript`), Linux (`notify-send`), Windows (PowerShell toast). Zero npm dependencies — uses native OS commands.\n\n**Notification setup by platform:**\n\n<details>\n<summary>macOS</summary>\n\nDesktop notifications use `osascript` (built-in). The terminal app running the MCP server needs notification permission:\n\n1. Open **System Settings → Notifications & Focus**\n2. Find your terminal app (Terminal, iTerm2, VS Code, Cursor, etc.)\n3. Enable **Allow Notifications** and choose **Banners** or **Alerts**\n4. Ensure **Focus** / Do Not Disturb is not blocking notifications\n\nUse `check_notification_setup` to diagnose and `test_notification` to verify.\n</details>\n\n<details>\n<summary>Linux</summary>\n\nRequires `notify-send` from `libnotify`. For sound alerts, `paplay` is also needed:\n\n```bash\n# Ubuntu / Debian\nsudo apt install libnotify-bin pulseaudio-utils\n\n# Fedora\nsudo dnf install libnotify pulseaudio-utils\n\n# Arch\nsudo pacman -S libnotify\n```\n\nDesktop notifications require a running display server (X11/Wayland) — they will not work in headless/SSH sessions.\n</details>\n\n<details>\n<summary>Windows</summary>\n\nUses PowerShell toast notifications (built-in):\n\n1. Open **Settings → System → Notifications**\n2. Ensure **Notifications** is turned on\n3. Set **Focus Assist** to allow notifications\n4. If using Windows Terminal, ensure its notifications are enabled\n</details>\n\n**AI-configurable:** The AI can check, test, and configure notifications at runtime:\n- `check_notification_setup` — diagnose platform support and show setup instructions\n- `test_notification` — send a test notification to verify everything works\n- `configure_alerts` — enable/disable desktop, sound, threshold, webhook (with optional persist to config file)\n\n**Webhook payload:**\n```json\n{\n  \"event\": \"email.urgent\",\n  \"account\": \"work\",\n  \"sender\": { \"name\": \"John CEO\", \"address\": \"ceo@company.com\" },\n  \"subject\": \"Q4 Review Due Today\",\n  \"priority\": \"urgent\",\n  \"labels\": [\"VIP\"],\n  \"rule\": \"VIP Contacts\",\n  \"timestamp\": \"2026-02-18T11:30:00Z\"\n}\n```\n\nStatic rules can force desktop notifications with `alert = true`, regardless of urgency threshold:\n```toml\n[[settings.hooks.rules]]\nname = \"VIP Contacts\"\nmatch = { from = \"ceo@company.com\" }\nactions = { flag = true, alert = true, labels = [\"VIP\"] }\n```\n\nFeatures:\n- **Auto-reconnect** — Exponential backoff (1s → 60s) on connection failures\n- **Batching** — Groups arrivals within a configurable delay to reduce AI calls\n- **Rate limiting** — Max 10 sampling calls per minute\n- **Graceful degradation** — Falls back to notify mode if client doesn't support sampling\n- **Resource subscriptions** — Pushes `notifications/resources/updated` for unread counts\n\n#### Verification codes (instant OTP catch)\n\nWhen a mail carrying a verification code (OTP/2FA) or sign-in magic link arrives, email-mcp\ncopies it to your clipboard within ~1–2 seconds and shows a notification —\n**“✅ Code 482913 from GitHub — Copied to clipboard, clears in 60s”**. Press ⌘V / Ctrl+V, done.\n\nDetection is scoring-based (English + German), not a bare digit regex: keyword proximity\n(`verification`, `Bestätigungscode`, `expires`, …) minus negative context (order numbers,\ninvoices, tracking, Zoom passcodes, phone numbers, prices, dates). A miss beats a wrong\ncode on your clipboard.\n\n```toml\n[settings.watcher]\nenabled = true              # REQUIRED for ambient catching (IMAP IDLE push)\n\n[settings.verification]\nenabled = true              # on by default\nauto_copy = true            # copy caught codes/links to the clipboard\nconfirm_copy = false        # ask (native dialog) before touching the clipboard\nnotify = true               # desktop notification on catch\ncopy_links = true           # also catch magic links (only when no code found)\nlink_action = \"open\"        # \"open\" = offer to open links in the browser, \"copy\" = clipboard\nclear_after_seconds = 60    # conditional auto-clear (0 = never)\nmax_age_minutes = 10        # ignore stale messages (IDLE replays)\naccounts = []               # limit to specific accounts (empty = all)\nsender_allowlist = []       # e.g. [\"*@github.com\", \"*@google.com\"]\nsender_denylist = []\n```\n\n**Ask-first mode:** with `confirm_copy = true`, a native macOS dialog (\"Code 482913 from\nGitHub — Copy to clipboard?\") appears before anything touches your clipboard. **Sign-in\nlinks** get a three-button dialog by default (`link_action = \"open\"`): **Open** launches\nthe link in your default browser, **Copy** puts it on the clipboard, **Cancel** does\nnothing — opening is *always* confirmed, since auto-launching a browser from mail content\nwould be a phishing hazard. Set `link_action = \"copy\"` for the silent clipboard behavior.\nDialogs are macOS-only (same mechanism as the calendar confirmation); elsewhere these\nmodes degrade to notification-only.\n\n**Clipboard hygiene (macOS):** codes are written via a JXA `osascript` with the\n`org.nspasteboard.ConcealedType` marker — the same convention 1Password/Bitwarden use — so\nwell-behaved clipboard managers (Maccy, Paste, …) never record them. The auto-clear is\nconditional: the clipboard is only cleared if it still holds the caught value, so anything\nyou copied in the meantime is never stomped. Linux uses `wl-copy`/`xclip`, Windows uses\nPowerShell `Set-Clipboard` (no concealment convention exists there). Zero npm dependencies.\n\n**For agents:** `get_verification_code` fetches the newest code on demand — during an\nautomated signup, call it with `wait_seconds = 30` and it returns the code seconds after\nthe mail lands (event-driven with the watcher, 5 s polling without). If nothing arrives in\ntime, it returns `found: false` with a hint — just call it again.\n\n**Security notes:** the clipboard is shared OS state — any app can read it while the code\nis there (that window is bounded by `clear_after_seconds`). The code itself is never\nwritten to server logs or the audit log; it does appear in `get_verification_code` results,\nwhich is the point of that tool. Kill switches: `enabled = false` (feature off) or\n`auto_copy = false` (notification only). Environment overrides: `MCP_EMAIL_VERIFICATION_*`\n(`_ENABLED`, `_AUTO_COPY`, `_CONFIRM_COPY`, `_NOTIFY`, `_COPY_LINKS`, `_LINK_ACTION`,\n`_CLEAR_AFTER_SECONDS`, `_MAX_AGE_MINUTES`, `_ACCOUNTS`, `_SENDER_ALLOWLIST`,\n`_SENDER_DENYLIST`).\n\nUse `check_clipboard_setup` to diagnose the pipeline (add `test_write = true` for a\nharmless copy → read-back → clear round-trip).\n\n## API\n\n### Tools (52)\n\n> **Structured output:** `list_emails`, `search_emails`, `get_email_status`, and `list_mailboxes` also return machine-readable results (`outputSchema` + `structuredContent`) alongside the human-readable text, for clients that consume typed tool output.\n\n#### Read (14)\n\n| Tool | Description |\n|------|-------------|\n| `list_accounts` | List all configured email accounts |\n| `list_mailboxes` | List folders with unread counts and special-use flags |\n| `list_emails` | Paginated email listing with date, sender, subject, and flag filters |\n| `get_email` | Read full email content with attachment metadata |\n| `get_emails` | Fetch full content of multiple emails in a single call (max 20) |\n| `get_email_status` | Get read/flag/label state of an email without fetching the body |\n| `search_emails` | Search by keyword across subject, sender, and body |\n| `download_attachment` | Download an email attachment by filename |\n| `find_email_folder` | Discover the real folder(s) an email resides in (resolves virtual folders) |\n| `extract_contacts` | Extract unique contacts from recent email headers |\n| `get_thread` | Reconstruct a conversation thread via References/In-Reply-To |\n| `list_templates` | List available email templates |\n| `get_email_stats` | Email analytics — volume, top senders, daily trends |\n| `check_health` | Connection health, latency, quota, and IMAP capabilities |\n\n#### Write (9)\n\n| Tool | Description |\n|------|-------------|\n| `send_email` | Send a new email (plain text or HTML, CC/BCC) |\n| `reply_email` | Reply with proper threading (In-Reply-To, References) |\n| `forward_email` | Forward with original content quoted |\n| `save_draft` | Save an email draft to the Drafts folder |\n| `send_draft` | Send an existing draft and remove from Drafts |\n| `apply_template` | Apply a template with variable substitution |\n| `schedule_email` | Schedule an email for future delivery |\n| `list_scheduled` | List scheduled emails by status |\n| `cancel_scheduled` | Cancel a pending scheduled email |\n\n#### Manage (7)\n\n| Tool | Description |\n|------|-------------|\n| `move_email` | Move email between folders |\n| `delete_email` | Move to Trash or permanently delete |\n| `mark_email` | Mark as read/unread, flag/unflag |\n| `bulk_action` | Batch operation on up to 100 emails |\n| `create_mailbox` | Create a new mailbox folder |\n| `rename_mailbox` | Rename an existing mailbox folder |\n| `delete_mailbox` | Permanently delete a mailbox and contents |\n\n#### Labels (5)\n\n| Tool | Description |\n|------|-------------|\n| `list_labels` | Discover available labels (auto-detects provider strategy) |\n| `add_label` | Add a label to an email (ProtonMail folders, Gmail X-GM-LABELS, or IMAP keywords) |\n| `remove_label` | Remove a label from an email |\n| `create_label` | Create a new label |\n| `delete_label` | Delete a label |\n\n#### Watcher & Alerts (6)\n\n| Tool | Description |\n|------|-------------|\n| `get_watcher_status` | Show IMAP IDLE connections, folders being monitored, and last-seen UIDs |\n| `list_presets` | List available AI triage presets with descriptions and suggested labels |\n| `get_hooks_config` | Show current hooks configuration — preset, rules, and custom instructions |\n| `configure_alerts` | Update alert/notification settings at runtime |\n| `check_notification_setup` | Diagnose desktop notification support and provide setup instructions |\n| `test_notification` | Send a test notification to verify OS permissions are configured |\n\n#### Verification (3)\n\n| Tool | Description |\n|------|-------------|\n| `get_verification_code` | Find (or wait up to 45 s for) the newest OTP/2FA code or sign-in magic link, with optional clipboard copy |\n| `check_clipboard_setup` | Diagnose clipboard integration (platform tools, concealed-write support) with optional round-trip test |\n| `configure_verification` | Update verification-catching settings at runtime (incl. starting/stopping the catcher), optional persist to config file |\n\n#### Calendar & Reminders (6)\n\n| Tool | Description |\n|------|-------------|\n| `extract_calendar` | Extract ICS/iCalendar events from an email |\n| `analyze_email_for_scheduling` | Analyze an email to detect events and reminder-worthy content |\n| `add_to_calendar` | Add an email event to the local calendar (macOS/Linux) |\n| `create_reminder` | Create a reminder in macOS Reminders.app from an email |\n| `list_calendars` | List all available local calendars |\n| `check_calendar_permissions` | Check whether the local calendar is accessible |\n\n### Prompts (7)\n\n| Prompt | Description |\n|--------|-------------|\n| `triage_inbox` | Categorize and prioritize unread emails with suggested actions |\n| `summarize_thread` | Summarize an email conversation thread |\n| `compose_reply` | Draft a context-aware reply to an email |\n| `draft_from_context` | Compose a new email from provided context and instructions |\n| `extract_action_items` | Extract actionable tasks from email threads |\n| `summarize_meetings` | Summarize upcoming calendar events from emails |\n| `cleanup_inbox` | Suggest emails to archive, delete, or unsubscribe from |\n\n### Resources (6)\n\n| Resource | URI | Description |\n|----------|-----|-------------|\n| Accounts | `email://accounts` | List of configured accounts |\n| Mailboxes | `email://{account}/mailboxes` | Folder tree for an account |\n| Unread | `email://{account}/unread` | Unread email summary |\n| Templates | `email://templates` | Available email templates |\n| Stats | `email://{account}/stats` | Email statistics snapshot |\n| Scheduled | `email://scheduled` | Pending scheduled emails |\n\n### Provider Auto-Detection\n\n| Provider | Domains |\n|----------|---------|\n| Gmail | gmail.com |\n| Outlook / Hotmail | outlook.com, hotmail.com, live.com |\n| Yahoo Mail | yahoo.com, ymail.com |\n| iCloud | icloud.com, me.com, mac.com |\n| Fastmail | fastmail.com |\n| ProtonMail Bridge | proton.me, protonmail.com |\n| Zoho Mail | zoho.com |\n| GMX | gmx.com, gmx.de, gmx.net |\n\n### Architecture\n\n```\nsrc/\n├── main.ts                — Entry point and subcommand routing\n├── server.ts              — MCP server factory\n├── logging.ts             — MCP protocol logging bridge\n├── cli/                   — Interactive CLI commands\n│   ├── account-commands.ts — Account CRUD (list, add, edit, delete)\n│   ├── setup.ts           — Legacy setup alias → account add\n│   ├── test.ts            — Connection tester\n│   ├── config-commands.ts — Config management (show, edit, path, init)\n│   ├── install-commands.ts — MCP client registration (install, status, remove)\n│   ├── providers.ts       — Provider auto-detection + OAuth2 endpoints (experimental)\n│   └── scheduler.ts       — Scheduler CLI\n├── config/                — Configuration layer\n│   ├── xdg.ts             — XDG Base Directory paths\n│   ├── schema.ts          — Zod validation schemas\n│   └── loader.ts          — Config loader (TOML + env vars)\n├── connections/\n│   └── manager.ts         — Lazy persistent IMAP/SMTP with OAuth2 (experimental)\n├── services/              — Business logic\n│   ├── imap.service.ts    — IMAP operations\n│   ├── label-strategy.ts  — Provider-aware label strategy (ProtonMail/Gmail/IMAP keywords)\n│   ├── smtp.service.ts    — SMTP operations\n│   ├── template.service.ts — Email template engine\n│   ├── oauth.service.ts   — OAuth2 token management (experimental)\n│   ├── calendar.service.ts — ICS/iCalendar parsing\n│   ├── scheduler.service.ts — Email scheduling queue\n│   ├── watcher.service.ts — IMAP IDLE real-time watcher with auto-reconnect\n│   ├── hooks.service.ts   — AI triage via MCP sampling + static rules + auto-labeling/flagging\n│   ├── notifier.service.ts — Multi-channel notification dispatcher (desktop/sound/webhook)\n│   ├── clipboard.service.ts — Concealed clipboard writes for caught codes (zero deps)\n│   ├── dialog.service.ts   — Native confirm dialogs + browser hand-off (macOS)\n│   ├── verification-catcher.service.ts — Instant OTP/magic-link catch on new mail\n│   ├── presets.ts         — Built-in hook presets (inbox-zero, gtd, priority-focus, etc.)\n│   └── event-bus.ts       — Typed EventEmitter for internal email events\n├── tools/                 — MCP tool definitions (52)\n├── prompts/               — MCP prompt definitions (7)\n├── resources/             — MCP resource definitions (6)\n├── safety/                — Audit trail and rate limiter\n└── types/                 — Shared TypeScript types\n```\n\n## Maintainers\n\n[@codefuturist](https://github.com/codefuturist)\n\n## Contributing\n\nPRs accepted. Please conform to the [standard-readme](https://github.com/RichardLitt/standard-readme) specification when editing this README.\n\n```bash\n# Development workflow\npnpm install\npnpm typecheck   # type check\npnpm check       # lint and format\npnpm build       # build\npnpm start       # run\n```\n\n### Testing\n\n```bash\npnpm test              # unit tests\npnpm test:integration  # against a throwaway GreenMail server (Docker required)\npnpm smoke             # every MCP tool against a real configured account\n```\n\n`pnpm smoke` drives all tools over stdio the way a client does, which reaches\nwhat GreenMail cannot: provider quirks, real-world MIME, and the macOS\nCalendar bridges. It needs a working account, so it is not part of CI. Writes\nstay inside a scratch folder and a draft it creates itself; it does not touch\nCalendar, Reminders, notifications, or `reply_email`, which would send mail to\na real correspondent. Pass `E2E_ACCOUNT=<name>` to choose an account, otherwise\nit uses the first one configured.\n\n\n## License\n\n[LGPL-3.0-or-later](LICENSE)\n","readmeFilename":"README.md"}