{"_id":"@agentopolis/sapientdb-mcp","_rev":"9-3ada2386cf8d186ef30f9015e19e2a55","name":"@agentopolis/sapientdb-mcp","dist-tags":{"latest":"0.1.8"},"versions":{"0.1.0":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.0","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","_id":"@agentopolis/sapientdb-mcp@0.1.0","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"homepage":"https://github.com/sapientdb/sapientdb/tree/main/sapientdb-mcp#readme","bugs":{"url":"https://github.com/sapientdb/sapientdb/issues"},"bin":{"sapientdb-mcp":"dist/index.js"},"dist":{"shasum":"f3c0b533eeb214b8f0b72ea8a5250503cf5c9667","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.0.tgz","fileCount":47,"integrity":"sha512-0gwWoqcUyXPxbMrSNpMV9dXOFEYJ3z/cCoTgjavI9ZJB3cDV1Eh5yr0LqpupJo6f9H/voc/Cl5JyUREecmQFOw==","signatures":[{"sig":"MEUCICShfp3CNV6w8VHg0pTXTyq9x8kJUTJDjoKlFF3w0dzzAiEA8GcjmNQm1Y5YVgKuM0Zr1cywXYJPuOcG7pggsp5/r5c=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":237649},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"e4579adb83fc6fbb122f3a38b654b4d65aae9aac","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"repository":{"url":"git+https://github.com/sapientdb/sapientdb.git","type":"git","directory":"sapientdb-mcp"},"_npmVersion":"11.6.1","description":"SapientDB MCP server: block-native Markdown storage with block-level security trimming, search, and cursor-based paging.","directories":{},"_nodeVersion":"22.19.0","dependencies":{"pg":"^8.13.1","zod":"^3.24.1","jose":"^5.9.6","argon2":"^0.41.1","dotenv":"^16.4.5","@anthropic-ai/sdk":"^0.71.2","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","@types/pg":"^8.11.10","typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/sapientdb-mcp_0.1.0_1768489227348_0.9687304556246834","host":"s3://npm-registry-packages-npm-production"}},"0.1.1":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.1","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","_id":"@agentopolis/sapientdb-mcp@0.1.1","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"homepage":"https://github.com/sapientdb/sapientdb/tree/main/sapientdb-mcp#readme","bugs":{"url":"https://github.com/sapientdb/sapientdb/issues"},"bin":{"sapientdb-mcp":"dist/index.js"},"dist":{"shasum":"959495ce9356e3eb2a47ac08603b1e5807119e29","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.1.tgz","fileCount":47,"integrity":"sha512-Mb8+cYRJg8bCHTVA0OsKQeKXZHrXov35Gh+1AM0dEzi7iVDOwcQWJf5qoiNMvjtB9Alag0ovXUVn5hPNHcs48g==","signatures":[{"sig":"MEUCIQCxlzzFJgt5dt+Jde1eS58lEOMxUqRbFvaMcwbchIF8ZAIgftPukyrI62V/t8CzS7o96mUffdZPFIhYby28L4bOVZI=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":237912},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"e4579adb83fc6fbb122f3a38b654b4d65aae9aac","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"repository":{"url":"git+https://github.com/sapientdb/sapientdb.git","type":"git","directory":"sapientdb-mcp"},"_npmVersion":"11.6.1","description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","directories":{},"_nodeVersion":"22.19.0","dependencies":{"pg":"^8.13.1","zod":"^3.24.1","jose":"^5.9.6","argon2":"^0.41.1","dotenv":"^16.4.5","@anthropic-ai/sdk":"^0.71.2","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","@types/pg":"^8.11.10","typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/sapientdb-mcp_0.1.1_1768489435741_0.7628298866337488","host":"s3://npm-registry-packages-npm-production"}},"0.1.2":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.2","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","_id":"@agentopolis/sapientdb-mcp@0.1.2","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"homepage":"https://github.com/sapientdb/sapientdb/tree/main/sapientdb-mcp#readme","bugs":{"url":"https://github.com/sapientdb/sapientdb/issues"},"bin":{"sapientdb-mcp":"dist/index.js"},"dist":{"shasum":"a2b4280f34b5666c5b0ff932f25e475366850629","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.2.tgz","fileCount":51,"integrity":"sha512-4OHFdTyK1HhKH6xKzZlY7DM4AiQ45b/fsIr9veGW6/p2WyMK+iTluR2BPtspzPL1zNBqZl13ZuZD1v11UJt8vA==","signatures":[{"sig":"MEUCIQClsHrGwF3eSI3I6HNeeOKX6V17OHxuqsH5o2uo/B9vlwIgJ5O3CQFwjpTbnR00ZLJ/+dlZyujw8Yvq5JOCHnuVwLQ=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":247878},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"68034b1f403d7dc3cefcb41ea154d70c1390454e","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"repository":{"url":"git+https://github.com/sapientdb/sapientdb.git","type":"git","directory":"sapientdb-mcp"},"_npmVersion":"11.6.1","description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","directories":{},"_nodeVersion":"22.19.0","dependencies":{"pg":"^8.13.1","zod":"^3.24.1","jose":"^5.9.6","argon2":"^0.41.1","dotenv":"^16.4.5","@anthropic-ai/sdk":"^0.71.2","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","@types/pg":"^8.11.10","typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/sapientdb-mcp_0.1.2_1768491065150_0.4437514515500738","host":"s3://npm-registry-packages-npm-production"}},"0.1.3":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.3","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","_id":"@agentopolis/sapientdb-mcp@0.1.3","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"homepage":"https://github.com/sapientdb/sapientdb/tree/main/sapientdb-mcp#readme","bugs":{"url":"https://github.com/sapientdb/sapientdb/issues"},"bin":{"sapientdb-mcp":"dist/index.js"},"dist":{"shasum":"fec91ea3b216c4e3c6bd5739aef9a8353c8dfb7c","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.3.tgz","fileCount":51,"integrity":"sha512-0FbyWHfwZ9fv2Ocj7Wb5vCj+rUSFe1VHBzs5Zd5AzdvKX8ngXCkdCGtwzxYdGRnxTy5NeFSG12mhuZma+P0CwQ==","signatures":[{"sig":"MEUCIH54YAR8K4vjGgAJIaHKqIQ7WOfneabA0Roju3sG/bhGAiEAu4BdBeCwKMAcnybp6fwXM4E6dSQXHXB1Y7vF7uo/+7E=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":249553},"main":"dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=18"},"gitHead":"9b320b98a21baece04124b9aa55606501016b64b","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"repository":{"url":"git+https://github.com/sapientdb/sapientdb.git","type":"git","directory":"sapientdb-mcp"},"_npmVersion":"11.6.1","description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","directories":{},"_nodeVersion":"22.19.0","dependencies":{"pg":"^8.13.1","zod":"^3.24.1","jose":"^5.9.6","argon2":"^0.41.1","dotenv":"^16.4.5","@anthropic-ai/sdk":"^0.71.2","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","@types/pg":"^8.11.10","typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/sapientdb-mcp_0.1.3_1768491342534_0.9566917388115848","host":"s3://npm-registry-packages-npm-production"}},"0.1.4":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.4","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","_id":"@agentopolis/sapientdb-mcp@0.1.4","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"homepage":"https://github.com/sapientdb/sapientdb/tree/main/sapientdb-mcp#readme","bugs":{"url":"https://github.com/sapientdb/sapientdb/issues"},"bin":{"sapientdb-mcp":"dist/index.js"},"dist":{"shasum":"9269e2692b8aeb7d23d6e074ddb06519ba45a205","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.4.tgz","fileCount":51,"integrity":"sha512-zymAxpDj6k2o8F+HrDuL2VEoHCkgPRCpmpuGyjv2loc6f4D6D2zPtIXSFxWQxeMwqKvsL4tdUG7Iv3ohB9AdHg==","signatures":[{"sig":"MEUCIGAPM2glnJfySjZQjT8u+KMghhKYf6AlSjdg+QUVXOQ4AiEA2W/uEZ/AIJKABYhGbJC6ulucfaX5I1Do4jmQeA4XkZg=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":230879},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f0163469f6fb084ded74cc9497525cd0084ef62b","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"repository":{"url":"git+https://github.com/sapientdb/sapientdb.git","type":"git","directory":"sapientdb-mcp"},"_npmVersion":"11.6.1","description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","directories":{},"_nodeVersion":"22.19.0","dependencies":{"dotenv":"^16.4.5","@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/sapientdb-mcp_0.1.4_1768492259971_0.1189205564019673","host":"s3://npm-registry-packages-npm-production"}},"0.1.5":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.5","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","_id":"@agentopolis/sapientdb-mcp@0.1.5","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"homepage":"https://agentopolis.ai/sapientdb","bin":{"sapientdb-mcp":"dist/index.js"},"dist":{"shasum":"bf0e4c7d7d5b686891e70e8ad686f451b163aed5","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.5.tgz","fileCount":51,"integrity":"sha512-sf0YJTG6KTk3HuiOjQOJuzgJXvbyKF5t6zlkcoU1Esdxn4dxTU4tq542oEdCUBK6c4guOjENVM9vEtTwMTd7dA==","signatures":[{"sig":"MEUCIECvC9HW5PcXzveWla6g0i9uDqS8Xjebdv0e0IFWWVscAiEAqkjU8EvKGzTUtQQpklrrqLu9gENt1Hb1y0YQzWXkImw=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":230527},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f0163469f6fb084ded74cc9497525cd0084ef62b","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"_npmVersion":"11.6.1","description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/sapientdb-mcp_0.1.5_1768492382611_0.008289948384993862","host":"s3://npm-registry-packages-npm-production"}},"0.1.6":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.6","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","_id":"@agentopolis/sapientdb-mcp@0.1.6","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"homepage":"https://agentopolis.ai/sapientdb","bin":{"sapientdb-mcp":"dist/index.js"},"dist":{"shasum":"a1fc0374c661f18260b979f9577af375244add4b","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.6.tgz","fileCount":11,"integrity":"sha512-GS5tUtK+wO8u8XIAzuPdfFFbVGLjCfDdKPXNCpbQzYHhMb7hM/ocldqnKX3dF3r9auQvLpWT2YHY1ZaWUSbneg==","signatures":[{"sig":"MEQCIB+KKJ9TK+3qrGP2hX2aAeCBrHAY4NZ2RULibSM6kAaaAiAVqBgJ3VEWpiySzpmNgfs94Lka0ZmkQmxkcXvYExmmfQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":30630},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"f0163469f6fb084ded74cc9497525cd0084ef62b","scripts":{"dev":"tsx src/index.ts","build":"tsc","start":"node dist/index.js","prepublishOnly":"npm run build"},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"_npmVersion":"11.6.1","description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/sapientdb-mcp_0.1.6_1768492583011_0.2021929282955417","host":"s3://npm-registry-packages-npm-production"}},"0.1.7":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.7","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","_id":"@agentopolis/sapientdb-mcp@0.1.7","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"homepage":"https://agentopolis.ai/sapientdb","bin":{"sapientdb-mcp":"dist/index.js"},"dist":{"shasum":"05b73b8a1b92d34d830a7d2698c57c5d57ad12ec","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.7.tgz","fileCount":11,"integrity":"sha512-kwrQjNk41x6HeABpJBzXXoCU1jsPc7KII2NvzrHlnPLdAnfJRLc4LdYQwwr85aQWdhVoVlruyEhRwNKuDQ+lYA==","signatures":[{"sig":"MEQCIAYmlauun22lfnhf5764AIw+HbfGmrXNLK4vcraMAV2SAiAXCe6g4A4Sx5wk0XoNFzh/jYkY7Ki4qcS5YAKonOBm7A==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":56263},"main":"dist/index.js","type":"module","types":"dist/index.d.ts","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"gitHead":"0334b4cff23eb81f23555c24a2a8c2afe33d5752","scripts":{"dev":"tsx src/index.ts","test":"vitest run","build":"tsc","start":"node dist/index.js","test:watch":"vitest","prepublishOnly":"npm run build"},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"_npmVersion":"11.6.1","description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","directories":{},"_nodeVersion":"22.19.0","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.19.2","vitest":"^2.1.0","typescript":"^5.7.2","@types/node":"^22.10.5"},"_npmOperationalInternal":{"tmp":"tmp/sapientdb-mcp_0.1.7_1769010297961_0.8370226263231086","host":"s3://npm-registry-packages-npm-production"}},"0.1.8":{"name":"@agentopolis/sapientdb-mcp","version":"0.1.8","description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","type":"module","main":"dist/index.js","types":"dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"bin":{"sapientdb-mcp":"dist/index.js"},"scripts":{"build":"tsc","start":"node dist/index.js","dev":"tsx src/index.ts","test":"vitest run","test:watch":"vitest","prepublishOnly":"npm run build"},"keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"author":{"name":"SapientDB"},"license":"MIT","homepage":"https://sapientdb.com","dependencies":{"@modelcontextprotocol/sdk":"^1.0.0"},"devDependencies":{"@types/node":"^22.10.5","tsx":"^4.19.2","typescript":"^5.7.2","vitest":"^2.1.0"},"engines":{"node":">=18"},"_id":"@agentopolis/sapientdb-mcp@0.1.8","gitHead":"6e337a59e91fda0b9431bc8b556a1d4d4686a9c0","_nodeVersion":"24.9.0","_npmVersion":"11.6.0","dist":{"integrity":"sha512-mJJ6/DR/0zuu6/H+MgUqhKAgsPjEy32YkjZhA6LH/5Kgcmb612XG6nMQodvcWlrrkpVBmGBo/vHMvyqSDU/kog==","shasum":"93fd0c870ae578708d98bc51a9ea41d70b52e609","tarball":"https://registry.npmjs.org/@agentopolis/sapientdb-mcp/-/sapientdb-mcp-0.1.8.tgz","fileCount":11,"unpackedSize":56137,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDH26RiaNnVEpzSXyXeIpTnmpKiq1bxP0N4jSD64dOpWQIhANQ4aIsRxkgp65gsKAmjcNS0RsZiJjQ45kcxUVu2q6vI"}]},"_npmUser":{"name":"agentopolis","email":"agentopolisai@gmail.com"},"directories":{},"maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/sapientdb-mcp_0.1.8_1773286874311_0.8310953646676902"},"_hasShrinkwrap":false}},"time":{"created":"2026-01-15T15:00:27.241Z","modified":"2026-03-12T03:41:14.670Z","0.1.0":"2026-01-15T15:00:27.499Z","0.1.1":"2026-01-15T15:03:55.962Z","0.1.2":"2026-01-15T15:31:05.295Z","0.1.3":"2026-01-15T15:35:42.711Z","0.1.4":"2026-01-15T15:51:00.128Z","0.1.5":"2026-01-15T15:53:02.747Z","0.1.6":"2026-01-15T15:56:23.143Z","0.1.7":"2026-01-21T15:44:58.092Z","0.1.8":"2026-03-12T03:41:14.445Z"},"author":{"name":"SapientDB"},"license":"MIT","homepage":"https://sapientdb.com","keywords":["mcp","model-context-protocol","sapientdb","ai","llm","markdown","database","rag"],"description":"SapientDB is an agent-first, MCP-native markdown database where humans and AI agents collaborate on shared documents. Text is stored as individually addressable, permissioned logical text units, enabling secure block-level reads and writes without loading","maintainers":[{"name":"agentopolis","email":"agentopolisai@gmail.com"}],"readme":"# SapientDB MCP Server\n\n[![npm](https://img.shields.io/npm/v/@agentopolis/sapientdb-mcp)](https://www.npmjs.com/package/@agentopolis/sapientdb-mcp)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](../LICENSE)\n\nThe official MCP (Model Context Protocol) server for **SapientDB** — block-native document storage for AI agents.\n\nThis package allows AI agents like Claude to read, write, search, and manage documents stored in SapientDB.\n\n---\n\n## Quick Start\n\n### 1. Get your API token\n\nSign up at [sapientdb.com](https://sapientdb.com) and create a Personal Access Token (PAT) or Service Account key.\n\n### 2. Add to Claude Desktop\n\nEdit your Claude Desktop config file:\n\n**macOS**: `~/Library/Application Support/Claude/claude_desktop_config.json`\n**Windows**: `%APPDATA%\\Claude\\claude_desktop_config.json`\n\n```json\n{\n  \"mcpServers\": {\n    \"sapientdb\": {\n      \"command\": \"npx\",\n      \"args\": [\"@agentopolis/sapientdb-mcp\"],\n      \"env\": {\n        \"SAPIENTDB_TOKEN\": \"your_token_here\"\n      }\n    }\n  }\n}\n```\n\n### 3. Restart Claude Desktop\n\nAfter updating the config, restart Claude Desktop to load the MCP server.\n\n### 4. Start using it\n\nAsk Claude things like:\n\n- \"List my documents in SapientDB\"\n- \"Create a new document called 'Meeting Notes'\"\n- \"Add a paragraph about our Q1 goals\"\n- \"Search for anything mentioning authentication\"\n- \"Update the introduction block\"\n\n---\n\n## Installation Options\n\n### Option A: npx (Recommended)\n\nNo installation required. Claude runs the package directly:\n\n```json\n{\n  \"command\": \"npx\",\n  \"args\": [\"@agentopolis/sapientdb-mcp\"]\n}\n```\n\n### Option B: Global Install\n\n```bash\nnpm install -g @agentopolis/sapientdb-mcp\n```\n\nThen configure Claude:\n\n```json\n{\n  \"command\": \"sapientdb-mcp\"\n}\n```\n\n### Option C: Local Install\n\n```bash\nnpm install @agentopolis/sapientdb-mcp\n```\n\nThen configure Claude:\n\n```json\n{\n  \"command\": \"node\",\n  \"args\": [\"./node_modules/@agentopolis/sapientdb-mcp/dist/index.js\"]\n}\n```\n\n---\n\n## Configuration\n\n### Environment Variables\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `SAPIENTDB_TOKEN` | Yes | — | Your PAT or Service Account key |\n| `SAPIENTDB_URL` | No | `https://sapientdb.com` | API endpoint |\n\n### Self-Hosted Deployments\n\nFor self-hosted SapientDB instances, specify your custom URL:\n\n```json\n{\n  \"mcpServers\": {\n    \"sapientdb\": {\n      \"command\": \"npx\",\n      \"args\": [\"@agentopolis/sapientdb-mcp\"],\n      \"env\": {\n        \"SAPIENTDB_TOKEN\": \"your_token_here\",\n        \"SAPIENTDB_URL\": \"https://sapientdb.yourcompany.com\"\n      }\n    }\n  }\n}\n```\n\n---\n\n## Available Tools\n\n### Document Management\n\n| Tool | Description |\n|------|-------------|\n| `list_documents` | List all documents the agent can access |\n| `get_document` | Get a document's metadata and details |\n| `create_document` | Create a new document |\n| `update_document` | Update document title or metadata |\n| `delete_document` | Delete a document and all its blocks |\n\n### Block Management\n\n| Tool | Description |\n|------|-------------|\n| `list_blocks` | List blocks in a document (ordered) |\n| `get_block` | Get a specific block's content |\n| `create_block` | Create a new markdown block |\n| `batch_create_blocks` | Create multiple blocks in one operation (up to 100) |\n| `update_block` | Update a block's content or metadata |\n| `delete_block` | Delete a block |\n\n### Search\n\n| Tool | Description |\n|------|-------------|\n| `search_blocks` | Full-text search across all accessible blocks. Supports filtering by tags, block_type, source, metadata, and date range. |\n| `search_documents` | Search documents by title. Supports filtering by metadata fields. |\n\n### Permissions\n\n| Tool | Description |\n|------|-------------|\n| `get_permissions` | View permissions for a document or block |\n| `set_permissions` | Set permissions (requires admin scope) |\n\n---\n\n## Tool Examples\n\n### Creating a Document\n\n```\nUser: \"Create a document called 'Project Roadmap' in my default collection\"\n\nClaude will call:\n  create_document(title: \"Project Roadmap\", collection_id: \"...\")\n```\n\n### Adding Content\n\n```\nUser: \"Add a section about Q1 milestones\"\n\nClaude will call:\n  create_block(\n    document_id: \"...\",\n    content_markdown: \"## Q1 Milestones\\n\\n...\",\n    block_type: \"heading\"\n  )\n```\n\n### Batch Adding Content (Conversations/Logs)\n\n```\nUser: \"Save this conversation to my notes\"\n\nClaude will call:\n  batch_create_blocks(\n    document_id: \"...\",\n    blocks: [\n      { content_markdown: \"User: How do I...\", block_type: \"user\", metadata: { turn: 1 } },\n      { content_markdown: \"Assistant: You can...\", block_type: \"assistant\", metadata: { turn: 2 } },\n      { content_markdown: \"User: Thanks!\", block_type: \"user\", metadata: { turn: 3 } }\n    ]\n  )\n```\n\nThis is ideal for:\n- Ingesting multi-turn conversations\n- Batch importing log entries\n- Saving agent execution traces\n\n### Searching\n\n```\nUser: \"Find everything about authentication\"\n\nClaude will call:\n  search_blocks(query: \"authentication\")\n```\n\n### Filtering by Metadata\n\nDocuments and blocks support custom metadata fields that can be used for filtering:\n\n```\nUser: \"Find all published API documentation\"\n\nClaude will call:\n  search_blocks(\n    query: \"API\",\n    filters: { metadata: { status: \"published\", category: \"api\" } }\n  )\n```\n\n```\nUser: \"Show me draft documents\"\n\nClaude will call:\n  search_documents(\n    query: \"...\",\n    metadata: { status: \"draft\" }\n  )\n```\n\n### Using Metadata Patch\n\nUpdate metadata fields without overwriting existing ones:\n\n```\nUser: \"Mark this document as reviewed by Alice\"\n\nClaude will call:\n  update_document(\n    document_id: \"...\",\n    metadata_patch: { status: \"reviewed\", reviewer: \"alice\" }\n  )\n```\n\nThis merges with existing metadata rather than replacing it entirely.\n\n### Time-Based Filtering\n\nFilter blocks by creation or modification time (useful for agent logs):\n\n```\nUser: \"Show me conversation messages from the last hour\"\n\nClaude will call:\n  list_blocks(\n    document_id: \"...\",\n    created_after: \"2026-01-19T11:00:00Z\"\n  )\n```\n\n```\nUser: \"Find error logs from today\"\n\nClaude will call:\n  search_blocks(\n    query: \"error\",\n    scope: { type: \"global\" },\n    filters: {\n      created_after: \"2026-01-19T00:00:00Z\",\n      metadata: { level: \"ERROR\" }\n    }\n  )\n```\n\nTime filters accept ISO 8601 format and include `created_after`, `created_before`, `updated_after`, and `updated_before`.\n\n### Updating Content\n\n```\nUser: \"Update the introduction to mention our new product\"\n\nClaude will call:\n  update_block(\n    block_id: \"...\",\n    content_markdown: \"Updated introduction text...\"\n  )\n```\n\n---\n\n## Token Types\n\n### Personal Access Tokens (PATs)\n\nBest for individual use with Claude or other personal agents.\n\n- Created in Account Settings\n- Inherits your collection memberships\n- Scopes: `read`, `write`, `admin`\n\nFormat: `pat_xxxxxxxx_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`\n\n### Service Account Keys\n\nBest for shared automation and integrations.\n\n- Created in Collection Settings (admin only)\n- Scoped to a single collection\n- Scopes: `read`, `write`, `admin`\n\nFormat: `sk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx`\n\n---\n\n## Token Scopes\n\n| Scope | Capabilities |\n|-------|-------------|\n| `read` | List and read documents and blocks |\n| `write` | Create, update, and delete documents and blocks |\n| `admin` | Manage permissions, collection settings |\n\nMost agents need `read` and `write` scopes. Only grant `admin` if the agent needs to manage permissions.\n\n---\n\n## Error Handling\n\nThe MCP server returns clear error messages:\n\n| Error | Cause | Solution |\n|-------|-------|----------|\n| `SAPIENTDB_TOKEN is required` | Missing token | Set the environment variable |\n| `Unauthorized` | Invalid or expired token | Create a new token |\n| `Forbidden` | Insufficient permissions | Check token scopes |\n| `Not found` | Resource doesn't exist | Verify the ID |\n| `Rate limited` | Too many requests | Wait and retry |\n\n---\n\n## Debugging\n\n### Check if the server starts\n\n```bash\nSAPIENTDB_TOKEN=your_token npx @agentopolis/sapientdb-mcp\n```\n\nYou should see initialization output. If not, check:\n- Token is valid\n- Network connectivity to SAPIENTDB_URL\n\n### View logs\n\nClaude Desktop logs MCP server output. Check:\n\n**macOS**: `~/Library/Logs/Claude/`\n**Windows**: `%APPDATA%\\Claude\\logs\\`\n\n### Test the API directly\n\n```bash\ncurl -H \"Authorization: Bearer your_token\" \\\n  https://sapientdb.com/api/documents\n```\n\n---\n\n## Development\n\n### Building from Source\n\n```bash\ngit clone https://github.com/agentopolis/sapientdb.git\ncd sapientdb/mcp\nnpm install\nnpm run build\n```\n\n### Running Locally\n\n```bash\n# Set your token\nexport SAPIENTDB_TOKEN=your_token\n\n# Run in development mode\nnpm run dev\n\n# Or run the built version\nnpm start\n```\n\n### Testing with Claude\n\nPoint Claude at your local build:\n\n```json\n{\n  \"mcpServers\": {\n    \"sapientdb-dev\": {\n      \"command\": \"node\",\n      \"args\": [\"/path/to/sapientdb/mcp/dist/index.js\"],\n      \"env\": {\n        \"SAPIENTDB_TOKEN\": \"your_token\"\n      }\n    }\n  }\n}\n```\n\n### Running Tests\n\nThe MCP server includes comprehensive integration tests that verify all tools and authentication flows work correctly.\n\n#### Quick Start (Auth Tests - No Setup Required)\n\nAuth tests are fully self-contained and create their own accounts/tokens:\n\n```bash\n# Run auth tests only (no PAT needed)\nSAPIENTDB_URL=http://localhost:3000 npm test -- tests/auth.test.ts\n```\n\n#### Full Test Suite (Requires PAT)\n\nFor the complete test suite, you need a PAT with read/write access:\n\n```bash\n# Install dependencies\nnpm install\n\n# Run all tests\nSAPIENTDB_URL=http://localhost:3000 SAPIENTDB_TOKEN=your_pat npm test\n\n# Run tests in watch mode\nSAPIENTDB_URL=http://localhost:3000 SAPIENTDB_TOKEN=your_pat npm run test:watch\n\n# Run specific test file\nSAPIENTDB_URL=http://localhost:3000 SAPIENTDB_TOKEN=your_pat npm test -- tests/documents.test.ts\n```\n\n#### Creating a Test PAT\n\nYou can create a PAT for testing via the API:\n\n```bash\n# 1. Register a test user\ncurl -X POST http://localhost:3000/api/auth/register \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"email\": \"test@example.com\", \"password\": \"TestPassword123!\"}'\n\n# 2. Create a PAT (use access_token from step 1)\ncurl -X POST http://localhost:3000/api/pats \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n  -d '{\"name\": \"Test PAT\", \"scope\": \"read_write\"}'\n```\n\n**Test Coverage:**\n\n| Test File | Description | Tests | Requires Token |\n|-----------|-------------|-------|----------------|\n| `client.test.ts` | API client unit tests (timeout, errors) | 30 | No (mocked) |\n| `auth.test.ts` | Auth flows, PAT scopes, service accounts | 34 | No (self-contained) |\n| `documents.test.ts` | Document CRUD operations | 15 | Yes |\n| `blocks.test.ts` | Block CRUD operations | 18 | Yes |\n| `batch-blocks.test.ts` | Batch block creation for conversations | 15 | Yes |\n| `search.test.ts` | Search functionality | 11 | Yes |\n| `time-filters.test.ts` | Time-based filtering for logs | 15 | Yes |\n| `metadata.test.ts` | Metadata CRUD and search filtering | 15 | Yes |\n| `permissions.test.ts` | Permission get/set | 21 | Yes (admin for set) |\n| `validation.test.ts` | Schema validation edge cases | 66 | Yes |\n| `concurrency.test.ts` | Race conditions, optimistic locking | 20 | Yes |\n| `errors.test.ts` | Error handling edge cases | 30 | Yes |\n\n**Environment Variables:**\n\n| Variable | Required | Description |\n|----------|----------|-------------|\n| `SAPIENTDB_URL` | Yes | API endpoint (e.g., `http://localhost:3000`) |\n| `SAPIENTDB_TOKEN` | For most tests | PAT with read/write access |\n| `SAPIENTDB_TEST_COLLECTION_ID` | No | Specific collection for tests |\n\n**Running tests without a PAT:**\n\n```bash\n# Run unit tests (no server needed)\nnpm test -- tests/client.test.ts\n\n# Run auth tests (no PAT needed, but needs running server)\nSAPIENTDB_URL=http://localhost:3000 npm test -- tests/auth.test.ts\n```\n\n**Notes:**\n- `client.test.ts` uses mocked fetch - runs without any server\n- `auth.test.ts` is fully self-contained and creates its own users, PATs, and service accounts\n- Permission `set_permissions` tests require a PAT with `read_write_admin` scope\n- Tests run sequentially to avoid race conditions\n\n---\n\n## Changelog\n\n### v0.1.10\n- Added Organizations support (Heroku/GitHub-style model)\n- Personal organizations are automatically created for each user\n- Team organizations support owner, admin, and member roles\n- Collections now require an organization context\n- Updated test setup to use organization-scoped collection creation\n\n### v0.1.9\n- Added `batch_create_blocks` tool for efficient multi-block ingestion (up to 100 blocks per call)\n- Ideal for conversation logs, agent traces, and bulk content import\n- Added composite index on `(document_id, created_at)` for faster time-filtered queries\n\n### v0.1.8\n- Added time-based filtering (`created_after`, `created_before`, `updated_after`, `updated_before`) to `search_blocks` and `list_blocks`\n- Essential for agent log and conversation history queries\n- Added `blocks_created_at_idx` index for efficient time-range queries\n\n### v0.1.7\n- Added metadata filtering for `search_blocks` and `search_documents`\n- Added `metadata_patch` for partial metadata updates on documents and blocks\n- New MetadataEditor component in the UI for managing custom metadata fields\n\n### v0.1.6\n- Added service account support\n- Improved error messages\n- Fixed token validation\n\n### v0.1.5\n- Initial public release\n- Document and block management\n- Full-text search\n- Permission management\n\n---\n\n## Links\n\n- [SapientDB Homepage](https://sapientdb.com)\n- [Full Documentation](https://sapientdb.com/help)\n- [Web Application](https://sapientdb.com)\n- [GitHub Repository](https://github.com/agentopolis/sapientdb)\n- [npm Package](https://www.npmjs.com/package/@agentopolis/sapientdb-mcp)\n\n---\n\n## License\n\nMIT\n","readmeFilename":"README.md"}