npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@echomem/mcp

v1.5.1

Published

EchoMem MCP bridge for cross-agent memory, local history import, and recall

Readme

EchoMem Cloud-First MCP Server

This package implements a stateless, cloud-first Model Context Protocol (MCP) server for EchoMem. It allows local IDE agents (like Cursor, Windsurf, Claude Desktop, and VS Code) to interact with the user's secure EchoMem personal backend without risk of file-locking or sandbox conflict with the running Chrome Extension's local database.

Architecture

This MCP Server bridges local tools and your EchoMem Cloud API entirely via authenticated REST fetch() calls.

  • search_memories: Calls the deep-search candidate phase, resolves the retrieved memory rows, and returns those memories only by default
  • save_conversation: Connects to POST /api/extension/memories/ingest
  • get_memories_by_time_range: Connects to POST /api/extension/memories/time-range
  • search_memories_by_keywords: Connects to POST /api/extension/memories/keywords
  • search_others_memories: Connects to MemoryFeed public search without trusting a model-supplied identity; the hosted API resolves the caller from the EchoMem credential and the tool returns that authenticated viewer explicitly
  • delete_memory: Previews one personal memory and returns a confirmation token; only deletes after a second confirmed call

No direct access to the IndexedDB or local files is required.

Encryption — the local bridge is the encrypted surface

For zero-knowledge accounts, the key never leaves your machine. The bridge holds the key locally (exactly like the Chrome extension) and:

  • reads: the server returns ciphertext; the bridge decrypts locally so the model only ever sees plaintext. The server never holds your key.
  • writes: the key is handed to your own backend transiently in the X-Encryption-Key header so memories are encrypted at rest (the server processes plaintext for the request only — never stores the key).
  • trusted-device lifecycle: after a verified login/unlock, the MCP key remains available until the user runs echomem-mcp lock, logs out, or removes the local credentials. If the key is absent, tools tell the user to run echomem-mcp unlock in their own terminal. The passphrase prompt is visible while typed characters stay hidden, and the current agent session can retry immediately after unlock — ciphertext is never handed to the model.

Unencrypted accounts are unaffected. search_memories returns retrieved memories by default so your MCP client does the final answer generation; pass includeAnswer: true only if you need the legacy EchoMem-synthesized recall answer.

Quick start

The standalone package installs and manages its own durable per-user MCP runtime. It configures detected Codex and Claude hosts, connects this device, imports selected local coding history, and keeps compatible runtime updates ready for the next agent session.

Prerequisite: Node.js 18 or newer. Run the command in the same environment as the agent you want to configure. Native Windows and WSL have separate home directories and client configs, so a WSL install does not configure native Windows apps.

macOS, Linux, or WSL:

npx -y @echomem/mcp@latest init

Windows PowerShell:

npx.cmd -y @echomem/mcp@latest init

The one-off npx command is the recommended install path; it stages a durable per-user runtime and does not require a global npm install. On Windows, use a new PowerShell window after installing Node if npx.cmd is not found. Use init for first-time setup and local-history selection; use connect later for account status, Doctor, repair, and uninstall.

| Command | What it does | |---|---| | npx -y @echomem/mcp@latest connect | Open Connect Echo for account readiness, per-host setup, Doctor, repair, and uninstall (use npx.cmd in Windows PowerShell) | | npx -y @echomem/mcp@latest init | One-command setup for installed agents, login, and selected local-history import (use npx.cmd in Windows PowerShell) | | npm i -g @echomem/mcp@latest, then echomem-mcp init | Optional global install for a persistent CLI command | | npm i -g @echomem/mcp@latest && echomem-mcp setup | Install the CLI globally and configure just the detected editor | | npx -y @echomem/mcp@latest setup | One-off setup without keeping a global CLI command | | echomem-mcp setup [--client cursor\|windsurf\|claude-desktop\|claude-code\|codex] | Write client config + log in | | echomem-mcp setup --skip-login [--client cursor\|windsurf\|claude-desktop\|claude-code\|codex] | Write client config without opening the browser or changing credentials | | npx -y @echomem/mcp@latest update --all | Bootstrap or repair the durable per-user runtime and repoint detected client configs, with no browser login | | npx -y @echomem/mcp@latest update --client codex | Update one client only | | echomem-mcp login | Approve device in browser (or use --token / --passphrase) | | echomem-mcp unlock | Privately unlock the vault on this trusted device | | echomem-mcp lock | Remove the local vault key while keeping the device login | | echomem-mcp status | Show token / key / detected clients, configured bridge versions, and update guidance | | echomem-mcp doctor [--no-network] | Diagnose configured client bridge versions | | echomem-mcp control / manage | Compatibility aliases for the returning-user Connect Echo page | | echomem-mcp reconnect | Clean-reinstall EchoMem's managed runtime, clear inactive runtime cache, and repair detected host entries | | echomem-mcp uninstall --confirm | Remove EchoMem MCP host entries/runtime while preserving login, vault credentials, and cloud memories | | echomem-mcp logout | Remove stored credentials |

