{"_id":"@anscribe/mcp","_rev":"3-d708699905bcc642a93e3ac98069decb","name":"@anscribe/mcp","dist-tags":{"latest":"1.0.1"},"versions":{"0.1.0":{"name":"@anscribe/mcp","version":"0.1.0","keywords":["agent","anscribe","capture","mcp","opentui","tui"],"author":{"name":"msmps"},"license":"MIT","_id":"@anscribe/mcp@0.1.0","maintainers":[{"name":"msmps","email":"hello@msmp.me"}],"homepage":"https://github.com/msmps/anscribe","bugs":{"url":"https://github.com/msmps/anscribe/issues"},"bin":{"anscribe-mcp":"dist/anscribe-mcp.mjs"},"dist":{"shasum":"b2510513d83b51306569c55fbb66d967ebb6af3e","tarball":"https://registry.npmjs.org/@anscribe/mcp/-/mcp-0.1.0.tgz","fileCount":10,"integrity":"sha512-gBl3WPlHcLFUeUgSgyprqVv/qXi2D0g4YgWQGGkas9Q03kGVXwrvT2sjRS9F6po91VmvtjN8NZ+AU+4YUMn+sQ==","signatures":[{"sig":"MEUCIQClz776qql789CWHEvG8xDmn839+6/2aeRS4rYJO5RdTgIgCNVHDIIx9fofZDCRuwV04PGDHSGtHEzZC8FsCAmKh4A=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anscribe%2fmcp@0.1.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29886},"type":"module","_from":"file:anscribe-mcp-0.1.0.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./sink":{"types":"./dist/sink.d.mts","import":"./dist/sink.mjs"}},"scripts":{"test":"vitest run","build":"tsdown"},"_npmUser":{"name":"msmps","email":"hello@msmp.me"},"_resolved":"/tmp/a6f8820d045ae731814bbf353c5d13cb/anscribe-mcp-0.1.0.tgz","_integrity":"sha512-gBl3WPlHcLFUeUgSgyprqVv/qXi2D0g4YgWQGGkas9Q03kGVXwrvT2sjRS9F6po91VmvtjN8NZ+AU+4YUMn+sQ==","repository":{"url":"git+https://github.com/msmps/anscribe.git","type":"git","directory":"packages/mcp"},"_npmVersion":"11.14.1","description":"Anscribe MCP server: SQLite-backed Capture Store + stdio MCP server that exposes pending Captures to AI coding agents.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^3.25 || ^4.0","effect":"^4.0.0-beta.65","@anscribe/core":"0.1.0","@effect/sql-libsql":"^4.0.0-beta.65","@effect/platform-node":"^4.0.0-beta.65","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org","provenance":true},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/mcp_0.1.0_1778789362962_0.5697234454349935","host":"s3://npm-registry-packages-npm-production"}},"1.0.0":{"name":"@anscribe/mcp","version":"1.0.0","keywords":["agent","anscribe","capture","mcp","opentui","tui"],"author":{"name":"msmps"},"license":"MIT","_id":"@anscribe/mcp@1.0.0","maintainers":[{"name":"msmps","email":"hello@msmp.me"}],"homepage":"https://github.com/msmps/anscribe","bugs":{"url":"https://github.com/msmps/anscribe/issues"},"bin":{"anscribe-mcp":"dist/anscribe-mcp.mjs"},"dist":{"shasum":"a979edf5e5407c38709d2c48fbc47d40c3dda7f6","tarball":"https://registry.npmjs.org/@anscribe/mcp/-/mcp-1.0.0.tgz","fileCount":10,"integrity":"sha512-s3yc4pLVcZs+rJFcwv6Sh8NGVsxdj89nE03VzmE6Kl2r0J+oHNuWvMrCwQlbFXza4GTTWVppfD+Xj8JROMm9kA==","signatures":[{"sig":"MEYCIQChsHzr2bJyPFwDxb0e2kvdBd7pOmFjhmoLLWtYIz0xOwIhAJDH0y4hLQW+3ltF/FYD60uWL+BTwyLbN/fh9jCj4JVK","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anscribe%2fmcp@1.0.0","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"unpackedSize":29743},"type":"module","_from":"file:anscribe-mcp-1.0.0.tgz","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./sink":{"types":"./dist/sink.d.mts","import":"./dist/sink.mjs"}},"scripts":{"test":"vitest run","build":"tsdown"},"_npmUser":{"name":"msmps","email":"hello@msmp.me"},"_resolved":"/tmp/b309944c83f8f42a4833bd94bcc83c79/anscribe-mcp-1.0.0.tgz","_integrity":"sha512-s3yc4pLVcZs+rJFcwv6Sh8NGVsxdj89nE03VzmE6Kl2r0J+oHNuWvMrCwQlbFXza4GTTWVppfD+Xj8JROMm9kA==","repository":{"url":"git+https://github.com/msmps/anscribe.git","type":"git","directory":"packages/mcp"},"_npmVersion":"11.14.1","description":"Anscribe MCP server: SQLite-backed Capture Store + stdio MCP server that exposes pending Captures to AI coding agents.","directories":{},"_nodeVersion":"24.15.0","dependencies":{"zod":"^3.25 || ^4.0","effect":"^4.0.0-beta.65","@effect/sql-libsql":"^4.0.0-beta.65","@effect/platform-node":"^4.0.0-beta.65","@modelcontextprotocol/sdk":"^1.29.0"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org","provenance":true},"_hasShrinkwrap":false,"peerDependencies":{"@anscribe/core":"1.0.0"},"_npmOperationalInternal":{"tmp":"tmp/mcp_1.0.0_1778792894804_0.4997879075271121","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@anscribe/mcp","version":"1.0.1","description":"Anscribe MCP server: SQLite-backed Capture Store + stdio MCP server that exposes pending Captures to AI coding agents.","keywords":["agent","anscribe","capture","mcp","opentui","tui"],"homepage":"https://github.com/msmps/anscribe","bugs":{"url":"https://github.com/msmps/anscribe/issues"},"license":"MIT","author":{"name":"msmps"},"repository":{"type":"git","url":"git+https://github.com/msmps/anscribe.git","directory":"packages/mcp"},"bin":{"anscribe-mcp":"dist/anscribe-mcp.mjs"},"type":"module","exports":{".":{"types":"./dist/index.d.mts","import":"./dist/index.mjs"},"./sink":{"types":"./dist/sink.d.mts","import":"./dist/sink.mjs"}},"publishConfig":{"access":"public","provenance":true,"registry":"https://registry.npmjs.org"},"dependencies":{"@effect/platform-node":"^4.0.0-beta.65","@effect/sql-libsql":"^4.0.0-beta.65","@modelcontextprotocol/sdk":"^1.29.0","effect":"^4.0.0-beta.65","zod":"^3.25 || ^4.0"},"peerDependencies":{"@anscribe/core":"1.0.1"},"scripts":{"build":"tsdown","test":"vitest run"},"_id":"@anscribe/mcp@1.0.1","_integrity":"sha512-6bHyNlnEwHhSMSLRtYe9GFbWJ1IfW1vN3RaA3mL1tpys/oGehzpzVUMABRg9YFBqMMUYmdovpntvITdq9edSpA==","_resolved":"/tmp/8001a972eb5f258c80492ff3dc7fe1ef/anscribe-mcp-1.0.1.tgz","_from":"file:anscribe-mcp-1.0.1.tgz","_nodeVersion":"24.14.1","_npmVersion":"11.14.1","dist":{"integrity":"sha512-6bHyNlnEwHhSMSLRtYe9GFbWJ1IfW1vN3RaA3mL1tpys/oGehzpzVUMABRg9YFBqMMUYmdovpntvITdq9edSpA==","shasum":"e9a16c1b38b081f80d13dc7cd5d6c93adbed61cc","tarball":"https://registry.npmjs.org/@anscribe/mcp/-/mcp-1.0.1.tgz","fileCount":10,"unpackedSize":30076,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@anscribe%2fmcp@1.0.1","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBGk81gbo7ayz1pI3wRE8a3Yfr+72UAbZPybTJuEmpDBAiB566yl5T6aZOvvClYouEN1c2zamCfM8eLTAY4CgPFDwg=="}]},"_npmUser":{"name":"msmps","email":"hello@msmp.me"},"directories":{},"maintainers":[{"name":"msmps","email":"hello@msmp.me"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/mcp_1.0.1_1778794821961_0.7947746747542437"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-14T20:09:22.835Z","modified":"2026-05-14T21:40:22.371Z","0.1.0":"2026-05-14T20:09:23.115Z","1.0.0":"2026-05-14T21:08:14.959Z","1.0.1":"2026-05-14T21:40:22.107Z"},"bugs":{"url":"https://github.com/msmps/anscribe/issues"},"author":{"name":"msmps"},"license":"MIT","homepage":"https://github.com/msmps/anscribe","keywords":["agent","anscribe","capture","mcp","opentui","tui"],"repository":{"type":"git","url":"git+https://github.com/msmps/anscribe.git","directory":"packages/mcp"},"description":"Anscribe MCP server: SQLite-backed Capture Store + stdio MCP server that exposes pending Captures to AI coding agents.","maintainers":[{"name":"msmps","email":"hello@msmp.me"}],"readme":"# @anscribe/mcp\n\n> SQLite-backed Capture Store + `anscribe-mcp` stdio server. Lets AI coding agents pull pending Anscribe Captures and resolve them.\n\nUsed with [`@anscribe/opentui`](https://www.npmjs.com/package/@anscribe/opentui) when you want agents to pull pending Captures from a project-local queue. Clipboard handoff still happens — the MCP sink is additive.\n\n## Install\n\n```bash\nbun add @anscribe/mcp\n```\n\nThen add a single side-effect import at the top of your entry file:\n\n```ts\nimport \"@anscribe/mcp/sink\";\n\nimport { installCapture } from \"@anscribe/opentui\";\nimport { createCliRenderer } from \"@opentui/core\";\n\nconst renderer = await createCliRenderer({ useMouse: true });\ninstallCapture(renderer, { keybinding: \"ctrl+g\" });\n```\n\n```tsx\nimport \"@anscribe/opentui/react/preload\";\nimport \"@anscribe/mcp/sink\";\n\nimport { Anscribe } from \"@anscribe/opentui/react\";\n\n<Anscribe keybinding=\"ctrl+g\" />\n```\n\nThe side-effect import registers the SQLite Capture Store sink in `@anscribe/core`'s shared sink registry before `installCapture` snapshots it. On first capture commit, Anscribe opens a project-local Capture Store at `<project>/.anscribe/captures.sqlite` and writes a `<project>/.anscribe/.gitignore` so the directory is auto-protected. An existing `.gitignore` is preserved untouched.\n\n### Custom project root\n\nFor tests, multi-tenant runners, or any setup where `process.cwd()` isn't the right anchor, register the sink programmatically with an explicit `projectRoot`:\n\n```ts\nimport { registerCaptureSink } from \"@anscribe/core\";\nimport { mcpSink } from \"@anscribe/mcp\";\n\nregisterCaptureSink(mcpSink({ projectRoot: \"/path/to/project\" }));\n```\n\nThis mirrors the `anscribe-mcp` bin's `--project` flag — both walk up from the supplied path to find a `.git` or workspace marker, then open the store under `.anscribe/captures.sqlite`.\n\n## Register the server with your agent\n\nThe `anscribe-mcp` binary speaks MCP over stdio.\n\nThe easiest cross-agent path is [`add-mcp`](https://github.com/neondatabase/add-mcp), which auto-detects installed agents (Claude Code, Cursor, Codex, Windsurf, opencode, and others) and patches their config files:\n\n```bash\nnpx add-mcp @anscribe/mcp\n```\n\nOr configure manually. The exact shape depends on your agent — examples:\n\n**Claude Code** (`~/.claude.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"anscribe\": {\n      \"command\": \"anscribe-mcp\"\n    }\n  }\n}\n```\n\n**Cursor** (`~/.cursor/mcp.json`):\n\n```json\n{\n  \"mcpServers\": {\n    \"anscribe\": {\n      \"command\": \"anscribe-mcp\"\n    }\n  }\n}\n```\n\n## Project resolution\n\n`anscribe-mcp` reads pending Captures from a project-local `.anscribe/captures.sqlite`. The project root is resolved in this order:\n\n1. `--project <path>` CLI flag (highest precedence)\n2. `ANSCRIBE_PROJECT_ROOT` environment variable\n3. `process.cwd()` (default)\n\nOn startup the server logs the resolved paths to stderr so you can confirm which store is in use:\n\n```\nanscribe-mcp: project root = /Users/you/projects/my-tui\nanscribe-mcp: store        = /Users/you/projects/my-tui/.anscribe/captures.sqlite\n```\n\nIf the resolved path doesn't exist, the server fails fast with a typed error before MCP initialization.\n\nMost agents launch MCP servers from the project directory, so the default works without flags. Override when you need to point at a different workspace (e.g. a long-running global server, a CI runner, or a sandboxed environment).\n\n## MCP tools\n\n| Tool | Description |\n|---|---|\n| `list_pending_captures` | Return pending Captures with developer instructions and selected targets. Each target carries type, terminal-cell bounds, ancestry, visible content, optional runtime metadata (`componentName`, `componentPath`, `identifier`), and optional source references. |\n| `resolve_capture` | Mark a Capture resolved. Takes `{ captureId: string }`. |\n\nThe store is append-only-by-status: resolving a Capture flips its status but preserves the row. Use the store directly via the `CaptureStore` service if you need to query resolved Captures from your own tooling.\n\n## Programmatic use\n\n```ts\nimport {\n  CaptureStore,\n  makeCaptureStorePersistence,\n  mcpSink,\n  runAnscribeMcpServer,\n} from \"@anscribe/mcp\";\n```\n\n- `mcpSink({ projectRoot? })` — the sink factory used by `@anscribe/mcp/sink` under the hood. Pair with `registerCaptureSink` from `@anscribe/core` for dynamic registration.\n- `CaptureStore.live` — `Context.Service` layer pointing at `process.cwd()/.anscribe/captures.sqlite`.\n- `CaptureStore.layer({ projectRoot })` — factory variant; resolves the store path against an explicit project root.\n- `makeCaptureStorePersistence({ projectRoot? })` — lower-level vanilla `{ write, close }` writer used internally by `mcpSink`. Useful if you're wiring your own sink wrapper.\n- `runAnscribeMcpServer({ name?, version?, transport? })` — Effect-returning MCP server bootstrap. Defaults to `StdioServerTransport`.\n\n## License\n\nMIT © [msmps](https://github.com/msmps)\n","readmeFilename":"README.md"}