I Built a Self-Updating Memory System for Claude Using a Custom MCP Server
I've been running a custom MCP server connected to Claude.ai for several months as part of a proprietary SEO intelligence platform. The setup works well for structured data queries — rankings, craw...

Source: DEV Community
I've been running a custom MCP server connected to Claude.ai for several months as part of a proprietary SEO intelligence platform. The setup works well for structured data queries — rankings, crawl issues, keyword gaps — but session memory was the weak point. I had a flat markdown file that stored project context: open tasks, doctrine, session history. It loaded at the start of every session via a get_context tool. The problem? Updating it required manually editing the file on the server after every session. It kept drifting. The fix was simpler than I expected. I added a single append-only tool called update_context to my FastMCP server. It takes one argument — a plain text summary of what happened in the session. The tool auto-injects the date and appends a dated entry to the Session History section of the context file. python from datetime import datetime from pathlib import Path @mcp.tool() def update_context(entry: str) -> str: """ Appends a dated session history entry to the