Skip to content

Claude Code MCP Integration Not Capturing Observations #657

@shalltalk

Description

@shalltalk

Bug Report: Claude Code MCP Integration Not Capturing Observations

Summary

agentmemory-mcp is running and connected via Claude Code's /mcp command, but no observations from Claude Code sessions are being captured or persisted, even though the MCP bridge
process is active.

Environment

  • agentmemory version: v0.9.21
  • iii version: v0.11.2
  • Claude Code: Latest (Haiku 4.5)
  • OS: macOS 24.6.0 (Darwin)
  • Node version: 26.0.0

Setup

  1. agentmemory daemon running: agentmemory start
  2. .mcp.json configured in project:
{
  "mcpServers": {
    "agentmemory": {
      "command": "npx",
      "args": ["@agentmemory/mcp"],
      "env": {
        "AGENTMEMORY_URL": "http://localhost:3111",
        "AGENTMEMORY_SECRET": "local-development"
      }
    }
  }
}
  1. MCP reconnected via /mcp in Claude Code

Expected Behavior

When working in Claude Code with agentmemory MCP connected, observations from tool use, file edits, and other actions should be captured and visible in the agentmemory viewer/API.

Actual Behavior

  • agentmemory-mcp process spawns and runs (confirmed via ps)
  • /mcp shows "Reconnected to agentmemory"
  • No observations from Claude Code sessions are written to ./data/state_store.db/
  • Viewer only shows demo sessions (from agentmemory demo), never Claude Code sessions
  • API endpoints return no Claude Code observations

Evidence

  • agentmemory-mcp is running: ps aux | grep agentmemory-mcp shows active process
  • Daemon is responsive: REST API on port 3111 works
  • Demo observations work: agentmemory demo creates 6 observations visible in viewer
  • Manual API posts work: curl -X POST http://localhost:3111/api/observations succeeds
  • But Claude Code observations: No .bin files created in ./data/state_store.db/ when running Claude Code
  • Daemon logs show no errors about Claude Code connections or observation ingestion

Logs

Daemon logs show successful startup, demo observations being captured, but no mention of Claude Code sessions or MCP bridge activity:
[agentmemory] Viewer: http://localhost:3113
[agentmemory-mcp]

What Works

  • agentmemory demo captures observations ✅
  • Manual HTTP API calls work ✅
  • Data persistence to disk works ✅
  • Viewer displays data correctly ✅

What Doesn't Work

  • Claude Code MCP integration capturing observations ❌
  • agentmemory-mcp receiving data from Claude Code ❌
  • Live Claude Code session visibility in viewer ❌

Questions

  1. Does Claude Code support MCP-based observation hooks, or only specific MCP capabilities?
  2. What is the expected MCP contract/schema for agentmemory-mcp?
  3. Are there any debug/verbose logging options for agentmemory-mcp to see what it's receiving?
  4. Is there additional configuration needed beyond AGENTMEMORY_URL and AGENTMEMORY_SECRET?

Steps to Reproduce

  1. Start agentmemory: agentmemory start
  2. Create .mcp.json with agentmemory-mcp configuration
  3. Reconnect in Claude Code: /mcp
  4. Run any Claude Code command (bash, file edit, etc.)
  5. Check agentmemory viewer or query API
  6. Expected: New Claude Code session visible
  7. Actual: Only demo sessions visible, no Claude Code observations

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions