@martindzejky/agentmemory-mcp-shim
v0.1.1
Published
Fail-loud stdio MCP proxy for a remote AgentMemory server
Readme
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.
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/toolsPOST ${AGENTMEMORY_URL}/agentmemory/mcp/callwith{ "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.
