Troubleshooting
Common issues and fixes for mem/ctl setup and usage
Troubleshooting
Run the doctor first
npx memctl doctorThis checks credentials, connectivity, org/project access, and memory capacity in one command. Fix any failing checks before investigating further.
Common errors
Token not found
Token not presentThe CLI could not find an API token. Fix:
- Run
npx memctl authto save your token, or - Set
MEMCTL_TOKENin your MCP config env block, or - Check that
~/.memctl/config.jsonexists and has a validprofiles.default.token
Token invalid
Token invalidThe token was found but rejected by the API. Fix:
- Go to Settings > API Tokens in the dashboard
- Generate a new token
- Run
npx memctl authagain with the new token
Org or project not accessible
Org not accessible
Project not accessibleThe token is valid but doesn't have access to the specified org or project. Fix:
- Check that
MEMCTL_ORGandMEMCTL_PROJECTmatch the slugs in your dashboard URL - Verify you are a member of the organization
- Slugs are case-sensitive and use lowercase with hyphens
API not reachable
API not reachableCannot connect to the mem/ctl API. Fix:
- Check your network connection
- If self-hosting, verify your API URL is correct (
MEMCTL_API_URL) - Check if a firewall or proxy is blocking outbound HTTPS
- The CLI will fall back to offline mode automatically
Memory capacity full
Memory capacity full. Delete unused memories before storing new ones.Your project has reached its plan limit. Fix:
- Run
npx memctl capacityto see current usage - Use
npx memctl list --sort updatedto find old memories - Delete unused memories:
npx memctl cleanup - Archive instead of delete if you want to keep data: use the
memory.archiveaction - Upgrade your plan for higher limits
Rate limit exceeded
Rate limit exceededToo many write operations in a single session. The default limit is 500 writes per session.
- Wait for the current session to end and start a new one
- Set a higher limit with
MEMCTL_RATE_LIMIT=1000in your MCP config env - Use
memory_advanced.batch_mutateinstead of individual writes for bulk operations
MCP connection issues
Agent says "MCP server not found" or "tool not available"
- Verify the MCP config file is in the correct location for your agent (see Agent Setup)
- Make sure
npxis available in your PATH - Restart your IDE after editing MCP config files
- Check that Node.js 20+ is installed:
node --version
Agent connects but tools fail
- Run
npx memctl doctorto check credentials - Check that
MEMCTL_ORGandMEMCTL_PROJECTare set in the MCP config env block - Look at your IDE's MCP server logs for error details
Slow first response
On first startup, the MCP server syncs memories from the API. This can take a few seconds depending on how many memories you have. Subsequent tool calls use the local cache and are fast.
Config issues
Wrong org/project being used
The CLI resolves config in this order:
- Environment variables (
MEMCTL_TOKEN,MEMCTL_ORG,MEMCTL_PROJECT) - Project config from
~/.memctl/config.jsonmatched by working directory - Default profile token + env org/project
Check each level:
# See what the CLI resolves
npx memctl doctor
# Check config file
cat ~/.memctl/config.jsonConfig file corrupted
Delete and recreate:
rm ~/.memctl/config.json
npx memctl authLocal cache issues
If you suspect stale data from the local cache:
rm ~/.memctl/cache.dbThe cache is rebuilt automatically on the next MCP server startup.
Data issues
Memories not syncing between team members
- Verify both team members are using the same org and project slugs
- Memory is stored server-side and available within 30 seconds (cache TTL)
- Have the other team member run
context.bootstrapto pull fresh data - Check that memories are scoped to
projectnot stored with a different scope
Stale context after changes
If your agent has stale data mid-session:
- Use
context.bootstrap_deltawith a timestamp to get only recent changes - Or use
context.bootstrapto reload everything fresh - The in-memory cache has a 30-second TTL, so waiting briefly also works
Pending writes not replayed
If writes were queued offline and not replayed:
- Check
~/.memctl/pending-writes.jsonexists and has content - Ensure the API is now reachable:
npx memctl doctor - Start a new MCP server session - it replays pending writes on startup
Still stuck?
- Check the Concepts page for how sync and caching work
- Run
npx memctl doctorand share the output - Open an issue at github.com/memctl/memctl