Skip to main content
Glama
AnisHerdev

Personal Assistant Memory Server

by AnisHerdev

Expt 1: The "Personal Assistant" Memory Server (MCP SSE Service)

A complete implementation of a Personal Assistant Memory Server running as a persistent background service (SSE / HTTP) and an MCP Client powered by Ollama (Local LLM).


šŸ—ļø Architecture

flowchart LR
    subgraph BackgroundService["Background Service"]
        Server["server.py<br>MCP SSE Server<br>http://127.0.0.1:8000/sse"] --> DB[("notes.json")]
    end

    subgraph ClientApp["Client Application"]
        User["User Query"] --> Client["client.py<br>MCP Client"]
        Client -- "1. Tool Decision" --> LLM["Local Ollama LLM<br>(qwen2.5, llama3.2)"]
        Client -- "2. HTTP / SSE Calls" --> Server
    end

Components:

  • Persistent MCP Server (server.py): Runs continuously as an SSE (Server-Sent Events) daemon on http://127.0.0.1:8000/sse. Exposes CRUD tools:

    • save_note(content, tags): Saves a note with timestamp, ID, content, and tags.

    • search_notes(query): Searches note content and tags.

    • list_notes(): Returns all stored notes.

    • update_note(note_id, content, tags): Updates an existing note.

    • delete_note(note_id): Removes a note from memory.

  • Database (notes.json): Persistent local JSON storage for notes.

  • MCP Client (client.py):

    • Connects to the running server over SSE (http://127.0.0.1:8000/sse).

    • Discovers tools dynamically from the server.

    • Uses Ollama LLM to decide whether to save, search, update, or delete notes based on user prompts.


Related MCP server: NoteKeeper MCP

šŸš€ How to Run

Step 1: Start the Background MCP Server (Terminal 1)

Open a terminal and start the server daemon:

python server.py

Output:

==================================================
šŸš€ Personal Assistant Memory Server (MCP SSE Service)
šŸ“” Listening on: http://127.0.0.1:8000/sse
šŸ› ļø  Exposed Tools: save_note, search_notes, list_notes, update_note, delete_note
šŸ’¾ Database: notes.json
==================================================

Step 2: Run the MCP Client (Terminal 2)

With the server running in the background, open a second terminal and interact with it:

A. Interactive Mode

python client.py
You > Remember to submit the project report by Friday. Tag it as project and report.
>> [MCP Tool Call] -> save_note
   Arguments: {"content": "Submit the project report by Friday.", "tags": ["project", "report"]}
   Result: Note saved successfully with ID: a1b2c3d4 and tags: ['project', 'report']
Assistant > Saved your reminder to submit the project report by Friday.

You > When do I need to submit the report?
>> [MCP Tool Call] -> search_notes
   Arguments: {"query": "report"}
   Result: [...]
Assistant > The project report needs to be submitted by Friday.

B. One-Shot Query Mode

# Save note
python client.py "Save a note: Team standup is daily at 10 AM on Zoom. Tag: meeting, standup"

# Search notes
python client.py "When is the team standup?"

# List all notes
python client.py "Show me all my saved notes"

šŸ“‚ Project Structure

personal-assistant-wwllm/
ā”œā”€ā”€ server.py          # Persistent MCP Server (SSE / HTTP Daemon)
ā”œā”€ā”€ client.py          # Interactive MCP Client with Ollama LLM
ā”œā”€ā”€ notes.json         # Local persistent memory store
ā”œā”€ā”€ requirements.txt   # Dependencies
└── README.md          # Documentation

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    A
    maintenance
    Enables AI assistants to search, read, create, update, and remove personal markdown notes stored locally, providing persistent memory across sessions.
    60 npm
    2
    MIT
  • F
    license
    Not graded
    quality
    C
    maintenance
    Provides AI assistants with tools to create, list, search, tag, and delete notes stored in a local SQLite database.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables managing personal notes through Claude Desktop with add, get, update, delete, and list tools, using atomic saves and a configurable notes file.
    -
  • F
    license
    Not graded
    quality
    C
    maintenance
    Enables Claude Desktop to add, retrieve, update, delete, and list personal notes persisted in a local JSON file, with atomic saves and configurable note storage paths.
    -