{"_id":"@bestimmaa/posprint-mcp","_rev":"5-0f5e639307d52439bcca07413a67713f","name":"@bestimmaa/posprint-mcp","dist-tags":{"latest":"0.3.0"},"versions":{"0.1.0":{"name":"@bestimmaa/posprint-mcp","version":"0.1.0","license":"MIT","_id":"@bestimmaa/posprint-mcp@0.1.0","maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"homepage":"https://github.com/bestimmaa/posprint-mcp#readme","bugs":{"url":"https://github.com/bestimmaa/posprint-mcp/issues"},"bin":{"posprint-mcp":"dist/src/cli.js"},"dist":{"shasum":"f5ae26f94b5d3eaa3143d0b6fde33f6b69267927","tarball":"https://registry.npmjs.org/@bestimmaa/posprint-mcp/-/posprint-mcp-0.1.0.tgz","fileCount":11,"integrity":"sha512-diuF/MUTMyo5Hw1i7FBejh0s28ZHGY+/fo1FkRSU4f+3KNX1lypN6wmsqdWgjyJ0XqRpDMCeR6tIK/pf7JM3wA==","signatures":[{"sig":"MEQCIF7YKay8bRatov28b2AioPg1VnFmBHXVVCzTtLoK9LCZAiBiceGVX8gya28UWN2EOoDMCNmoyMew1dQhy+p/8f1m2w==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13780},"main":"dist/src/server.js","type":"module","engines":{"node":">=20"},"gitHead":"bcfc4f074762af78688a4db7b89d20f68a1b1a23","scripts":{"dev":"tsx src/cli.ts","test":"vitest run --passWithNoTests","build":"rm -rf dist && tsc -p tsconfig.build.json","start":"node dist/src/cli.js","prepack":"npm run build","release":"node scripts/release.js","test:watch":"vitest"},"_npmUser":{"name":"bestimmaa","email":"christoph.halang@gmail.com"},"repository":{"url":"git+https://github.com/bestimmaa/posprint-mcp.git","type":"git"},"_npmVersion":"11.11.0","description":"MCP server for printing markdown receipts on POS printers.","directories":{},"_nodeVersion":"24.14.1","dependencies":{"zod":"^3.23.8","@bestimmaa/posprint":"^0.2.0","@modelcontextprotocol/sdk":"^1.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","vitest":"^2.1.8","typescript":"^5.8.3","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/posprint-mcp_0.1.0_1781447351258_0.9784599658086297","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@bestimmaa/posprint-mcp","version":"0.1.1","license":"MIT","_id":"@bestimmaa/posprint-mcp@0.1.1","maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"homepage":"https://github.com/bestimmaa/posprint-mcp#readme","bugs":{"url":"https://github.com/bestimmaa/posprint-mcp/issues"},"bin":{"posprint-mcp":"dist/src/cli.js"},"dist":{"shasum":"956efe13e6c01214f828d2b800ade92743a3baa6","tarball":"https://registry.npmjs.org/@bestimmaa/posprint-mcp/-/posprint-mcp-0.1.1.tgz","fileCount":11,"integrity":"sha512-9HiPhamfzOoN/UPTmeW1D/ZybylaMgjOjCOvH+8ry2tzQzIgdzRnz9i+dGBC3Z5DTAeAAO/62+LEXJsQDbrlWg==","signatures":[{"sig":"MEUCIQClDamA31fRJKixB8KkPhQyaj3rI3SBc1TRL/safr6BDgIgPjatjMEPiBEHQwRLKVxUDdKjodoa/XgNrq+jlHykxHA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14153},"main":"dist/src/server.js","type":"module","engines":{"node":">=20"},"gitHead":"ba1e5788ad08af4fda86e5b08c099435759edccd","scripts":{"dev":"tsx src/cli.ts","test":"vitest run --passWithNoTests","build":"rm -rf dist && tsc -p tsconfig.build.json","start":"node dist/src/cli.js","prepack":"npm run build","release":"node scripts/release.js","test:watch":"vitest"},"_npmUser":{"name":"bestimmaa","email":"christoph.halang@gmail.com"},"repository":{"url":"git+https://github.com/bestimmaa/posprint-mcp.git","type":"git"},"_npmVersion":"11.11.0","description":"MCP server for printing markdown receipts on POS printers.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^3.23.8","@bestimmaa/posprint":"^0.2.0","@modelcontextprotocol/sdk":"^1.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","vitest":"^2.1.8","typescript":"^5.8.3","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/posprint-mcp_0.1.1_1781450893979_0.35005275690181437","host":"s3://npm-registry-packages-npm-production"}},"0.2.0":{"name":"@bestimmaa/posprint-mcp","version":"0.2.0","license":"MIT","_id":"@bestimmaa/posprint-mcp@0.2.0","maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"homepage":"https://github.com/bestimmaa/posprint-mcp#readme","bugs":{"url":"https://github.com/bestimmaa/posprint-mcp/issues"},"bin":{"posprint-mcp":"dist/src/cli.js"},"dist":{"shasum":"853aa497db5257e48a8eb0a3b7bdf488d90b856c","tarball":"https://registry.npmjs.org/@bestimmaa/posprint-mcp/-/posprint-mcp-0.2.0.tgz","fileCount":11,"integrity":"sha512-wbzMtgmkgw3r3tP5i/l5sxL3Wcqykb45JHfuu5PxPNIgG7qyqzk8jGXHHCEgZmtCbADLYAq96FpjGTcl8uZMNg==","signatures":[{"sig":"MEUCIQCZnaU7wEdI/1C8VePxNzGfO2ubV+y4fSQjhk/L+y/ifQIgeRa3KY1wxooQUy5zquVCgdiIyO0j3Gu7DsmTqoJljYo=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13635},"main":"dist/src/server.js","type":"module","engines":{"node":">=20"},"gitHead":"7223b6d0a02db6ca3a51ec14dce53946bb890fda","scripts":{"dev":"tsx src/cli.ts","test":"vitest run --passWithNoTests","build":"rm -rf dist && tsc -p tsconfig.build.json","start":"node dist/src/cli.js","prepare":"npm run build","release":"node scripts/release.js","test:watch":"vitest"},"_npmUser":{"name":"bestimmaa","email":"christoph.halang@gmail.com"},"repository":{"url":"git+https://github.com/bestimmaa/posprint-mcp.git","type":"git"},"_npmVersion":"11.11.0","description":"MCP server for printing markdown receipts on POS printers.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^3.23.8","@bestimmaa/posprint":"^0.2.0","@modelcontextprotocol/sdk":"^1.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","vitest":"^2.1.8","typescript":"^5.8.3","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/posprint-mcp_0.2.0_1781452010404_0.7500952952448274","host":"s3://npm-registry-packages-npm-production"}},"0.2.1":{"name":"@bestimmaa/posprint-mcp","version":"0.2.1","license":"MIT","_id":"@bestimmaa/posprint-mcp@0.2.1","maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"homepage":"https://github.com/bestimmaa/posprint-mcp#readme","bugs":{"url":"https://github.com/bestimmaa/posprint-mcp/issues"},"bin":{"posprint-mcp":"dist/src/cli.js"},"dist":{"shasum":"8e1a827138d9af614681e4065de653b11c41b3f1","tarball":"https://registry.npmjs.org/@bestimmaa/posprint-mcp/-/posprint-mcp-0.2.1.tgz","fileCount":11,"integrity":"sha512-bDynk37KM1HqqwibEQWC8hRdX/F96wtsTfoY8V3eNvygMUfZA8n4DUPUONqTRr0e5RyzARWMsPk8rl5+dcTFUg==","signatures":[{"sig":"MEYCIQDssJqf3ke0wzj+NL4ydc+m3Le/x4wrmKVhWyGMIH7wWwIhAJi0ZWlV9ZXaWxh5dLgS3WX/QWEfWopQS0HTT5Myv4Mb","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13746},"main":"dist/src/server.js","type":"module","engines":{"node":">=20"},"gitHead":"743e781b7d263b8439aa6da56b35e1fcb6ee0d0b","scripts":{"dev":"tsx src/cli.ts","test":"vitest run --passWithNoTests","build":"rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/src/cli.js","start":"node dist/src/cli.js","prepare":"npm run build","release":"node scripts/release.js","test:watch":"vitest"},"_npmUser":{"name":"bestimmaa","email":"christoph.halang@gmail.com"},"repository":{"url":"git+https://github.com/bestimmaa/posprint-mcp.git","type":"git"},"_npmVersion":"10.9.8","description":"MCP server for printing markdown receipts on POS printers.","directories":{},"_nodeVersion":"22.22.3","dependencies":{"zod":"^3.23.8","@bestimmaa/posprint":"^0.2.0","@modelcontextprotocol/sdk":"^1.13.0"},"publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.3","vitest":"^2.1.8","typescript":"^5.8.3","@types/node":"^22.15.3"},"_npmOperationalInternal":{"tmp":"tmp/posprint-mcp_0.2.1_1781461720033_0.6823231183384493","host":"s3://npm-registry-packages-npm-production"}},"0.3.0":{"name":"@bestimmaa/posprint-mcp","version":"0.3.0","description":"MCP server for printing markdown receipts on POS printers.","license":"MIT","type":"module","engines":{"node":">=20"},"main":"dist/src/server.js","bin":{"posprint-mcp":"dist/src/cli.js"},"repository":{"type":"git","url":"git+https://github.com/bestimmaa/posprint-mcp.git"},"bugs":{"url":"https://github.com/bestimmaa/posprint-mcp/issues"},"homepage":"https://github.com/bestimmaa/posprint-mcp#readme","publishConfig":{"access":"public"},"scripts":{"build":"rm -rf dist && tsc -p tsconfig.build.json && chmod +x dist/src/cli.js","prepare":"npm run build","start":"node dist/src/cli.js","dev":"tsx src/cli.ts","test":"vitest run --passWithNoTests","test:watch":"vitest","release":"node scripts/release.js","release:docker":"node scripts/docker-release.js"},"dependencies":{"@bestimmaa/posprint":"^0.2.0","@modelcontextprotocol/sdk":"^1.13.0","zod":"^3.23.8"},"devDependencies":{"@types/node":"^22.15.3","tsx":"^4.19.3","typescript":"^5.8.3","vitest":"^2.1.8"},"_id":"@bestimmaa/posprint-mcp@0.3.0","gitHead":"ee082ce1d33ca416c54ea8d4d0ad9a3f3d4519b4","_nodeVersion":"22.22.3","_npmVersion":"10.9.8","dist":{"integrity":"sha512-ITvzeavkzNYrW44YezrCNIP3jobEDyyXv0rr5B8EBD6JrzlDAC8W+VdujgcM01jEjC5wdlw/zb7ue6A+YbrTtQ==","shasum":"ed2349a80557326ed0bc6e548df04a4c72e29b20","tarball":"https://registry.npmjs.org/@bestimmaa/posprint-mcp/-/posprint-mcp-0.3.0.tgz","fileCount":14,"unpackedSize":22174,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQCkLZ4h8SGj5U7heeIhh1/AHPAwH3G9RFY2al3mBD12MgIhAN8dMRJ1rIGwN8q4/N+Y6dXePV33fcIPFkSWlaE3vXa1"}]},"_npmUser":{"name":"bestimmaa","email":"christoph.halang@gmail.com"},"directories":{},"maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/posprint-mcp_0.3.0_1783859413622_0.46168985218172365"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-14T14:29:11.139Z","modified":"2026-07-12T12:30:13.899Z","0.1.0":"2026-06-14T14:29:11.387Z","0.1.1":"2026-06-14T15:28:14.168Z","0.2.0":"2026-06-14T15:46:50.541Z","0.2.1":"2026-06-14T18:28:40.155Z","0.3.0":"2026-07-12T12:30:13.775Z"},"bugs":{"url":"https://github.com/bestimmaa/posprint-mcp/issues"},"license":"MIT","homepage":"https://github.com/bestimmaa/posprint-mcp#readme","repository":{"type":"git","url":"git+https://github.com/bestimmaa/posprint-mcp.git"},"description":"MCP server for printing markdown receipts on POS printers.","maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"readme":"# @bestimmaa/posprint-mcp\n\nMCP server for POS printer receipts using [`@bestimmaa/posprint`](https://www.npmjs.com/package/@bestimmaa/posprint).\n\nThe tool is intentionally named `print` so clients can map natural user phrasing such as \"print receipt\", \"hard copy\", or \"print this out\" to the same operation.\n\n## Requirements\n\n- Node.js 20+\n- A printer reachable via a CUPS URI supported by `@bestimmaa/posprint`\n\n## MCP Client Configuration\n\nAdd this to your MCP client config. No separate installation step is required — `npx` fetches the package on first run.\n\n```json\n{\n  \"mcpServers\": {\n    \"posprint\": {\n      \"command\": \"npx\",\n      \"args\": [\"-y\", \"@bestimmaa/posprint-mcp\"]\n    }\n  }\n}\n```\n\n## Global Install (optional)\n\n```bash\nnpm install -g @bestimmaa/posprint-mcp\n```\n\nAfter global installation, you can use the shorter form in your MCP client config:\n\n```json\n{\n  \"mcpServers\": {\n    \"posprint\": {\n      \"command\": \"posprint-mcp\"\n    }\n  }\n}\n```\n\n## Docker (remote MCP server)\n\nFor clients that can only talk to a *remote* MCP server (e.g. Notion custom agents), run `posprint-mcp` in a Docker container over HTTP instead of stdio. The image defaults to `MCP_TRANSPORT=http`.\n\n### Configuration via `.env`\n\nCopy [`.env.example`](.env.example) to `.env` and fill in your values — `.env` is gitignored, so real tokens/URIs never get committed.\n\n```bash\ncp .env.example .env\n# edit .env: set POSPRINT_AUTH_TOKEN (e.g. `openssl rand -hex 32`) and PRINTER_URI\ndocker compose up -d --build\n```\n\n`docker-compose.yml` reads `.env` automatically (both for the container's env vars and the host port mapping). To run without Compose, pass the same file to `docker run` directly:\n\n```bash\ndocker build -t posprint-mcp .\ndocker run -d --name posprint-mcp -p 3000:3000 --env-file .env posprint-mcp\n```\n\nThe server listens on `POST /mcp` (MCP Streamable HTTP transport, stateless) and `GET /healthz` (unauthenticated health check). It refuses to start if `POSPRINT_AUTH_TOKEN` is unset, since an unauthenticated remote endpoint would let anyone on the network print to your printer.\n\nPoint your remote MCP client at `http://<host>:3000/mcp` with header-based auth:\n\n```\nAuthorization: Bearer <POSPRINT_AUTH_TOKEN>\n```\n\nNote: the container needs network access to your printer's CUPS/IPP endpoint (typically on your LAN), so run it on a network that can reach it (e.g. `--network host`, or a bridge network with routing to the printer's subnet).\n\n**`.local` (mDNS) hostnames will not resolve inside the container** — most base images (including this one) have no mDNS support, so a `PRINTER_URI` like `ipp://myprinter.local:631/...` will fail to connect. Use one of:\n\n- The printer's static/reserved IP address, or\n- A regular DNS name if your router provides one (e.g. many Fritz!Box routers also expose LAN devices as `<name>.fritz.box`, which resolves via normal DNS and works fine in containers).\n\n### Environment variables\n\n| Variable | Applies to | Description |\n| --- | --- | --- |\n| `MCP_TRANSPORT` | both | `stdio` (default) or `http`. The Docker image sets this to `http`. |\n| `PORT` | `http` transport | Port to listen on. Defaults to `3000`. |\n| `POSPRINT_AUTH_TOKEN` | `http` transport | Bearer token required on every `/mcp` request. **Required** when `MCP_TRANSPORT=http` — the server refuses to start without it. |\n| `PRINTER_URI` | both | Default CUPS printer URI. When set, the `print` tool's `printerUri` argument becomes optional; an explicit `printerUri` in a tool call still takes precedence. |\n\n## Development\n\n```bash\nnpm install\nnpm run build\nnpm test\n```\n\nRun the local server from source:\n\n```bash\nnpm run dev\n```\n\nRun the built server:\n\n```bash\nnpm start\n```\n\n## Tool: `print`\n\nInput:\n\n- `printerUri?: string` (optional if the server has a default configured via the `PRINTER_URI` environment variable)\n- `markdown: string`\n- `mode: \"preview\" | \"confirm\"`\n- `confirmationToken?: string` (required when `mode=\"confirm\"`)\n- `options?: { copies?: number; timeoutMs?: number }`\n\n### Two-step confirmation flow\n\n1. Call `print` with `mode: \"preview\"`.\n2. Show the returned snippet to the user and ask for confirmation.\n3. Call `print` again with `mode: \"confirm\"` and the returned `confirmationToken`.\n\nPreview response includes:\n\n- `requiresConfirmation: true`\n- `confirmationToken`\n- `preview.lineCount`\n- `preview.snippet`\n- `preview.excessiveLengthWarning` (present when markdown is more than 80 lines)\n\nConfirm response shape:\n\n```json\n{ \"ok\": true, \"meta\": { \"printerUri\": \"...\", \"durationMs\": 20, \"printedAt\": \"...\", \"jobId\": \"optional\" } }\n```\n\nError codes:\n\n- `VALIDATION_ERROR`\n- `PRINTER_ERROR`\n- `TIMEOUT`\n","readmeFilename":"README.md"}