registry  /  usrcp-local  /  0.2.2

usrcp-local@0.2.2

Local MCP server for USRCP — persistent AI memory on your machine

AI Security Review

scanned 2h ago · by lpm-firewall-ai

No confirmed malicious attack surface. The package is an intended local MCP memory server with user-invoked registration into AI client configs and optional user-configured encrypted sync.

Static reason
High-risk behavior combination matched malicious policy.; previous stored version diff introduced dangerous source
Trigger
npm install rebuild hook; user runs usrcp init/setup/adapter/serve/sync
Impact
Agents can read/write the user's USRCP ledger after explicit registration; sync pushes encrypted events only to configured endpoint.
Mechanism
local MCP server and explicit client registration
Rationale
Source inspection shows risky-looking primitives are package-aligned and activated by explicit CLI/setup commands, while install-time behavior only rebuilds better-sqlite3. No unconsented lifecycle mutation of foreign AI-agent control surfaces, exfiltration, payload staging, or destructive behavior was found.
Evidence
package.jsondist/index.jsdist/server.jsdist/transport.jsdist/keychain.jsdist/sync.jsdist/adapters/terminal/index.jsdist/adapters/terminal/claude-code.jsdist/adapters/terminal/codex.jsdist/adapters/terminal/aider.jsnode_modules/better-sqlite3/buildnode_modules/usrcp-local/node_modules/better-sqlite3/buildnode_modules/usrcp-stream/node_modules/better-sqlite3/build~/.claude.json~/.codex/config.toml~/.cursor/mcp.json~/.continue/config.json~/.aider.conf.yml~/.usrcp/CONTEXT.md~/.usrcp/users/<slug>/auth.token~/.usrcp/users/<slug>/tls/cert.pem~/.usrcp/users/<slug>/tls/key.pem
Network endpoints2
127.0.0.1:9876/mcpuser-configured cloud_endpoint

Decision evidence

public snapshot
AI called this Clean at 90.0% confidence as Benign with low false-positive risk.
Evidence for block
  • package.json has postinstall that removes better-sqlite3 build dirs and runs npm rebuild better-sqlite3
  • dist/index.js user-invoked init writes MCP server entries into Claude/Cursor/Continue/Cline configs
  • dist/adapters/terminal/index.js can add a tagged crontab entry for Aider context refresh after setup prompt
  • dist/sync.js sends encrypted ledger events to user-configured cloud_endpoint
Evidence against
  • No install-time AI-agent config mutation found; postinstall is limited to native dependency rebuild cleanup
  • MCP/client config writes are under explicit commands: init, setup, or adapter add terminal
  • HTTP server binds to 127.0.0.1 with bearer token and self-signed TLS
  • Keychain access is for storing/reading this package's passphrase, with timeouts and explicit store path
  • No hardcoded exfiltration endpoint; sync endpoint is user-set via config
  • No remote code execution, obfuscated payload, destructive filesystem logic, or credential harvesting found
Behavioral surface
Source
ChildProcessCryptoDynamicRequireEnvironmentVarsFilesystemNetwork
Supply chain
HighEntropyStringsUrlStrings
ManifestNo manifest risk signals triggered.
scanned 25 file(s), 251 KB of source, external domains: 127.0.0.1, docs.openclaw.ai

Source & flagged code

4 flagged · loading source
package.jsonView file
scripts.postinstall = node -e "const fs=require(\"fs\"); for (const p of [\"node_modules/better-sqlite3/build\",\"node_modules/usrcp-local/node_modules/better-sqlite3/build\",\"node_modules/usrcp-stream...
Critical
Red Install Lifecycle Script

Install-time lifecycle script matches a deterministic static-gate block pattern.

package.jsonView on unpkg
scripts.postinstall = node -e "const fs=require(\"fs\"); for (const p of [\"node_modules/better-sqlite3/build\",\"node_modules/usrcp-local/node_modules/better-sqlite3/build\",\"node_modules/usrcp-stream...
High
Install Time Lifecycle Scripts

Package defines install-time lifecycle scripts.

package.jsonView on unpkg
dist/server.jsView file
4exports.createServer = createServer; L5: const mcp_js_1 = require("@[redacted].js"); L6: const zod_1 = require("zod");
Medium
Dynamic Require

Package source references dynamic require/import behavior.

dist/server.jsView on unpkg · L4
dist/index.jsView file
matchType = previous_version_dangerous_delta matchedPackage = usrcp-local@0.2.0 matchedIdentity = npm:dXNyY3AtbG9jYWw:0.2.0 similarity = 0.920 summary = stored previous version shares package body but lacks this dangerous source file
Critical
Previous Version Dangerous Delta

This package version adds a dangerous source file absent from the previous stored version; route for source-aware review.

dist/index.jsView on unpkg

Findings

2 Critical1 High4 Medium4 Low
CriticalRed Install Lifecycle Scriptpackage.json
CriticalPrevious Version Dangerous Deltadist/index.js
HighInstall Time Lifecycle Scriptspackage.json
MediumDynamic Requiredist/server.js
MediumNetwork
MediumEnvironment Vars
MediumStructural Risk Force Deep Review
LowScripts Present
LowFilesystem
LowHigh Entropy Strings
LowUrl Strings