Windows Connect Echo (no desktop app required)

If you installed the optional global CLI, run this from PowerShell:

echomem-mcp connect

For the recommended one-off install, launch the same local control page with:

npx.cmd -y @echomem/mcp@latest connect

The page binds only to 127.0.0.1 and uses a per-launch nonce. It validates account/vault state, shows each detected MCP host independently, and provides Connect, Repair, Disconnect, Doctor, and clean Reconnect actions. Uninstall MCP stays under Advanced controls and removes only EchoMem-owned host entries, hooks, guidance, skills, and managed runtime files; it does not remove the local EchoMem credential store or any cloud memory. Restart each agent after configuration changes.

The bridge reports its package version in MCP server instructions and in tool descriptions. It also checks npm for a newer published bridge using a cached, non-blocking check. Standalone installations stage compatible updates in the background under ~/.echomem/mcp-runtime and atomically activate them for the next MCP session; the current handshake never waits for npm. Agents can call echomem_update_status to inspect progress. ECHO_DISABLE_AUTO_UPDATE=1 disables automatic installation, and npx -y @echomem/mcp@latest update --all remains the bootstrap and repair command.

Agents can still call echo_context_health for an on-demand local context-health report. It reads the local Codex/Claude logs and does not require a separate process or desktop overlay.

Local conversation lifecycle hooks

For hook-capable clients, MCP setup installs SessionStart and Stop hooks. Claude Code also gets a PreToolUse hook for EchoMem tools:

  • SessionStart — source-session binding. The hook receives the host-owned session_id and transcript_path, verifies that they identify the same local JSONL, and idempotently binds the canonical codex:<id> or claude-code:<id> context through POST /api/extension/source-sessions/bind. It also records a signed local session entry for the Claude Code tool hook. No "latest session" lookup is used. bind_source_session remains a compatibility fallback.
  • PreToolUse — per-call identity in Claude Code. Immediately before an EchoMem MCP call, the hook attaches a short-lived signed proof of the host session. The shared Claude Desktop bridge verifies that proof and keeps the identity scoped to that one request. A call without proof cannot inherit another Desktop conversation's identity. The hook never approves a tool or asks the user to share with a team. The proof prevents accidental cross-session mixing; code with access to the same local EchoMem credential can also mint one, so backend account and workspace authorization remain the security boundary.
  • Stop — private-save checkpoint. Before a completed turn exits, the hook reads only that turn's local transcript slice. If the turn appears durable and did not already call save_conversation, it blocks completion once and asks the Agent to create a concise private checkpoint. It never authors or uploads a checkpoint itself. Re-entry is guarded by stop_hook_active, so the second Stop is allowed after the Agent has checked or saved.

The hook entries are merged idempotently into ~/.codex/hooks.json and ~/.claude/settings.json; unrelated user hooks and settings are preserved. Hooks fail open when their local input is missing so they cannot prevent a conversation from starting or finishing.

When setup runs from Echo Desktop or the standalone runtime, hook commands point at a path that follows runtime updates: Desktop's current folder, or ~/.echomem/mcp-runtime/hud-launcher.mjs, which runs whichever standalone version is active. Each MCP server those runtimes start also repoints EchoMem hooks that older installers pinned to a version folder or the npx cache, and any that name a missing file. A working Codex hook is left for the next setup run, since Codex asks users to re-trust changed hooks. A checkout, global install, or npx copy never repoints hooks.

Cloud Cowork through remote-devices

Cloud Cowork inference cannot use the local hook or transcript-verification path. The shared local MCP process also must not retain one cloud conversation as global bridge state. Cloud Cowork agents therefore pass their runtime-issued session_... identifier as cloudCoworkSessionId on each EchoMem tool call. EchoMem binds that request to the canonical cowork:session_... context with cloud_cowork_tool_argument evidence and local_mcp origin, then links or saves against that context without changing shared bridge state.

This identity is intentionally reported as provisional: the authenticated user owns the context and ticket link, but EchoMem cannot independently corroborate the cloud identifier from a local transcript. Verified local Cowork remains cowork:local_... with trusted local evidence. Never convert one form into the other or silently present a provisional cloud link as verified. remote-devices is a relay into the installed local MCP process; it is not EchoMem's hosted Streamable HTTP MCP endpoint. Transport origin and session-identity evidence are independent.

Manual / headless (SSH, containers, CI)

No browser? Provide secrets directly — this is the documented headless path:

echomem-mcp login --token ec_xxx                       # unencrypted account
echomem-mcp login --token ec_xxx --passphrase '<vault>' # encrypted: derives + verifies the key
# or pre-provision via env: ECHO_API_TOKEN, ECHO_ENCRYPTION_KEY (base64)

The browser flow depends on the EchoMem "connect device" web page posting { token, key? } to the bridge's localhost callback. Until that page ships, use the manual flags above (same result).

