Skip to main content
Glama
Personal Context Manager

Personal Context Manager

by nullptr-z

Personal Context Manager

An MCP (Model Context Protocol) server that provides persistent personal context storage across AI conversations. It allows AI assistants to remember user preferences, project conventions, and other personal information between sessions.

Features

  • Persistent Storage — Context entries are saved to a local JSON file and survive across conversations

  • Upsert by Key — Automatically creates or updates entries based on key, avoiding duplicates

  • Keyword Search — Search across keys, values, and tags to find relevant context

  • Tagging — Organize entries with optional tags for easier retrieval

  • Atomic Writes — Uses tmp-file + rename to prevent data corruption

Related MCP server: agent-mem0

Tools

Tool

Description

update_context

Add or update a context entry by key

get_context

Search entries by keyword

list_contexts

List all stored entries

delete_context

Delete an entry by ID

Setup

Install

npm install
npm run build

Configure in Claude Code

Add to your MCP settings (~/.claude/settings.json):

{
  "mcpServers": {
    "personal-context-manager": {
      "command": "node",
      "args": ["/path/to/personal-context-manager/dist/index.js"]
    }
  }
}

Data Location

Context data is stored at ~/.personal-context-manager/contexts.json by default.

Override with the CONTEXT_MANAGER_DATA_DIR environment variable:

{
  "mcpServers": {
    "personal-context-manager": {
      "command": "node",
      "args": ["/path/to/personal-context-manager/dist/index.js"],
      "env": {
        "CONTEXT_MANAGER_DATA_DIR": "/custom/path"
      }
    }
  }
}

License

MIT

Available Tools

8 tools
delete_contextA

Delete a personal memory entry by ID. Use when: 1) User asks to forget something. 2) Entry is outdated/contradicted by newer info. Always use get_context or list_contexts first to find the entry ID.

Inputs: id (required).

generate_promptA

Generate the PCM system prompt and optionally save it to a file (e.g. CLAUDE.md). If output_path is provided, writes/replaces the PCM section in that file. If omitted, returns the prompt text directly.

Inputs: output_path.

get_contextA

Search personal memory by keyword. Returns stored user preferences, habits, and facts sorted by most recently updated. PROACTIVE: Auto-call at the START of coding tasks to retrieve relevant conventions, and when user mentions code quality/style/review. Triggers — EN: "check/review/convention/lint/format/best practice" ZH: "检查/规范/风格/命名/写法/单测". Extract topic keywords from user message to search (e.g. "单测" → search "测试").

Inputs: query.

list_contextsB

List all entries in personal memory. Returns summary of stored user preferences, habits, and facts.

Inputs: no named parameters.

update_contextA

Personal memory system: save user preferences, habits, and facts for personalized assistance across conversations. PROACTIVE: Auto-call when user reveals personal info. Triggers — EN: "like/love/prefer/hate/always/never/I am/I use/my...is" ZH: "喜欢/讨厌/偏好/习惯/每天/总是/从不/我是/我用". Upserts by key. Check existing entries first to avoid duplicates; delete contradicted entries before updating. Auto-infer category (work/personal/health/tech/preference/etc). Tags: include both EN and ZH (e.g. "food"+"食物").

Inputs: key (required), value (required), tags, category.

workflow_doneB

Mark a workflow entry as done. Use this when a task is completed or a tracked item is resolved. Use workflow_list first to find the entry ID.

Inputs: id (required).

workflow_listA

List workflow entries for the current git project. Returns entries filtered by type and/or status (defaults to active). PROACTIVE: Call this tool at the START of every conversation to load project context — understand what tasks are in progress, what decisions have been made, and what insights have been recorded.

Inputs: type, status.

workflow_logA

Log a project workflow entry. PROACTIVE: You MUST automatically call this tool (without being asked) when any of these happen: (1) User requests a multi-step task → log type "task" with what needs doing. (2) A design/architecture choice is made between alternatives → log type "decision" with rationale. (3) You discover something non-obvious and project-specific (e.g. undocumented behavior, workaround needed) → log type "insight". Core question: "Would this be useful in a FUTURE conversation about this project?" If yes, log it. If only relevant now, skip it. WHEN TO LOG each type: type "task" — User requests a multi-step task (not a one-liner fix). Log when starting (what needs doing) and when partially complete (what is done, what remains). Do NOT log trivial single-step changes. type "decision" — A choice was made between alternatives (e.g. Redis vs local cache, library A vs B). Include the rationale: WHY this approach was chosen. Do NOT log obvious defaults with no alternatives considered. type "insight" — Discovered something PROJECT-SPECIFIC that is not obvious from docs or code (e.g. an API has an undocumented rate limit, a specific query is slow, a workaround was needed). Do NOT log general programming knowledge that applies to all projects. If an entry with the same title and type exists, it will be updated (upsert). Data is scoped to the current git project and auto-synced to the project CLAUDE.md.

Inputs: type (required), title (required), content (required), tags.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A3.8/5.0

    Scored across 8 tools

    Disambiguation3/5

    While most tools target distinct resources (personal context vs. workflow), there is potential overlap between update_context/get_context (personal memory) and workflow_log/workflow_list (project memory) when users mention work-related conventions. The descriptions provide some guidance with specific triggers, but an agent could still confuse which memory store to use for a given piece of information.

    Naming Consistency3/5

    Two different naming patterns are used: context_* tools use verb_noun (update_context, get_context, list_contexts, delete_context) while workflow_* tools use noun_verb (workflow_log, workflow_list, workflow_done). Additionally, generate_prompt follows a third pattern, creating inconsistency across the server's tools.

    Tool Count5/5

    8 tools is a well-scoped count for a personal context manager, covering core operations for two memory systems (personal and project) plus a prompt generator. Each tool appears to earn its place without redundancy.

    Completeness4/5

    The surface offers CRUD operations for personal context (create, read, list, delete) and workflow entries (create, read, update status), covering essential memory management. Minor gaps include the absence of an update tool for personal context (though upsert via update_context covers modification) and no bulk operations or search for workflow entries beyond filtering.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers