#1 Persistent memory for AI coding agents based on real-world benchmarks
TypeScript agentmemoryagentsaiclaudeclaudecodecodexcopilotcursorgenaiharnesshermesmemoryompopenclawopencodepi
chore: release 0.8.6 — scope the MCP shim as @agentmemory/mcp (#134)
Rohit Ghumare416fa15af4fa
diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.ymlindex 782b1c2f..e03b8cbe 100644--- a/.github/workflows/publish.yml+++ b/.github/workflows/publish.yml@@ -47,11 +47,11 @@ jobs:echo "ERROR: registry never propagated after 2 minutes" >&2exit 1- - name: Publish agentmemory-mcp shim- working-directory: packages/agentmemory-mcp+ - name: Publish @agentmemory/mcp shim+ working-directory: packages/mcprun: |SHIM_VERSION=$(node -p "require('./package.json').version")- if npm view "agentmemory-mcp@$SHIM_VERSION" version >/dev/null 2>&1; then+ if npm view "@agentmemory/mcp@$SHIM_VERSION" version >/dev/null 2>&1; thenecho "Shim version already published, skipping"elsenpm publish --provenance --access public@@ -59,12 +59,12 @@ jobs:env:NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}- - name: Wait for agentmemory-mcp registry propagation- working-directory: packages/agentmemory-mcp+ - name: Wait for @agentmemory/mcp registry propagation+ working-directory: packages/mcprun: |SHIM_VERSION=$(node -p "require('./package.json').version")for i in $(seq 1 24); do- if npm view "agentmemory-mcp@$SHIM_VERSION" version >/dev/null 2>&1; then+ if npm view "@agentmemory/mcp@$SHIM_VERSION" version >/dev/null 2>&1; thenecho "Shim propagated after ${i} attempt(s)"exit 0fidiff --git a/CHANGELOG.md b/CHANGELOG.mdindex aef6528f..e805f3c1 100644--- a/CHANGELOG.md+++ b/CHANGELOG.md@@ -4,6 +4,22 @@ All notable changes to agentmemory will be documented in this file.The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).+## [0.8.6] — 2026-04-13++Finishes the `npx <shim>` story from #120 by moving the standalone package under the `@agentmemory` scope.++### Changed++- **Standalone MCP shim is now `@agentmemory/mcp`** — the 0.8.5 publish attempted to push `agentmemory-mcp` as an unscoped package, but npm's name-similarity policy rejects it because of an unrelated third-party package called `agent-memory-mcp`. The shim now lives under the scope we already own, so `npx -y @agentmemory/mcp` works on the live registry. All README/integration/CLI-help snippets, the OpenClaw and Hermes guides, and the Claude-Desktop/Cursor/Codex/OpenCode MCP config examples have been updated to use the scoped name. The unscoped `agentmemory-mcp` command line (in the main package's `bin` field) was never published and has been removed from the docs.+- **Package directory renamed** `packages/agentmemory-mcp/` → `packages/mcp/`. The `.github/workflows/publish.yml` publish step points at the new path and `npm view @agentmemory/mcp` for the propagation check.+- **Log prefix** in `src/mcp/standalone.ts` and `src/mcp/in-memory-kv.ts` changed from `[agentmemory-mcp]` to `[@agentmemory/mcp]` so stderr output matches the package users install.++### Fixed++- **Shim version bump was missed in 0.8.5** — `packages/agentmemory-mcp/package.json` (now `packages/mcp/package.json`) was still pinned at `0.8.4` because the release bump script only touched the 8 files in the main package. The shim now tracks the main package and depends on `@agentmemory/agentmemory: ~0.8.6`.++[0.8.6]: https://github.com/rohitg00/agentmemory/compare/v0.8.5...v0.8.6+## [0.8.5] — 2026-04-13Compatibility fix for stricter JSON-RPC clients, plus a spec cleanup CodeRabbit caught during review.diff --git a/README.md b/README.mdindex 2d9ad772..f5944a54 100644--- a/README.md+++ b/README.md@@ -317,7 +317,7 @@ Install agentmemory for OpenClaw. Run `npx @agentmemory/agentmemory` in a separa"mcpServers": {"agentmemory": {"command": "npx",- "args": ["-y", "agentmemory-mcp"]+ "args": ["-y", "@agentmemory/mcp"]}}}@@ -338,7 +338,7 @@ Install agentmemory for Hermes. Run `npx @agentmemory/agentmemory` in a separatemcp_servers:agentmemory:command: npx- args: ["-y", "agentmemory-mcp"]+ args: ["-y", "@agentmemory/mcp"]Verify with `curl http://localhost:3111/agentmemory/health`. Open http://localhost:3113 for the real-time viewer. For deeper 6-hook memory provider integration (pre-LLM context injection, turn capture, MEMORY.md mirroring, system prompt block), copy integrations/hermes from the agentmemory repo to ~/.hermes/plugins/memory/agentmemory.```@@ -355,14 +355,14 @@ Then add the MCP config for your agent:| Agent | Setup ||---|---|-| **Cursor** | Add to `~/.cursor/mcp.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["-y", "agentmemory-mcp"]}}}` |-| **OpenClaw** | Add to MCP config: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["-y", "agentmemory-mcp"]}}}` or use the [gateway plugin](integrations/openclaw/) |-| **Gemini CLI** | `gemini mcp add agentmemory -- npx -y agentmemory-mcp` |-| **Codex CLI** | Add to `.codex/config.yaml`: `mcp_servers: {agentmemory: {command: npx, args: ["-y", "agentmemory-mcp"]}}` |-| **OpenCode** | Add to `opencode.json`: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "agentmemory-mcp"], "enabled": true}}}` |+| **Cursor** | Add to `~/.cursor/mcp.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["-y", "@agentmemory/mcp"]}}}` |+| **OpenClaw** | Add to MCP config: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["-y", "@agentmemory/mcp"]}}}` or use the [gateway plugin](integrations/openclaw/) |+| **Gemini CLI** | `gemini mcp add agentmemory -- npx -y @agentmemory/mcp` |+| **Codex CLI** | Add to `.codex/config.yaml`: `mcp_servers: {agentmemory: {command: npx, args: ["-y", "@agentmemory/mcp"]}}` |+| **OpenCode** | Add to `opencode.json`: `{"mcp": {"agentmemory": {"type": "local", "command": ["npx", "-y", "@agentmemory/mcp"], "enabled": true}}}` || **Hermes Agent** | Add to `~/.hermes/config.yaml` or use the [memory provider plugin](integrations/hermes/) || **Cline / Goose / Kilo Code** | Add MCP server in settings |-| **Claude Desktop** | Add to `claude_desktop_config.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["-y", "agentmemory-mcp"]}}}` |+| **Claude Desktop** | Add to `claude_desktop_config.json`: `{"mcpServers": {"agentmemory": {"command": "npx", "args": ["-y", "@agentmemory/mcp"]}}}` || **Aider** | REST API: `curl -X POST http://localhost:3111/agentmemory/smart-search -d '{"query": "auth"}'` || **Any agent (32+)** | `npx skillkit install agentmemory` |@@ -416,7 +416,7 @@ npx -y @agentmemory/agentmemory```powershellnpx -y @agentmemory/agentmemory mcp# or via the shim package:-npx -y agentmemory-mcp+npx -y @agentmemory/mcp```**Diagnostics for Windows:** if `npx @agentmemory/agentmemory` fails, re-run with `--verbose` to see the actual engine stderr. Common failure modes:@@ -643,7 +643,7 @@ Run without the full server — for any MCP client. Either of these works:```bashnpx -y @agentmemory/agentmemory mcp # canonical (always available)-npx -y agentmemory-mcp # shim package alias+npx -y @agentmemory/mcp # shim package alias```Or add to your agent's MCP config:@@ -654,7 +654,7 @@ Most agents (Cursor, Claude Desktop, Cline, etc.):"mcpServers": {"agentmemory": {"command": "npx",- "args": ["-y", "agentmemory-mcp"]+ "args": ["-y", "@agentmemory/mcp"]}}}@@ -666,7 +666,7 @@ OpenCode (`opencode.json`):"mcp": {"agentmemory": {"type": "local",- "command": ["npx", "-y", "agentmemory-mcp"],+ "command": ["npx", "-y", "@agentmemory/mcp"],"enabled": true}}diff --git a/integrations/hermes/README.md b/integrations/hermes/README.mdindex fa7b658d..8e158a7f 100644--- a/integrations/hermes/README.md+++ b/integrations/hermes/README.md@@ -35,7 +35,7 @@ an MCP server with all 43 memory tools:mcp_servers:agentmemory:command: npx- args: ["-y", "agentmemory-mcp"]+ args: ["-y", "@agentmemory/mcp"]Verify it's working with`curl http://localhost:3111/agentmemory/health` — it should return@@ -61,7 +61,7 @@ Add to `~/.hermes/config.yaml`:mcp_servers:agentmemory:command: npx- args: ["-y", "agentmemory-mcp"]+ args: ["-y", "@agentmemory/mcp"]```This gives Hermes access to all 43 MCP tools. Start the server separately:diff --git a/integrations/openclaw/README.md b/integrations/openclaw/README.mdindex e3958ed1..b3a632a7 100644--- a/integrations/openclaw/README.md+++ b/integrations/openclaw/README.md@@ -37,7 +37,7 @@ memory_smart_search, memory_timeline, memory_profile, etc.):"mcpServers": {"agentmemory": {"command": "npx",- "args": ["-y", "agentmemory-mcp"]+ "args": ["-y", "@agentmemory/mcp"]}}}@@ -81,7 +81,7 @@ Then add to your OpenClaw MCP config:"mcpServers": {"agentmemory": {"command": "npx",- "args": ["-y", "agentmemory-mcp"]+ "args": ["-y", "@agentmemory/mcp"]}}}diff --git a/package-lock.json b/package-lock.jsonindex 84272cc2..1dc64cc5 100644--- a/package-lock.json+++ b/package-lock.json@@ -1,12 +1,12 @@{"name": "@agentmemory/agentmemory",- "version": "0.8.5",+ "version": "0.8.6","lockfileVersion": 3,"requires": true,"packages": {"": {"name": "@agentmemory/agentmemory",- "version": "0.8.5",+ "version": "0.8.6","license": "Apache-2.0","dependencies": {"@anthropic-ai/claude-agent-sdk": "^0.2.56",diff --git a/package.json b/package.jsonindex de02dfb7..d453232f 100644--- a/package.json+++ b/package.json@@ -1,6 +1,6 @@{"name": "@agentmemory/agentmemory",- "version": "0.8.5",+ "version": "0.8.6","description": "Persistent memory for AI coding agents, powered by iii-engine's three primitives","type": "module","main": "dist/index.mjs",diff --git a/packages/agentmemory-mcp/LICENSE b/packages/mcp/LICENSEsimilarity index 100%rename from packages/agentmemory-mcp/LICENSErename to packages/mcp/LICENSEdiff --git a/packages/agentmemory-mcp/README.md b/packages/mcp/README.mdsimilarity index 53%rename from packages/agentmemory-mcp/README.mdrename to packages/mcp/README.mdindex d40e7328..abd57a75 100644--- a/packages/agentmemory-mcp/README.md+++ b/packages/mcp/README.md@@ -1,15 +1,16 @@-# agentmemory-mcp+# @agentmemory/mcpStandalone MCP server for [agentmemory](https://github.com/rohitg00/agentmemory).This is a thin shim package that re-exposes the standalone MCP entrypoint from[`@agentmemory/agentmemory`](https://www.npmjs.com/package/@agentmemory/agentmemory),-so MCP client configs that say `npx agentmemory-mcp` work out of the box.+so MCP client configs that say `npx @agentmemory/mcp` work out of the box+without installing the full package first.## Usage```bash-npx agentmemory-mcp+npx -y @agentmemory/mcp```Or wire it into your MCP client (Claude Desktop, OpenClaw, Cursor, Codex, etc.):@@ -19,7 +20,7 @@ Or wire it into your MCP client (Claude Desktop, OpenClaw, Cursor, Codex, etc.):"mcpServers": {"agentmemory": {"command": "npx",- "args": ["-y", "agentmemory-mcp"]+ "args": ["-y", "@agentmemory/mcp"]}}}@@ -37,14 +38,12 @@ Both commands do the same thing.## Why does this package exist?-The README for `@agentmemory/agentmemory` documented `npx agentmemory-mcp`-because the package exposes a `bin` of that name. But `npx <name>` resolves-`<name>` against the npm registry, not against installed binaries, so users got-a 404. This shim publishes a real `agentmemory-mcp` package whose only job is-to forward to the canonical entrypoint.--See [issue #120](https://github.com/rohitg00/agentmemory/issues/120) for the-full story.+The original plan in [issue #120](https://github.com/rohitg00/agentmemory/issues/120)+was to publish `agentmemory-mcp` as an unscoped package, but npm's name-similarity+policy blocks that name because of an unrelated package called `agent-memory-mcp`.+Publishing under the `@agentmemory` scope sidesteps the conflict and keeps the+"dedicated standalone package" UX — `npx @agentmemory/mcp` is one character+longer than `npx agentmemory-mcp` and works on the live registry.## Licensediff --git a/packages/agentmemory-mcp/bin.mjs b/packages/mcp/bin.mjssimilarity index 57%rename from packages/agentmemory-mcp/bin.mjsrename to packages/mcp/bin.mjsindex 8b02e9f3..7df452d5 100755--- a/packages/agentmemory-mcp/bin.mjs+++ b/packages/mcp/bin.mjs@@ -1,10 +1,10 @@#!/usr/bin/env nodeimport("@agentmemory/agentmemory/dist/standalone.mjs").catch((err) => {console.error(- "[agentmemory-mcp] Failed to load standalone entrypoint from @agentmemory/agentmemory.",+ "[@agentmemory/mcp] Failed to load standalone entrypoint from @agentmemory/agentmemory.",);console.error(- "[agentmemory-mcp] Try installing manually: npm i -g @agentmemory/agentmemory",+ "[@agentmemory/mcp] Try installing manually: npm i -g @agentmemory/agentmemory",);console.error(err instanceof Error ? err.stack || err.message : String(err));process.exit(1);diff --git a/packages/agentmemory-mcp/package.json b/packages/mcp/package.jsonsimilarity index 85%rename from packages/agentmemory-mcp/package.jsonrename to packages/mcp/package.jsonindex 87c738bb..d1e5c344 100644--- a/packages/agentmemory-mcp/package.json+++ b/packages/mcp/package.json@@ -1,6 +1,6 @@{- "name": "agentmemory-mcp",- "version": "0.8.4",+ "name": "@agentmemory/mcp",+ "version": "0.8.6","description": "Standalone MCP server for agentmemory — thin shim that re-exposes @agentmemory/agentmemory's MCP entrypoint","type": "module","bin": {@@ -23,12 +23,12 @@"repository": {"type": "git","url": "https://github.com/rohitg00/agentmemory",- "directory": "packages/agentmemory-mcp"+ "directory": "packages/mcp"},"homepage": "https://github.com/rohitg00/agentmemory#readme","bugs": "https://github.com/rohitg00/agentmemory/issues","dependencies": {- "@agentmemory/agentmemory": "~0.8.4"+ "@agentmemory/agentmemory": "~0.8.6"},"publishConfig": {"access": "public",diff --git a/plugin/.claude-plugin/plugin.json b/plugin/.claude-plugin/plugin.jsonindex 8bc89669..7dc2a270 100644--- a/plugin/.claude-plugin/plugin.json+++ b/plugin/.claude-plugin/plugin.json@@ -1,6 +1,6 @@{"name": "agentmemory",- "version": "0.8.5",+ "version": "0.8.6","description": "Persistent memory for AI coding agents -- captures tool usage, compresses via LLM, injects context into future sessions. 12 hooks, 43 MCP tools, 4 skills, real-time viewer.","author": {"name": "Rohit Ghumare",diff --git a/src/cli.ts b/src/cli.tsindex 47991472..100a4b6a 100644--- a/src/cli.ts+++ b/src/cli.ts@@ -41,7 +41,7 @@ Quick start:npx @agentmemory/agentmemory status # check healthnpx @agentmemory/agentmemory demo # try it in 30 seconds (needs server running)npx @agentmemory/agentmemory mcp # standalone MCP server (no engine)- npx agentmemory-mcp # same as above (shim package)+ npx @agentmemory/mcp # same as above (shim package)`);process.exit(0);}diff --git a/src/functions/export-import.ts b/src/functions/export-import.tsindex 0ea1dae2..9c9ef7f7 100644--- a/src/functions/export-import.ts+++ b/src/functions/export-import.ts@@ -175,7 +175,7 @@ export function registerExportImportFunction(sdk: ISdk, kv: StateKV): void {const strategy = data.strategy || "merge";const importData = data.exportData;- const supportedVersions = new Set(["0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.7.0", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5"]);+ const supportedVersions = new Set(["0.3.0", "0.4.0", "0.5.0", "0.6.0", "0.6.1", "0.7.0", "0.7.2", "0.7.3", "0.7.4", "0.7.5", "0.7.6", "0.7.7", "0.7.9", "0.8.0", "0.8.1", "0.8.2", "0.8.3", "0.8.4", "0.8.5", "0.8.6"]);if (!supportedVersions.has(importData.version)) {return {success: false,diff --git a/src/mcp/in-memory-kv.ts b/src/mcp/in-memory-kv.tsindex 36147597..0dacebf1 100644--- a/src/mcp/in-memory-kv.ts+++ b/src/mcp/in-memory-kv.ts@@ -54,7 +54,7 @@ export class InMemoryKV {writeFileSync(this.persistPath, JSON.stringify(data), "utf-8");} catch (err) {process.stderr.write(- `[agentmemory-mcp] Persist failed: ${err instanceof Error ? err.message : String(err)}\n`,+ `[@agentmemory/mcp] Persist failed: ${err instanceof Error ? err.message : String(err)}\n`,);}}diff --git a/src/mcp/standalone.ts b/src/mcp/standalone.tsindex aced72cf..2cdaf707 100644--- a/src/mcp/standalone.ts+++ b/src/mcp/standalone.ts@@ -167,7 +167,7 @@ const transport = createStdioTransport(async (method, params) => {});process.stderr.write(- `[agentmemory-mcp] Standalone MCP server v${SERVER_INFO.version} starting...\n`,+ `[@agentmemory/mcp] Standalone MCP server v${SERVER_INFO.version} starting...\n`,);transport.start();diff --git a/src/types.ts b/src/types.tsindex 7189f755..b452a26a 100644--- a/src/types.ts+++ b/src/types.ts@@ -252,7 +252,7 @@ export interface ExportPagination {}export interface ExportData {- version: "0.3.0" | "0.4.0" | "0.5.0" | "0.6.0" | "0.6.1" | "0.7.0" | "0.7.2" | "0.7.3" | "0.7.4" | "0.7.5" | "0.7.6" | "0.7.9" | "0.8.0" | "0.8.1" | "0.8.2" | "0.8.3" | "0.8.4" | "0.8.5";+ version: "0.3.0" | "0.4.0" | "0.5.0" | "0.6.0" | "0.6.1" | "0.7.0" | "0.7.2" | "0.7.3" | "0.7.4" | "0.7.5" | "0.7.6" | "0.7.9" | "0.8.0" | "0.8.1" | "0.8.2" | "0.8.3" | "0.8.4" | "0.8.5" | "0.8.6";exportedAt: string;sessions: Session[];observations: Record<string, CompressedObservation[]>;diff --git a/src/version.ts b/src/version.tsindex 40997169..2596e7ca 100644--- a/src/version.ts+++ b/src/version.ts@@ -1 +1 @@-export const VERSION: "0.3.0" | "0.4.0" | "0.5.0" | "0.6.0" | "0.6.1" | "0.7.0" | "0.7.2" | "0.7.3" | "0.7.4" | "0.7.5" | "0.7.6" | "0.8.1" | "0.8.2" | "0.8.3" | "0.8.4" | "0.8.5" = "0.8.5";+export const VERSION: "0.3.0" | "0.4.0" | "0.5.0" | "0.6.0" | "0.6.1" | "0.7.0" | "0.7.2" | "0.7.3" | "0.7.4" | "0.7.5" | "0.7.6" | "0.8.1" | "0.8.2" | "0.8.3" | "0.8.4" | "0.8.5" | "0.8.6" = "0.8.6";diff --git a/test/export-import.test.ts b/test/export-import.test.tsindex caaa02ee..d724f832 100644--- a/test/export-import.test.ts+++ b/test/export-import.test.ts@@ -118,7 +118,7 @@ describe("Export/Import Functions", () => {it("export produces valid ExportData structure", async () => {const result = (await sdk.trigger("mem::export", {})) as ExportData;- expect(result.version).toBe("0.8.5");+ expect(result.version).toBe("0.8.6");expect(result.exportedAt).toBeDefined();expect(result.sessions.length).toBe(1);expect(result.sessions[0].id).toBe("ses_1");