Setup & Configuration (manual config)

Prerequisites

A valid EchoMem API key (ec_…). For encrypted accounts, your vault passphrase.

Building

cd packages/mcp-server
npm install
npm run build
npm test   # crypto compat + encrypted-local integration tests

Add to your IDE (Cursor or Windsurf)

Prefer npx -y @echomem/mcp@latest init above (npx.cmd in Windows PowerShell) — it writes these files for you and keeps secrets out of the client config. The manual steps below are the fallback.

For Cursor

In Cursor, go to Settings -> Features -> MCP Servers. Add a new MCP Server:

  • Type: command
  • Name: echomem
  • Command: npx
  • Args: -y @echomem/mcp@latest

Under the Environment Variables section of the server configuration, add:

  • ECHO_API_TOKEN: ec_... (Required unless provisioned via login: your EchoMem API key)
  • ECHO_API_BASE_URL: https://echo-mem-chrome.vercel.app (Optional: Defaults to production URL)
  • MEMORY_FEED_API_URL: https://memory-feed.vercel.app (Optional: Defaults to production MemoryFeed URL)

For Windsurf

  1. Open your global Windsurf MCP configuration file:
    • Mac/Linux: ~/.codeium/windsurf/mcp_config.json
    • Windows: %USERPROFILE%\.codeium\windsurf\mcp_config.json
  2. Add the echomem server beneath your existing configurations:
{
  "mcpServers": {
     "echomem": {
       "command": "npx",
       "args": ["-y", "@echomem/mcp@latest"],
       "env": {
         "ECHO_API_TOKEN": "ec_YOUR_API_KEY_HERE",
         "ECHO_API_BASE_URL": "https://echo-mem-chrome.vercel.app"
       }
     }
  }
}
  1. Restart Windsurf.

Add to Claude Desktop

claude.ai integrations must be configured via the Claude Desktop app.

  1. Open your Claude Desktop setting file:
    • Mac: ~/Library/Application Support/Claude/claude_desktop_config.json
    • Windows: %APPDATA%\Claude\claude_desktop_config.json
  2. Update your mcpServers object to include EchoMem, adding ECHO_API_TOKEN to the env object:
{
  "mcpServers": {
     "echomem": {
       "command": "node",
       "args": ["/absolute/path/to/EchoMem-Chrome/packages/mcp-server/dist/index.js"],
       "env": {
         "ECHO_API_TOKEN": "your_generated_ec_key..."
       }
     }
  }
}
  1. Restart Claude Desktop.

Using via CLI (testing)

ECHO_API_TOKEN="your_token" ECHO_API_BASE_URL="http://localhost:3000" npm run start

Available Tools

  • search_memories: Retrieve ranked personal memories for a query. Defaults to memory-only output and skips EchoMem answer generation; set includeAnswer: true for the legacy synthesized recall.

  • save_conversation: Ingest and structure a conversation directly into your EchoMem timeline.

    During an open local turn this registers one check for when the reply ends. The agent shows a brief queued/checking status; registration is not a saved-memory claim. After the backend finishes, the next successful EchoMem tool result in the same conversation carries a compact receipt with real memory links, or a no-new-memory/failure status. Reading a receipt never submits another save. Pending receipts are persisted under chat-save-receipts in the Echo config directory, scoped to the credential, backend, and verified source session. They survive bridge restart and are consumed at tool delivery. Switching accounts cannot expose another account's receipts; switching back allows that account to receive its pending receipts. A visible Desktop notch does not suppress the chat receipt. A new turn's queued status never cancels a confirmed receipt from an earlier turn in the same result.

    The bridge cannot edit an already-sent assistant reply: immediate post-turn activity is shown by Desktop, while the chat receipt requires a subsequent EchoMem tool call. Tool delivery is not an acknowledgement that the host rendered the final message: a disconnect during delivery or an assistant omitting a returned receipt still requires host-level acknowledgement to guarantee display. If disk writes fail, the bridge retains an in-memory fallback. Pending turn-end requests retain their existing disk recovery path.

  • get_memories_by_time_range: Retrieve memories between explicit start/end timestamps.

  • search_memories_by_keywords: Retrieve memories by matching the keys field.

  • search_others_memories: Search other users' public memories through MemoryFeed public search.

  • delete_memory: Delete a single personal memory through a two-step confirmation flow. First call with memoryId only to preview the target and receive confirmationToken; after the user explicitly confirms, call again with confirmed: true and that exact token. This deletes the memory row only and preserves raw source_of_truth conversation records.

  • echomem_update_status: Check the installed bridge against the latest published npm version. Works without login, uses cached background checks in normal operation, and reports automatic installation state plus a fallback repair command.

  • echo_context_health: Return the local Codex/Claude context-health score as markdown. Works without login and uploads no transcript content.

Contract reference:

  • docs/PUBLIC_API_CONTRACT_V1.md
  • docs/MCP_COMPAT_MATRIX.md