M-flow

An MCP memory server for agents built on a knowledge graph: relevance as an evidence path, not just vector similarity

MCP server

Medium risk

We rate an entry medium when the tool runs code, makes network calls or reads project files. Check what exactly it does before installing.

Why this level

  • The service accepts and stores user conversations and data in a graph database
  • Requires an LLM provider key used to build the graph
All reasons and checks

flowelement-xinliuyuansu/m_flow

Install

Manual install

git clone https://github.com/FlowElement-xinliuyuansu/m_flow.git && cd m_flow
./quickstart.sh

Deploys the full stack, backend and frontend, and asks for API keys interactively.

This is third-party code. Review the repository files before installing.

What it does

M-flow stores an agent's knowledge in a four-layer graph: episode, facet, facet point, entity. On a query, vector search finds entry points into the graph, then the graph propagates weight along typed edges and looks for the strongest chain of reasoning, not just the nearest vectors by similarity. The memorize and save_interaction tools turn text and conversations into the graph, search and query read from it, and learn extracts procedural memory from accumulated episodes. Access goes through a separate m_flow-mcp server over stdio, sse or http transport, which can run in Docker and connect to Cursor, Claude Desktop or VS Code with Continue.

Who it is for. For anyone building an agent's long-term memory over their own knowledge base who wants retrieval to follow cause and effect, not just text similarity.

Good fit when

  • The agent needs memory of past conversations and events that survives the end of a session
  • Plain vector search finds fragments similar in wording but not in meaning
  • You need procedural memory: the agent should recall sequences of actions, not just facts

Not a fit when

  • Plain vector search over documents without linking facts is already enough
  • You do not want to run and maintain a separate backend with a graph database

Example request

Save this client conversation to memory and next time remind me why they were unhappy at the last meeting

Limitations

Requires Python 3.10-3.13 and a separate M-flow backend; in API mode the MCP server calls it over HTTP with a token. Deployment with Neo4j or PostgreSQL with PGVector needs a separate docker compose profile. The project is relatively new, so API maturity and stability are worth checking under your own load before production use.

How to disable. Stop the containers with docker compose down inside the m_flow-mcp folder, or remove the MCP server from the agent's config and run pip uninstall mflow-ai locally.

MCP

Transport
stdio, sse, http
Authentication
API key
Environment variables
Environment variables
LLM_API_KEY
required, secret
LLM provider key used to build and process the knowledge graph
TRANSPORT_MODE
MCP server transport mode: stdio, sse or http

Security check

  • The service accepts and stores user conversations and data in a graph database
  • Requires an LLM provider key used to build the graph

README in short

The README presents M-flow as a cognitive memory system for agents: a knowledge graph of episodes, facets, facet points and entities, where relevance is an evidence path rather than plain similarity. It walks through an example of diagnosing why a colleague was upset at a meeting, where plain vector search misses the cause but the graph finds it. It separately documents the m_flow-mcp server with tools like memorize, search, query and learn, stdio, sse and http transports, and setup instructions for Cursor, Claude Desktop and VS Code with Continue. Apache 2.0 licensed.

FAQ

How does M-flow differ from ordinary GraphRAG?

By the author's description, the graph in M-flow does not just add structure on top of vector search; it scores relevance as the strongest chain of connections between query and answer, not distance in vector space.

Is Neo4j required?

No, there are docker compose profiles for different backends, including a PostgreSQL with PGVector option without a separate Neo4j.

Editors’ pick

Open-source personal AI assistant on your own machine: answers in Telegram, Slack, Discord and WhatsApp, extended with skills and plugins

CLIHigh risk390.7KRepository stars
Editors’ pick

A self-improving agent from Nous Research with a TUI, messaging gateway, cron jobs and skills it writes itself

CLIHigh risk249.8KRepository stars
Editors’ pick

An open source coding agent for the terminal and desktop with build and plan modes

CLIHigh risk210.6KRepository stars
Editors’ pick

Open prompt library with a Claude Code plugin, MCP server and CLI: search, fetch and improve prompts and skills from an agent

PluginMedium risk171.5KRepository stars
Foxx AIM-flow

I am Foxx AI and I have already vetted this tool. Ask about install, setup or anything else, and I will keep it simple.