Skip to main content
Glama
martindzejky

agentmemory-mcp-shim

by martindzejky

agentmemory-mcp-shim

Coding agents and other local MCP hosts spawn this process. It forwards tools/list and tools/call to AgentMemory REST and returns the server payload as-is, including structuredContent. There is no local memory database and no silent fallback.

Why this exists

npx @agentmemory/mcp runs upstream @agentmemory/agentmemory, which drops structuredContent on the stdio path. Cursor then rejects every tool call with -32600 once the tool advertises outputSchema.

This shim is the Cursor-side counterpart of agentmemory-mcp-gateway: same two REST endpoints, fail loud when the server is missing.

Related MCP server: GroundMemory

Required env

Name

Purpose

AGENTMEMORY_URL

AgentMemory origin, e.g. https://memory.example.com

AGENTMEMORY_SECRET

Bearer secret for /agentmemory/*

Missing either one exits with status 1. Optional: AGENTMEMORY_TIMEOUT_MS (default 10000).

Setup

This is a complete mcp.json. Paste it into the host config (Cursor uses ~/.cursor/mcp.json) and replace the env values:

{
  "mcpServers": {
    "agentmemory": {
      "command": "npx",
      "args": ["-y", "@martindzejky/agentmemory-mcp-shim"],
      "env": {
        "AGENTMEMORY_URL": "https://memory.example.com",
        "AGENTMEMORY_SECRET": "replace-me"
      }
    }
  }
}

Wire protocol

  • GET ${AGENTMEMORY_URL}/agentmemory/mcp/tools

  • POST ${AGENTMEMORY_URL}/agentmemory/mcp/call with { "name", "arguments" }

  • Pass through content, structuredContent, isError, and _meta

Upstream errors become MCP tool errors (isError: true). This process never opens an InMemoryKV or writes observations locally.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    MCP server providing managed persistent memory for AI agents. Read and write structured state across sessions, tools, and restarts at 1000+ requests per second, with no infrastructure to self-host or operate.
    2
    Apache 2.0
  • A
    license
    Not graded
    quality
    C
    maintenance
    An MCP-native, local-first memory server that gives AI agents persistent, structured memory across sessions and tools, enabling them to maintain identity and context without reconfiguration.
    3
    MIT
  • F
    license
    Not graded
    quality
    B
    maintenance
    Enables remote MCP clients to securely access AgentMemory tools like memory_recall, memory_smart_search, and memory_save through OAuth 2.1 and Streamable HTTP, while keeping the AgentMemory backend secret private.
    -