{"_id":"@makerkit/mailpit","_rev":"3-ee2b53b3e120f18cffdf1c3e9b3ac1de","name":"@makerkit/mailpit","dist-tags":{"latest":"0.0.1"},"versions":{"0.0.0-stage":{"name":"@makerkit/mailpit","version":"0.0.0-stage","_id":"@makerkit/mailpit@0.0.0-stage","stub":true,"maintainers":[{"name":"makerkit","email":"info@makerkit.dev"}],"dist":{"shasum":"18156b67a8b447f52aa86a476b03e9a03e456fbe","tarball":"https://registry.npmjs.org/@makerkit/mailpit/-/mailpit-0.0.0-stage.tgz","fileCount":2,"integrity":"sha512-UDtc5NRDezp3AXQzy73UoF3aBFxlIG9VMi+vg96TmZq+lAGLJAZRbs0NJ1Mmc79/xW3AYdqHF3LBGAi9orvasw==","signatures":[{"sig":"MEUCICTvUzLbBkxS6zbsFLKmc54GJ61pE5zcebUnbYnqSArmAiEAmruO8sj4JC35wzoKSSCgXD8Gl72D1OVrTA4/fy5BYjQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":339},"_npmUser":{"name":"makerkit","email":"info@makerkit.dev"},"description":"Temporary package placeholder for staged publishing","directories":{}},"0.0.0":{"name":"@makerkit/mailpit","version":"0.0.0","keywords":["ai-agents","email","mailpit","mcp","testing"],"license":"MIT","_id":"@makerkit/mailpit@0.0.0","maintainers":[{"name":"makerkit","email":"info@makerkit.dev"}],"homepage":"https://github.com/makerkit/makerkit#readme","bugs":{"url":"https://github.com/makerkit/makerkit/issues"},"dist":{"shasum":"f78e8c87a98a316f891d7820d342dc4294022e9c","tarball":"https://registry.npmjs.org/@makerkit/mailpit/-/mailpit-0.0.0.tgz","fileCount":38,"integrity":"sha512-mX7tpn4fA8S81Vso9yQnq35ATEvQzgmzwQNXxYLjHYod3jlqoQvsO7qO+lNWZBof/+29ZSNOTQXpGoUzD3OsCw==","signatures":[{"sig":"MEUCIAmI0eaSlCxF/ZcsLU6eWoEe1b2qJYJaE1XrHpb8WxAHAiEAl6DryRnRlhK6314RKt/YcYjvq4vnjHfJx13E2dqvpjg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"sig":"MEUCIQCyWT/fopWI5AQuRz97VZa+V6jtrEjEmD+B8GhHj4XjfQIgXfpGDH9eoQLkwkL54nb0zu3v6QKvnbEF5o3tMezTJ9I=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":116819},"main":"./index.js","exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.js"},"./mcp":{"types":"./mcp.d.ts","import":"./mcp.mjs","require":"./mcp.js"},"./node":{"types":"./node.d.ts","import":"./node.mjs","require":"./node.js"}},"gitHead":"4963f46e641f462521064f8246facfe4cbee0d93","scripts":{"test":"vitest run","build":"tsdown && node ../../scripts/prepare-dist.mjs","typecheck":"tsc --noEmit -p tsconfig.lib.json && tsc --noEmit -p tsconfig.spec.json"},"_npmUser":{"name":"makerkit","email":"info@makerkit.dev"},"repository":{"url":"git+https://github.com/makerkit/makerkit.git","type":"git","directory":"packages/mailpit"},"_npmVersion":"10.9.0","description":"Lets coding agents read the emails your app sends in local development through Mailpit, to test sign-up, invites and password resets.","directories":{},"_nodeVersion":"25.6.1","dependencies":{"zod":"^3.25.0 || ^4.0.0"},"publishConfig":{"access":"public","directory":"dist","linkDirectory":true},"_hasShrinkwrap":false,"devDependencies":{"zod":"catalog:","vite":"catalog:","tsdown":"catalog:","vitest":"catalog:","typescript":"catalog:","@types/node":"catalog:","@modelcontextprotocol/sdk":"catalog:"},"peerDependencies":{"@modelcontextprotocol/sdk":"^1.32.0"},"peerDependenciesMeta":{"@modelcontextprotocol/sdk":{"optional":true}},"_npmOperationalInternal":{"tmp":"tmp/mailpit_0.0.0_1792068947753_0.867992527074944","host":"s3://npm-registry-packages-npm-production"}},"0.0.1":{"_id":"@makerkit/mailpit@0.0.1","bugs":{"url":"https://github.com/makerkit/makerkit/issues"},"dist":{"shasum":"079b42a6f055313abb123365853b65c06862f650","tarball":"https://registry.npmjs.org/@makerkit/mailpit/-/mailpit-0.0.1.tgz","fileCount":17,"integrity":"sha512-EO6092SbtXHBmCldJjOjMfgUPJnVRHzVBaQJLJeA3X5ur7jLJ8K6jnJzh7BL6vE4W9nJZUrpSBLNIBHBP9Sqzw==","signatures":[{"sig":"MEYCIQCyK5SvaXyN8Pb+oXQPoPaPpFWl+dHtg7TaAMTy1xbl1AIhAOo8VmnlYHplAJWpGnDVGHXRUxzKE5Ntgu4CCyhBg/kZ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCEqc606CsY5MqO3rGOeWwPVr5V2u6URlvit9IGT3Xa6wIgUa/g6pF1WIxt3ycf4GFer/AztY2aQBkOuBZUNtvKZiI="}],"unpackedSize":56202},"main":"./index.js","name":"@makerkit/mailpit","types":"./index.d.ts","exports":{".":{"types":"./index.d.ts","import":"./index.mjs","require":"./index.js"},"./mcp":{"types":"./mcp.d.ts","import":"./mcp.mjs","require":"./mcp.js"},"./node":{"types":"./node.d.ts","import":"./node.mjs","require":"./node.js"}},"gitHead":"4963f46e641f462521064f8246facfe4cbee0d93","license":"MIT","version":"0.0.1","_npmUser":{"name":"makerkit","email":"info@makerkit.dev"},"homepage":"https://github.com/makerkit/makerkit#readme","keywords":["ai-agents","email","mailpit","mcp","testing"],"repository":{"url":"git+https://github.com/makerkit/makerkit.git","type":"git","directory":"packages/mailpit"},"_npmVersion":"10.9.0","description":"Lets coding agents read the emails your app sends in local development through Mailpit, to test sign-up, invites and password resets.","directories":{},"maintainers":[{"name":"makerkit","email":"info@makerkit.dev"}],"_nodeVersion":"25.6.1","dependencies":{"zod":"^3.25.0 || ^4.0.0"},"_hasShrinkwrap":false,"peerDependencies":{"@modelcontextprotocol/sdk":"^1.32.0"},"peerDependenciesMeta":{"@modelcontextprotocol/sdk":{"optional":true}},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mailpit_0.0.1_1792069293988_0.21370203228512774"}}},"time":{"created":"2026-10-15T12:53:39.179Z","modified":"2026-10-15T13:01:34.233Z","0.0.0-stage":"2026-10-15T12:53:39.179Z","0.0.0":"2026-10-15T12:55:47.860Z","0.0.1":"2026-10-15T13:01:34.092Z"},"bugs":{"url":"https://github.com/makerkit/makerkit/issues"},"license":"MIT","homepage":"https://github.com/makerkit/makerkit#readme","keywords":["ai-agents","email","mailpit","mcp","testing"],"repository":{"url":"git+https://github.com/makerkit/makerkit.git","type":"git","directory":"packages/mailpit"},"description":"Lets coding agents read the emails your app sends in local development through Mailpit, to test sign-up, invites and password resets.","maintainers":[{"name":"makerkit","email":"info@makerkit.dev"}],"readme":"# @makerkit/mailpit\n\nLets coding agents read the emails your app sends in local development. It talks to [Mailpit](https://mailpit.axllent.org)'s HTTP API, so an agent testing sign-up, team invites or password resets can find the email, read its text, HTML and headers, and follow the link in it.\n\nWorks with any Mailpit: the Docker image (`axllent/mailpit`, port 8025), Docker Compose, or the one the Supabase CLI starts (port 54324 by default).\n\n## Tools\n\n| Tool | Does |\n|---|---|\n| `emails_list` | Lists received emails, newest first (`start`, `limit` up to 200) |\n| `emails_read` | One email by id: subject, addresses, text, HTML and headers. Mailpit marks it as read |\n| `emails_set_read_status` | Marks one email read or unread |\n| `mailbox_status` | Whether Mailpit is running and its API answers, and how to start it when it is not |\n\nWhen Mailpit is not running, the email tools fail with `Mailpit is not running at <url>.` followed by your start hint.\n\n## Use from code\n\n```ts\nimport { createMailpitService } from '@makerkit/mailpit';\nimport { createMailpitDeps } from '@makerkit/mailpit/node';\n\nconst mailpit = createMailpitService(createMailpitDeps(process.cwd()));\n\nconst { messages } = await mailpit.list({ start: 0, limit: 20 });\nconst invite = messages.find((message) =>\n  message.to.some((to) => to.includes('new@example.com')),\n);\n\nif (invite) {\n  const email = await mailpit.read({ id: invite.id });\n  console.log(email.text);\n}\n```\n\n### Settings\n\n```ts\ncreateMailpitDeps(root, {\n  settings: {\n    // Mailpit's root URL. Default: MAILPIT_URL, then http://127.0.0.1:8025.\n    // A function is called on every tool call.\n    url: 'http://127.0.0.1:54324',\n    // Appended to the \"not running\" error.\n    startHint: 'Run \"supabase start\".',\n    // Also report whether the Compose service is up. Off by default.\n    docker: { composeFile: 'docker-compose.dev.yml', service: 'mailpit' },\n  },\n  requestTimeoutMs: 5000, // default\n});\n```\n\n`createMailpitService` accepts any object with a `request(url, init)` function, so you can replace `fetch` in tests or other runtimes.\n\n## Add the tools to an MCP server\n\nRequires `@modelcontextprotocol/sdk`.\n\n```ts\nimport { McpServer } from '@modelcontextprotocol/sdk/server/mcp.js';\nimport { createMailpitService } from '@makerkit/mailpit';\nimport { registerMailpitTools } from '@makerkit/mailpit/mcp';\nimport { createMailpitDeps } from '@makerkit/mailpit/node';\n\nconst server = new McpServer({ name: 'mailpit', version: '1.0.0' });\n\nregisterMailpitTools(server, createMailpitService(createMailpitDeps(process.cwd())));\n```\n\nOptions (third argument): `prefix` is prepended to every tool name, and `statusTool: false` leaves out `mailbox_status` when your server already has a tool with that name.\n\n## License\n\nMIT\n","readmeFilename":"README.md"}