{"_id":"@cardor/email-summarizer","_rev":"5-83394208bc79b878d3cd2770f0ec9e20","name":"@cardor/email-summarizer","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@cardor/email-summarizer","version":"1.0.0","keywords":["email","summarizer","modelcontextprotocol","mcp","typescript","nodejs"],"author":"","license":"ISC","_id":"@cardor/email-summarizer@1.0.0","maintainers":[{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"}],"dist":{"shasum":"be4c6e326b5f06e22f7fd855ae6837caabc649b2","tarball":"https://registry.npmjs.org/@cardor/email-summarizer/-/email-summarizer-1.0.0.tgz","fileCount":20,"integrity":"sha512-BHqR7vUSpaEqqjV5K7rmeMjT6XpLxwNNqkg48KJJRUASdN1pzrWpbMmfn+JkcJFUIdh/VQeVrpo5mV2G2jxItw==","signatures":[{"sig":"MEYCIQCp8+aDCf5vpNfveK1jIkOJuI1z6Vjhz5pqkYsyd6MgAgIhAPHt8OpFwmatIsVhNIe44lWWR5Bo2lmZR75eDpkyuyka","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":38489},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","gitHead":"fa1ea06bdd11c99a1f1ac916616b4c2c85f02b5b","scripts":{"dev":"tsx ./main.ts","build":"tsc && tsc-alias && ts-add-js-extension --dir=dist","serve":"tsx ./server.ts","start":"node dist/main.js","docker:stop":"docker compose down","docker:build":"docker build -t email-summarizer .","docker:start":"docker compose up","docker:remove":"docker compose down --rmi all --volumes --remove-orphans","docker:remove:img":"docker rmi email-summarizer --force","docker:build-and-start":"npm run build:docker && docker compose up -d"},"_npmUser":{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"},"_npmVersion":"10.9.2","description":"A Node.js application for summarizing emails using the ModelContextProtocol (MCP).","directories":{},"_nodeVersion":"22.17.1","dependencies":{"tsx":"^4.20.3","zod":"3.25.76","cors":"^2.8.5","pino":"^9.7.0","chalk":"^5.4.1","luxon":"^3.7.1","express":"^5.1.0","imapflow":"^1.0.191","tsc-alias":"^1.8.16","@types/cors":"^2.8.19","pino-pretty":"^13.0.0","@types/express":"^5.0.3","@modelcontextprotocol/sdk":"1.15.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.12.4","devDependencies":{"typescript":"^5.8.3","@types/luxon":"^3.6.2","ts-add-js-extension":"^1.6.6"},"_npmOperationalInternal":{"tmp":"tmp/email-summarizer_1.0.0_1753445631285_0.44166726463641814","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@cardor/email-summarizer","version":"1.2.0","keywords":["email","summarizer","modelcontextprotocol","mcp","typescript","nodejs"],"author":"","license":"ISC","_id":"@cardor/email-summarizer@1.2.0","maintainers":[{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"}],"bin":{"cardor-email-summarizer":"dist/main.js"},"dist":{"shasum":"570e8a6e1cda3a08ad6995374060804a0c341c53","tarball":"https://registry.npmjs.org/@cardor/email-summarizer/-/email-summarizer-1.2.0.tgz","fileCount":20,"integrity":"sha512-u3sIwbzBMpMcu1VJz7wiHRzLn1SSngGlt6v3uslzgcTfXYWaLFKtKiiN5sZkTwpTPAq+KU2ZfcCrs0BnAg2oYg==","signatures":[{"sig":"MEQCIAaObAfuWmItgC1amV/CzUvL6StVNY3twUulJ7KZByV1AiAVl1f4Z7pZBo6kpElsdmkbGqgotxO7o20bz0BP4if08A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39032},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","gitHead":"66daa2fdada55ecff3f0f2e1f35af5301aa5ea72","scripts":{"dev":"tsx ./main.ts","build":"tsc && tsc-alias && ts-add-js-extension --dir=dist","serve":"tsx ./server.ts","start":"node dist/main.js","docker:stop":"docker compose down","docker:build":"docker build -t email-summarizer .","docker:start":"docker compose up","docker:remove":"docker compose down --rmi all --volumes --remove-orphans","docker:remove:img":"docker rmi email-summarizer --force","docker:build-and-start":"npm run build:docker && docker compose up -d"},"_npmUser":{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"},"_npmVersion":"10.9.2","description":"A Node.js application for summarizing emails using the ModelContextProtocol (MCP).","directories":{},"_nodeVersion":"22.17.1","dependencies":{"tsx":"^4.20.3","zod":"3.25.76","cors":"^2.8.5","pino":"^9.7.0","chalk":"^5.4.1","luxon":"^3.7.1","express":"^5.1.0","imapflow":"^1.0.191","tsc-alias":"^1.8.16","@types/cors":"^2.8.19","pino-pretty":"^13.0.0","@types/express":"^5.0.3","@modelcontextprotocol/sdk":"1.15.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.12.4","devDependencies":{"typescript":"^5.8.3","@types/luxon":"^3.6.2","ts-add-js-extension":"^1.6.6"},"_npmOperationalInternal":{"tmp":"tmp/email-summarizer_1.2.0_1753446638986_0.6472953622417825","host":"s3://npm-registry-packages-npm-production"}},"1.2.2":{"name":"@cardor/email-summarizer","version":"1.2.2","keywords":["email","summarizer","modelcontextprotocol","mcp","typescript","nodejs"],"author":"","license":"ISC","_id":"@cardor/email-summarizer@1.2.2","maintainers":[{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"}],"bin":{"cardor-email-summarizer":"dist/main.js"},"dist":{"shasum":"170350ae728614c92150afd731e2e179a4f3ae02","tarball":"https://registry.npmjs.org/@cardor/email-summarizer/-/email-summarizer-1.2.2.tgz","fileCount":20,"integrity":"sha512-UT8K5euiXFCh871fDCyYcW4Y7u6bb3z+0puyxiGIBlF99D8KJeZXOnObURnqhdn6RGgehmsuR7jUn9CSrxKHxg==","signatures":[{"sig":"MEUCIQDyjPOxBRo2drqAwbP0KpnhPIrFufJ73NyfrjhmMxqXAwIgYjLC007o0JMBOQgGHEFiZyc9UCheDfqsdSEpUtIF/Pc=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":39073},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","gitHead":"9d180977a1c52f654f1989a703d5b3801130dc92","scripts":{"dev":"tsx ./main.ts","build":"tsc && tsc-alias && ts-add-js-extension --dir=dist","serve":"tsx ./server.ts","start":"node dist/main.js","docker:stop":"docker compose down","docker:build":"docker build -t email-summarizer .","docker:start":"docker compose up","docker:remove":"docker compose down --rmi all --volumes --remove-orphans","docker:remove:img":"docker rmi email-summarizer --force","docker:build-and-start":"npm run build:docker && docker compose up -d"},"_npmUser":{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"},"_npmVersion":"10.9.2","description":"A Node.js application for summarizing emails using the ModelContextProtocol (MCP).","directories":{},"_nodeVersion":"22.17.1","dependencies":{"tsx":"^4.20.3","zod":"3.25.76","cors":"^2.8.5","pino":"^9.7.0","chalk":"^5.4.1","luxon":"^3.7.1","express":"^5.1.0","imapflow":"^1.0.191","tsc-alias":"^1.8.16","@types/cors":"^2.8.19","pino-pretty":"^13.0.0","@types/express":"^5.0.3","@modelcontextprotocol/sdk":"1.15.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.12.4","devDependencies":{"typescript":"^5.8.3","@types/luxon":"^3.6.2","ts-add-js-extension":"^1.6.6"},"_npmOperationalInternal":{"tmp":"tmp/email-summarizer_1.2.2_1753447360923_0.8296662460703585","host":"s3://npm-registry-packages-npm-production"}},"1.2.6":{"name":"@cardor/email-summarizer","version":"1.2.6","keywords":["email","summarizer","modelcontextprotocol","mcp","typescript","nodejs"],"author":"","license":"ISC","_id":"@cardor/email-summarizer@1.2.6","maintainers":[{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"}],"bin":{"cardor-email-summarizer":"dist/main.js"},"dist":{"shasum":"7dadf5e4d50e0d04d2964d2c81d94a4b90d67b24","tarball":"https://registry.npmjs.org/@cardor/email-summarizer/-/email-summarizer-1.2.6.tgz","fileCount":26,"integrity":"sha512-NXkbgP7ZVL/aOwh7pCzHFx9x5AzuPD6ZCJ1ajIKz7mo+V5zzigMKeqENruYzw63vbGazaJ05tU/bqW+LF28UDQ==","signatures":[{"sig":"MEUCIQCoX5/c4Yhhg8O5D9cSHRNAendpdrdUp+0iIvp42kfwlAIgVskfkHcMRdE0ihKHmJo6yLGBqUNuLBLiWtknLGC2GQM=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":49770},"main":"dist/main.js","type":"module","types":"./dist/main.d.ts","gitHead":"743941570029e817dbca937013980a0e286c1355","scripts":{"dev":"tsx ./main.ts","build":"tsc && tsc-alias && ts-add-js-extension --dir=dist","serve":"tsx ./server.ts","start":"node dist/main.js","docker:stop":"docker compose down","docker:build":"docker build -t email-summarizer .","docker:start":"docker compose up","docker:remove":"docker compose down --rmi all --volumes --remove-orphans","docker:remove:img":"docker rmi email-summarizer --force","docker:build-and-start":"npm run build:docker && docker compose up -d"},"_npmUser":{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"},"_npmVersion":"10.9.2","description":"A Node.js application for summarizing emails using the ModelContextProtocol (MCP).","directories":{},"_nodeVersion":"22.17.1","dependencies":{"tsx":"^4.20.3","zod":"3.25.76","cors":"^2.8.5","pino":"^9.7.0","chalk":"^5.4.1","luxon":"^3.7.1","express":"^5.1.0","imapflow":"^1.0.191","tsc-alias":"^1.8.16","@types/cors":"^2.8.19","pino-pretty":"^13.0.0","@types/express":"^5.0.3","@modelcontextprotocol/sdk":"1.15.0"},"_hasShrinkwrap":false,"packageManager":"pnpm@10.12.4","devDependencies":{"typescript":"^5.8.3","@types/luxon":"^3.6.2","ts-add-js-extension":"^1.6.6"},"_npmOperationalInternal":{"tmp":"tmp/email-summarizer_1.2.6_1753450376492_0.9316203762947939","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@cardor/email-summarizer","version":"1.3.0","description":"A Node.js application for summarizing emails using the ModelContextProtocol (MCP).","type":"module","main":"dist/main.js","bin":{"cardor-email-summarizer":"dist/main.js","cardor-email-summarizer-server":"dist/server.js"},"scripts":{"dev":"tsx ./src/main.ts","serve":"tsx ./src/server.ts","start":"node dist/main.js","build":"tsc && tsc-alias && ts-add-js-extension --dir=dist","docker:build":"docker build -t email-summarizer .","docker:start":"docker compose up","docker:stop":"docker compose down","docker:build-and-start":"npm run build:docker && docker compose up -d","docker:remove":"docker compose down --rmi all --volumes --remove-orphans","docker:remove:img":"docker rmi email-summarizer --force"},"keywords":["email","summarizer","modelcontextprotocol","mcp","typescript","nodejs"],"author":{"name":"enmanuelmag@cardor.dev"},"license":"ISC","dependencies":{"@modelcontextprotocol/sdk":"1.15.0","@types/cors":"^2.8.19","@types/express":"^5.0.3","chalk":"^5.4.1","cors":"^2.8.5","express":"^5.1.0","imapflow":"^1.0.191","luxon":"^3.7.1","node-fetch":"^3.3.2","pdf-ts":"^0.0.2","pino":"^9.7.0","pino-pretty":"^13.0.0","tsc-alias":"^1.8.16","tsx":"^4.20.3","zod":"3.25.76"},"devDependencies":{"@types/luxon":"^3.6.2","ts-add-js-extension":"^1.6.6","typescript":"^5.8.3"},"_id":"@cardor/email-summarizer@1.3.0","gitHead":"bfdf4d3e6aa7069ff52a6fe70fb77b53e4219824","types":"./dist/main.d.ts","_nodeVersion":"22.17.1","_npmVersion":"10.9.2","dist":{"integrity":"sha512-d+Ymu4gSZ48JEGw7paVBiorFajCbH9uwEQ3kIGRW3X8bdKWGIF5VzfiJfdJIH8FnBAY1muWns8wC4QhKz+tcPw==","shasum":"9ccc4b52377ed4d9ed20f2bd8dc09f7b00f61dd6","tarball":"https://registry.npmjs.org/@cardor/email-summarizer/-/email-summarizer-1.3.0.tgz","fileCount":29,"unpackedSize":60736,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIBzZDxbfuUAG2LLgWPy7HDl6EB5g9SYbUi9h4g0Nydg6AiEA1V+PQpf3DgcJIYd735+6MbGUHdbYv57zZwHITZ0x69k="}]},"_npmUser":{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"},"directories":{},"maintainers":[{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/email-summarizer_1.3.0_1753816991346_0.9304145404037671"},"_hasShrinkwrap":false}},"time":{"created":"2025-07-25T12:13:51.194Z","modified":"2025-07-29T19:23:11.767Z","1.0.0":"2025-07-25T12:13:51.482Z","1.2.0":"2025-07-25T12:30:39.156Z","1.2.2":"2025-07-25T12:42:41.095Z","1.2.6":"2025-07-25T13:32:56.682Z","1.3.0":"2025-07-29T19:23:11.561Z"},"license":"ISC","keywords":["email","summarizer","modelcontextprotocol","mcp","typescript","nodejs"],"description":"A Node.js application for summarizing emails using the ModelContextProtocol (MCP).","maintainers":[{"name":"enmanuelmag","email":"enmanuelmag@gmail.com"}],"readme":"# Email Summarizer\n\nThis project is designed to summarize emails using a custom IMAP client to connect to the user's email inbox and retrieve relevant messages based on specified criteria.\n\n## Features\n- Connects to an IMAP server to fetch emails.\n- Can filter emails by:\n  - Subject\n  - Date range\n  - Sender email address\n  - Mailbox (default is 'INBOX')\n  \n## Debug\n- Stdio: If you run this server in STDIO mode, all logs are saved in `server.log` file, in the location where you run the command. You can change this, setting the `DEBUG_LOG_FILE` environment variable to a custom path (absolute path).\n- Docker: this mode use STDIO mode, so all logs are saved in `server.log` file, in the location where you run the command. You can change this, setting the `DEBUG_LOG_FILE` environment variable to a custom path (absolute path).\n- Stream: If you run this server in stream mode, all logs are printed to the console.\n\n## Available Tools\n\n- `search-emails`: Get emails from the user's inbox.\n- `mark-emails-as-read`: Mark specified emails as read.\n\n## Usage\n\n### Command (NPM)\n1. Install dependencies `pnpm install -g @cardor/email-summarizer`\n2. Add the configuration to your app client.\n```json\n\"email-summarizer\": {\n  \"type\": \"stdio\", // Maybe your client MCP require specific type, like 'stdio'\n  \"command\": \"cardor-email-summarizer\",\n  \"env\": {\n    // Your email address.\n    \"EMAIL_USERNAME\": \"<your-email>\", \n    // Your email app password.\n    \"EMAIL_PASSWORD\": \"<your-app-password>\",\n    // The port for the IMAP server (default is 993).\n    \"EMAIL_PORT\": \"993\",  \n    // The type of email client: gmail, outlook, yahoo, etc (default is 'gmail').\n    \"EMAIL_CLIENT_TYPE\": \"gmail\", \n    // Custom prompt for summarization. Must include `{{emails}}` to insert the email content.\n    \"EMAIL_PROMPT\": \"Summarize the following emails: {{emails}}\", \n    // You can also use a file path to load the prompt content. You must use absolute path.\n    // The file types supported are: .txt, .md, .json or .pdf.\n    // \"EMAIL_PROMPT\": \"file:/Absolute/Path/To/Prompt.txt\"\n    // Also you can define a URL to load the prompt content. The URL must return a text content.\n    // The file types supported are: .txt, .md, .json or .pdf.\n    // \"EMAIL_PROMPT\": \"https://example.com/path/to/prompt.txt\"\n  }\n}\n```\n\n### Command (With Docker)\n1. Clone the repository `git clone <repository-url>`\n2. Build the Docker image `pnpm run docker:build`\n3. Add the configuration to your app client.\n```json\n\"email-dock\": {\n  \"command\": \"docker\",\n  \"args\": [\n    \"run\",\n    \"-i\",\n    \"--rm\",\n    \"-e\",\n    \"EMAIL_USERNAME=<your-email>\",\n    \"-e\",\n    \"EMAIL_PASSWORD=<your-app-password>\",\n    \"-e\",\n    \"EMAIL_PORT=993\",\n    \"-e\",\n    \"EMAIL_CLIENT_TYPE=gmail\",\n    \"-e\",\n    // Custom prompt for summarization. Must include `{{emails}}` to insert the email content.\n    // As above, you can use a file path or a URL.\n    \"EMAIL_PROMPT=Summarize the following emails: {{emails}}\", \n    \"email-summarizer\",\n  ]\n}\n```\n\n### Stream HTTP requests\nYou can also use the HTTP API to interact with the email summarizer. The API expects the following headers:\n1. Clone the repository `git clone <repository-url>`\n2. Install dependencies `pnpm install`\n3. Build the MCP `pnpm run build`\n4. Start the MCP `pnpm run start`\n5. Use the MCP serve to `http://localhost:5555/mcp`\n  - Send in headers:\n    - `email-username`: Your email address.\n    - `email-password`: Your email app password.\n    - `email-port`: The port for the IMAP server (default is 993).\n    - `email-client-type`: The type of email client (default is 'gmail').\n    - `email-prompt`: Custom prompt for summarization (default is 'Summarize the following emails: {{emails}}'). Must include `{{emails}}` to insert the email content. As above, you can use a file path or a URL.\n\n\n## Future work\n\nI'll be working on:\n- [x] Allow execute action as marking emails as read, deleting, etc.\n- [x] Allow override default prompt for the summarization.\n- [ ] Adding more filters and options for email retrieval.\n- [ ] Allow fetch whole body information of the email (text, HTML, attachments, etc.).\n","readmeFilename":"README.md","author":{"name":"enmanuelmag@cardor.dev"}}