FlowState
Health Pass
- License — License: MIT
- Description — Repository has a description
- Active repo — Last push 0 days ago
- Community trust — 19 GitHub stars
Code Pass
- Code scan — Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions — No dangerous permissions requested
This MCP server provides persistent memory for AI coding assistants, allowing them to track projects, problems, solutions, and learnings across multiple sessions. It stores this context locally in a SQLite database and includes an optional GUI for visual management.
Security Assessment
The overall risk is Low. The tool explicitly states that data is kept entirely local and no information is sent to external services, which aligns with the light code scan finding no dangerous network-related patterns. Furthermore, the audit confirmed that it requests no dangerous permissions and there are no hardcoded secrets in the scanned files. However, developers should note the slight discrepancy between the listed language (TypeScript) and the installation instructions (Python), meaning they should verify the exact codebase they are pulling.
Quality Assessment
The project is in good health and actively maintained, with the most recent code push occurring today. It utilizes a standard, permissive MIT license and has a clear description. With 17 GitHub stars, the community trust level is still in its early stages, which is typical for emerging developer utilities. The codebase passed the automated scan, showing no dangerous execution or permission patterns across the audited files.
Verdict
Safe to use.
Free, open-source, local-first project memory for your AI apps (MCP server for Claude, ChatGPT, Cursor, Grok and any MCP client). Your data stays on your machine.
FlowState
A shared project memory for your AI apps. Free, open source, and stored on your own machine.
FlowState is a local MCP server. It gives every AI app you
use the same memory of your projects: todos, changes, decisions, problems and lessons learned.
Your AI reads a short brief when it starts work on a project and writes down what happens as it
goes. The next chat (or the next app) picks up where the last one stopped.
Everything lives in one SQLite file on your computer. Nothing is sent anywhere unless you turn
on an optional feature that does so (an off-site backup to your own private GitHub repo, or remote
access through your own Cloudflare Tunnel).
Many AIs, one memory, at the same time
Claude, ChatGPT, Cursor and Grok can all use FlowState at once, on your computer, across your network, or from your phone. When one AI logs a decision or a change, the others see it the next time they check. Hard rules and handoff notes reach every AI, and every change records which AI made it, so you always know who did what. Work across projects is linked too, so a change to something shared shows up in every project that uses it.
Why I built it
I built FlowState v1 in January 2026 as a gift to the vibe coder community, back when context was a serious bottleneck and every new AI chat started from scratch. This week I updated it, because the bottleneck moved. Now most of us work across several AI platforms at once, and keeping context between them is the new problem. FlowState stays free and local.
John Martin, DialectForge
Quick start: point your AI at this repo
Paste this into an AI app that can run commands on your computer (Claude Code, Cursor,
Windsurf, Codex CLI, Grok Build, ...):
Set up FlowState for me from https://github.com/dialectforge/FlowState by following its AGENTS.md.
The AI reads AGENTS.md, asks you which apps to connect and whether you want
nightly backups and the FlowState skill, shows you a dry run, then runs setup_flowstate.py.
When it's done, fully quit and reopen the apps it connected.
Claude Desktop's chat can't run commands by itself. Set it up from one of the apps above
("...and connect it to Claude Desktop"), or run the script yourself (below).
What setup_flowstate.py does
It uses the Python standard library only, and it's safe to run again (it reports unchanged
for anything already set up). In order, it:
- checks for Python 3.11 or newer;
- creates
.venvin the repo folder and runspip install -e mcp-serverinto it (skip with--skip-install); - creates the database if there isn't one, or keeps your existing one and adds only the new
FlowState tables and columns (numbered migrations, with an integrity-checked backup first when the
database already has data); - adds a
flowstateentry to each chosen app's MCP config, after saving a copy of that file
as<file>.flowstate-backup-<time>. Other servers and settings are left alone; a file it
can't parse is refused and left untouched; - with
--offsite-github OWNER/NAME, checks that the GitHub repo is private and saves it for
nightly off-site backups (--no-offsiteskips the question); - with
--schedule-backups, adds a nightly local backup to your OS scheduler (Windows Task
Scheduler, macOS launchd, Linux systemd user timer or cron), at 02:30 unless you pass--backup-time HH:MM; - with
--install-skill, installs the FlowState skill (see below;--no-skillskips the question); - with
--verify, starts the server the way your app will and callsstart_hereto check it answers.
Useful flags: --dry-run (show what would change, change nothing), --help,--clients auto|all|none|<list> (claude-desktop, cursor, windsurf, claude-code,codex, grok; auto = every app whose config folder exists), --config <file> (any other
JSON config with an mcpServers object), --db <file>, --python <path>.
Manual install
Needs Python 3.11+ and git.
git clone https://github.com/dialectforge/FlowState.git FlowState
cd FlowState
python -m venv .venv
# Windows: .venv\Scripts\python macOS/Linux: .venv/bin/python
.venv/bin/python -m pip install -e mcp-server # just the server
.venv/bin/python -m pip install -e "mcp-server[dev]" # plus test tools (pytest)
python setup_flowstate.py --clients claude-desktop --schedule-backups --no-offsite --install-skill --dry-run
python setup_flowstate.py --clients claude-desktop --schedule-backups --no-offsite --install-skill --verify
.venv/bin/python -m pytest tests -q # run the tests
setup_flowstate.py installs into .venv itself, so the pip install lines are only needed
if you want the test tools or manage the venv yourself (then add --skip-install). Config
snippets for every app, if you'd rather edit configs by hand, are in AGENTS.md.
The FlowState skill
skills/flowstate is an Agent Skill: a short set of habits (read
the brief first, log to the right project, link shared components, never approve your own review
items, leave a handoff if you stop mid-task). Apps that load skills follow it without being told.
- With setup:
python setup_flowstate.py --install-skill(or answer "yes" when it asks)
copies the folder to~/.agents/skills/flowstateand~/.claude/skills/flowstate. An older,
different copy is moved to~/.agents/flowstate-skill-backups/or~/.claude/flowstate-skill-backups/first. - By hand: copy the
skills/flowstatefolder into~/.agents/skills/or~/.claude/skills/. - Claude apps and ChatGPT: zip the
skills/flowstatefolder yourself and upload the ZIP in
the app's Skills settings. (FlowState doesn't build the ZIP for you.)
No skill support in your app? Paste this once per chat, or into its custom instructions:
Use FlowState as my project memory. First call start_here for the project we're working on (ask me which if unsure). As we work, log decisions, changes, problems, lessons and todos to that project with log_work. If something is shared between projects, link it with the link tool instead of copying it. Never approve or reject review items, and never change my review mode, unless I ask you to in this chat. At the end, log a short summary of what we did and what's next.
The server also sends these rules to every app when it connects, and offers them as the MCP
prompt flowstate-start.
Features
Memory your AI actually reads
start_herebrief: one call gives the AI the project's hard rules, handoff notes, open
todos, problems, recent changes, decisions and key lessons. Sizes:quick(about 1,500
characters),standard(4,000, the default) ordeep(up to 12,000).log_work: one simple tool to record a decision, change, problem, learning or todo.
Every write must name a project, so nothing lands in the wrong place.- Automatic sessions: a session opens on the first call for a project and closes after
2 hours idle (or when the app quits), with a short summary marked[auto-captured, needs review].
You stay in charge
- Review queue: auto-captured summaries, and anything the AI marks as a suggestion, wait
for your OK. Approve, edit or reject them in chat or on the review page. - Review mode (yours to set):
off,auto_only(default), chosen record types, oreverything. Set it for the whole install or per project. The AI may change it only when you
ask in the chat, and every change is logged with your words. - Hard rules: "never do this" rules per project, always shown in full at the top of the brief.
- Handoff notes: an AI that has to stop mid-task leaves "where I was / next step"; the next
AI sees it first until it picks it up. - Undo and history: edits made through FlowState are kept; you can see them and undo the
last change to a record (an undo can itself be undone). - Superseded decisions: a new decision can name the one it replaces, so only the current
one shows in the brief. - Source and last-verified flags: records can say where they came from (
user_stated,ai_inferred,from_code). Facts like paths, ports and config not checked for 60 days are
listed for re-checking.
Accountability
- Who, model and machine on every change: edit history, review queue items and decisions,
links, handoffs, hard rules, review-mode changes and the activity log all record which app
made the change, the AI model (only when the app supplies it; never guessed), the machine or
workspace, and how the app was identified (per-app key, remote token, OAuth app, shared token
or self-reported). - "Who did what" view: on the review page, filter by app, model, machine, project and time
(50 per page) and undo a change from there (the normal undo, with the page's CSRF and origin
checks). AIs can read the same list withhistory(action="who"). - Per-app keys for the local/LAN HTTP server:
flowstate keys add --name "<app>"gives
each app its own key (optionally read-only), so the recorded app name comes from the key, not
from what the app says. The key is shown once and only a hash is kept; a revoked key is
refused (401) at once. Keys aren't accepted on the public listener, and can't usegitor
attach files. The old shared LAN token still works; its changes are marked "shared token (legacy)".
Projects that share things
- Cross-project links with change alerts: when several projects use one thing (for example,
"Atlas VPN uses the Wire Protocol component of Atlas OS"), link them. A change logged on the
shared component gives every linked project an update todo and a "changed since you last
looked" note. FlowState alerts; it never changes code in other projects. - GitHub and Linear links: attach an issue or PR URL to a todo, problem or other record.
Tasks
- Priorities: critical, urgent, normal, low (the older names high and medium still work).
- Subtasks, blockers and "what's next":
todo(action="next")lists open, unblocked work,
highest priority first.
Finding things
- The
asktool: ask a question in plain words; FlowState answers by quoting your own
records, with their ids, and says so when it has nothing on it. It doesn't make anything up. - Search: keyword search over todos, decisions, changes, learnings, problems and solutions
(word endings match too). Search by meaning is optional and uses a local model you install yourself. - Clean-up suggestions: likely duplicates, stale items and records filed under the wrong
project, sent to the review queue as suggestions. Nothing moves until you approve.
Your controls (command line and browser)
- Local review page:
flowstate review-pageopens a small page in your browser (this
computer only, one-time link): review queue, review mode, pause apps, "Who did what". - Per-app activity log and pause: see which app did what (
flowstate apps list/apps activity) and pause one app's writes (apps pause --app NAME). A paused app can still read. - Markdown export and import:
export-mdwrites a readable copy of a project;import-md
brings your edits back through the review queue. - Memory import: bring a Claude or ChatGPT memory export (text, markdown or JSON) into the
review queue (import-memory, or theimport_memorytool). - Opt-in git capture: off by default. Turn it on per project and new commit subjects
become changes (subject lines only; no author, e-mail or diff).
Safety and backups
- Secret refusal: a write that looks like it contains a key, token, password, private key
or card number is refused (secret_detected) and not saved.flowstate scan-secretslists
older records that look suspicious, without showing values. - Token in the OS credential store: the HTTP bearer token goes in Windows Credential
Manager, the macOS Keychain, or on Linux a~/.config/flowstate/http-tokenfile with mode 0600. - Nightly backups: integrity-checked; the newest per day for 14 days and per week for
8 weeks are kept. Restore always goes to a new file unless you add--force(and then the
current file is backed up first). - Optional private GitHub off-site copy: opt-in. FlowState checks the repo is private
before every push and refuses otherwise. It pushes only the backup file and a manifest, to its
own branch, using your existingghor git login. It never stores a GitHub token.
Connecting
- stdio and HTTP transports: stdio for apps on the same computer; streamable HTTP with a
bearer token for other machines on your network, or a separate key per app
(flowstate keys add). - Optional remote access: for cloud AIs (claude.ai, ChatGPT and others), a public listener
behind your own Cloudflare Tunnel with OAuth 2.1 sign-in that you approve with an owner
passphrase, plus revocable per-app tokens (optionally read-only). See
docs/REMOTE-ACCESS.md. - Fewer tools if you want:
--tools core(orFLOWSTATE_TOOLS=core) lists only the 9 core
tools to save context; the others still work if called. Every tool is labelled read-only or read-write.
Works with
- Claude Desktop, Claude Code, Cursor, Windsurf, Codex CLI, Grok Build:
local stdio, set up bysetup_flowstate.py. - claude.ai and ChatGPT: through the optional remote access (HTTPS + OAuth), see
docs/REMOTE-ACCESS.md. - Any other MCP client: stdio (
<venv python> -m flowstate) or HTTP with a bearer token.
Why FlowState
Many AI memory tools now put their best features behind subscriptions: Mem0 ($19 to $249/mo), Zep ($125/mo and up), Supermemory ($19/mo and up). Some have dropped their free or self-hosted options entirely, like Zep's self-hosted edition and Pieces' free tier. FlowState is MIT-licensed, runs on your own machine, and is free with no paid tier.
Prices as listed on each vendor's pricing page, October 2026.
Add your own features
FlowState is open source and built to be worked on by AI: AGENTS.md and
llms.txt explain the repo, the code is split into small modules, and there's a test
suite that runs against temporary databases. If you think of a feature, have your AI build it.
You're not waiting on a vendor's roadmap.
The v1.1 desktop GUI was an unfinished experiment and has been removed. v2 is used through your AI and the browser review page.
Commands for you (not the AI)
Run with the venv Python: <venv python> -m flowstate <command> (or flowstate <command> with
the venv active). Add -h to any command for its options.
| Command | What it does |
|---|---|
review-page |
Review page in your browser (127.0.0.1 only): approve / edit / reject, review mode, pause apps, "Who did what" (with undo) |
keys add --name N [--read-only] [--workspace W] / keys list / keys revoke --id ID (or --name N) |
Per-app keys for the local/LAN HTTP server; the key is shown once, only a hash is kept; a revoked key stops at once |
apps list / apps activity / apps pause --app NAME / apps resume --app NAME |
Which app did what; stop one app from writing |
backup [--offsite] / restore <file> [--to <new file>] |
Back up now / restore into a new, verified file |
schedule-backups [--time HH:MM] [--offsite] / schedule-backups --remove |
Nightly backup on / off |
offsite setup --repo OWNER/NAME / offsite status / offsite push --dry-run / offsite disable |
Private GitHub off-site copy |
migrate [--dry-run] |
Apply new database migrations (backup first) |
cleanup --project NAME [--queue] |
Clean-up suggestions (printed; --queue sends them to the review queue) |
export-md --project NAME --out FILE / import-md --project NAME FILE |
Readable markdown copy; edits come back through the review queue |
import-memory --project NAME FILE --source Claude |
A Claude / ChatGPT memory export into the review queue |
git-capture enable --project NAME --repo FOLDER / disable / status / run |
Opt-in: commit subjects become changes |
meaning status / meaning index |
Search by meaning (needs a local model; see Honest limits) |
scan-secrets |
List records that look like they hold a secret (values never shown) |
token status / token migrate --from FILE |
HTTP bearer token in the OS credential store |
remote status / passphrase / add-client --name N [--read-only] / clients / revoke --client ID |
Remote access: owner passphrase, per-app tokens |
MCP tools
35 tools. The first two are the ones every agent needs.
| Tool | What it does |
|---|---|
start_here |
Call first. Project brief (size: quick / standard / deep); lists projects when called without one |
log_work |
Record a decision, change, problem, learning or todo (replaces=, source=, suggested=) |
rules |
A project's hard rules |
handoff |
Leave / list / pick up "where I was, next step" notes |
review_list / review_approve / review_reject |
The review queue (approve / reject only when you ask) |
review_mode |
Read the review mode; change it only when you ask |
link |
Link projects, shared components, records and URLs |
history |
See edits; undo the last change to a record; action="who": who did what (app, model, machine), with filters |
verify |
Stale facts; mark one as checked; set a record's source |
ask |
Plain-language question, answered from your records with their ids |
search |
Keyword search (and by meaning, if set up) |
todo |
Add, update, list, next, block / unblock; subtasks |
cleanup_suggest |
Duplicate / stale / misfiled suggestions, to the review queue |
import_memory |
A memory export or edited markdown export into the review queue |
list_projects, create_project, update_project, get_context |
Projects and full project context |
create_component, list_components, update_component |
Components of a project |
log_learning, get_learnings, log_change, get_recent_changes |
Older single-purpose record tools |
problem, attempt |
Problems, solution attempts and their outcomes |
session |
Sessions and conversation notes (sessions also run automatically) |
file |
Attach, list, remove or search file attachments |
git |
Git for the data folder (init, status, sync, remote, clone, history) |
variable, method |
Project variables (servers, config, endpoints) and documented methods |
self_improve |
The AI's learned skills and saved state |
Over HTTP, only the owner's LAN token may use git or attach files from your computer; per-app
keys, per-app tokens and OAuth apps are refused.
Honest limits
- Search by meaning needs a model download. FlowState never downloads a model or calls a
cloud API. You installsentence-transformersinto the venv, put a model (defaultall-MiniLM-L6-v2) on disk, setFLOWSTATE_MEANING_MODEL, and runflowstate meaning index.
Without it, search andaskmatch words only, so a reworded question can miss. - Model names are recorded only when the app supplies them (the tool's
modelargument,
theX-FlowState-Modelheader, orFLOWSTATE_MODELfor a desktop app). FlowState never
guesses one; if the app says nothing, the model is left empty. - Desktop (stdio) app and machine names are self-reported, and so are names sent with the
shared LAN token. They are a convenience, not security (this includes the activity log and the
pause switch). The machine isFLOWSTATE_WORKSPACEor this computer's name, or what the app
sends. "Who did what" says so in its identity column ("self-reported", "shared token (legacy)"). - Only per-app keys, per-app remote tokens and approved OAuth apps give an identity an app
can't pick for itself. Even then the model, and for a key without a workspace the machine,
are the app's own say-so. Changes recorded before this was added show "not recorded". - "Only when the user asks" is enforced by wording, not cryptography: approving review items,
changing the review mode and removing rules require the AI to quote your words, but a
misbehaving AI could make them up. Hard rules are shown first in every brief; FlowState can't
stop an AI from doing something outside FlowState. askis extractive: it quotes the best-matching sentences of your records; it doesn't write new answers.- Tested mainly on Windows and macOS. Linux should work but is less tested.
- Remote access is optional and takes setup: your own domain on Cloudflare,
cloudflared
on your computer, and an owner passphrase. The helper launch scripts inscripts/windows/are
Windows-only. FlowState supports OAuth dynamic client registration but not client ID metadata
documents (CIMD) yet. - The secret scanner is pattern-based: it can refuse harmless text (for example a 64-character
hex checksum) and miss a short secret without a label likepassword=. It also refuses
secret values invariable. Older records are not re-scanned automatically; runflowstate scan-secrets. - The off-site copy keeps one backup (a single commit, replaced each night); history depth
comes from your local backups. Pushing it means your memory leaves your machine, to your private repo. - Undo covers edits made through FlowState. Creating a record isn't undone (mark it done or
cancelled instead), and changes made directly in SQLite aren't tracked. - Not backed up nightly: the remote-access settings file (
remote-auth.db). Losing it only
means approving your apps again.
Project layout
FlowState/
├── setup_flowstate.py # one-command setup (venv, database, app configs, backups, skill)
├── AGENTS.md # instructions for AI agents (install + working on the code)
├── llms.txt # map of the repo for AI tools
├── CHANGELOG.md
├── mcp-server/ # the MCP server (Python package "flowstate")
│ ├── pyproject.toml
│ └── flowstate/
│ ├── server.py # tools, stdio and HTTP transports
│ ├── tooldefs.py # tool definitions; agent_guide.py: the wording sent to apps
│ ├── brief.py, autosession.py, guard.py, review.py, review_mode.py, links.py, ...
│ ├── backup.py, offsite.py, scheduler.py, secrets_scan.py, secret_store.py, remote_auth.py
│ ├── app_keys.py, identity.py, who.py # per-app keys, who/model/machine, "Who did what"
│ ├── cli.py, cli_more.py # `flowstate <command>`
│ ├── migrations/ # numbered, additive database migrations
│ └── tools/ # older tool implementations
├── database/schema.sql # base SQLite schema
├── skills/flowstate/ # the Agent Skill
├── scripts/ # helpers: HTTP check, Cloudflare Tunnel template, Windows launchers
├── docs/ # REMOTE-ACCESS.md and notes
└── tests/ # pytest suite (temporary databases only)
The database is created at FLOWSTATE_DB if set, else Windows%LOCALAPPDATA%\flowstate\flowstate.db, macOS ~/Library/Application Support/flowstate/flowstate.db,
Linux ~/.local/share/flowstate/flowstate.db. More settings are listed in AGENTS.md.
Upgrading from v1.1
Pull the new code and run setup_flowstate.py again (or just restart your app). Your existing
database is kept. Before new migrations run on a database with data, FlowState takes an
integrity-checked backup, then it adds new tables, and (migration 012, "who did what") new empty
columns on FlowState's own v2 tables only. v1.1's tables and all existing data are never
changed, so a v1.1 server can still open the same file. You can also run<venv python> -m flowstate migrate --dry-run first to see what would be applied. See
CHANGELOG.md for what's new.
License
MIT. See LICENSE.
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found