Problem
The Claude Code plugin hardcodes the MCP server config to localhost:3111. When agentmemory is deployed remotely (e.g., Kubernetes cluster accessed via reverse proxy, or cluster-internal DNS), users must add a duplicate entry in .mcp.json with the correct AGENTMEMORY_URL and AGENTMEMORY_SECRET env vars.
This causes a permanent /doctor warning:
MCP server "agentmemory" skipped — same command/URL as already-configured "agentmemory"
Both entries are needed because:
- Plugin: provides hooks (observation capture, session lifecycle)
.mcp.json: provides MCP server with correct URL/auth env vars
Requested Behavior
Plugin should support env var overrides for its MCP server config, either:
- Read
AGENTMEMORY_URL and AGENTMEMORY_SECRET from the environment when available instead of hardcoding localhost
- Detect an existing
.mcp.json entry and skip its own MCP server definition (without the warning)
- Allow plugin config to specify env var overrides
Use Cases
- Kubernetes deployment with cluster-internal DNS (
http://agentmemory.agentmemory.svc.cluster.local:3111)
- Remote server behind reverse proxy with API key auth
- Any non-localhost deployment where hooks are still needed
Problem
The Claude Code plugin hardcodes the MCP server config to
localhost:3111. When agentmemory is deployed remotely (e.g., Kubernetes cluster accessed via reverse proxy, or cluster-internal DNS), users must add a duplicate entry in.mcp.jsonwith the correctAGENTMEMORY_URLandAGENTMEMORY_SECRETenv vars.This causes a permanent
/doctorwarning:Both entries are needed because:
.mcp.json: provides MCP server with correct URL/auth env varsRequested Behavior
Plugin should support env var overrides for its MCP server config, either:
AGENTMEMORY_URLandAGENTMEMORY_SECRETfrom the environment when available instead of hardcoding localhost.mcp.jsonentry and skip its own MCP server definition (without the warning)Use Cases
http://agentmemory.agentmemory.svc.cluster.local:3111)