
pg-mnemosyne-mcp
MCP server giving AI assistants persistent memory, task tracking and PostgreSQL access
pg-mnemosyne-mcp is an open-source MCP server for agent memory. It is available on CLI, Self-hosted, macOS, Windows and Linux.
- Pricing
- Open source
- Platforms
- CLI, Self-hosted, macOS
- What it can do
- Can delete data (1 tool)
- GitHub stars
- 4
- Last commit
Similar MCP servers
About pg-mnemosyne-mcp
Pg-Mnemosyne stores an assistant's notes, todos and coordination state in PostgreSQL rather than in a chat window. Once connected, an AI client can create a separate database per project, add tagged memory records, and update or delete them later from any session that points at the same server.
Beyond plain memory, it can set up a dedicated tasks table with statuses, priorities and deadlines, and an agent_sessions table where several coding agents register the files and subtasks they are working on. Its run_sql tool gives the assistant direct query and DDL access, and the schema can be altered on the fly with add_column.
The package is installed with pip or pipx and includes an init command that writes the server entry into the configuration files of common AI clients such as Claude Desktop, Cursor, Gemini CLI and Windsurf. It suits developers running several AI coding agents against one codebase who want shared state in a database they already operate.
Tools this server provides (12)
Taken from the project documentation; the running server may differ.
From the tool list in its README, going by the names, 1 of 12 tools deletes data and 6 change data; 3 names don't say.
From the server's own tool labels and tool names; not verified by us.
- create_project_dbName suggests: changes
- Creates a new isolated PostgreSQL database.
- init_schema
- Initializes the base records table.
- init_todo_schema
- Initializes a tasks table.
- init_coordination_schema
- Initializes the agent_sessions table.
- add_columnName suggests: changes
- Adds a column to a table.
- add_recordName suggests: changes
- Adds a memory or todo record.
- get_recordsName suggests: reads
- Retrieves recent records.
- update_recordName suggests: changes
- Partially updates a record.
- delete_recordName suggests: deletes
- Deletes a record by ID.
- update_agent_sessionName suggests: changes
- Registers or updates active agent state.
- get_active_sessionsName suggests: reads
- Lists active agent coordination sessions.
- run_sqlName suggests: changes
- Runs arbitrary SQL.
What it does
- Persistent tagged memory
- Records can be added, listed, updated and deleted by type, with tags attached to each item.
- Per-project databases
- The assistant can create isolated PostgreSQL databases for different projects.
- Task tracking schema
- A tasks table supports statuses from backlog to done, four priority levels, tags and deadlines.
- Multi-agent session registry
- Agents register their active file and subtask so others can see what is in progress.
- Dynamic schema changes
- Columns can be added to existing tables without recreating them.
- Auto-configuration for AI clients
- A single init command writes the server entry into several supported AI client configs.
Good for
- Keeping project notes and todos that persist across separate AI assistant sessions
- Coordinating several coding agents so they do not edit the same file at once
- Tracking tasks with priorities and deadlines from inside an assistant chat
- Running ad hoc SQL queries against a project database through an AI client
Pricing
Open source
Free and MIT licensed.
More servers for the same service
pg-mnemosyne-mcp FAQ
How is the server started?
Run pg-mnemosyne run to start it over standard input and output, or let an AI client launch it from its MCP configuration.
What database does pg-mnemosyne-mcp need?
A PostgreSQL connection string, supplied through the PG_BASE_DSN environment variable or the init command's --dsn option.
Which AI clients are mentioned as supported?
The setup guide covers Claude Desktop, Claude Code, Cursor, Roo Code, Cline, Gemini CLI, Qwen CLI, Codex CLI, Windsurf, OpenCode and Antigravity.
Is pg-mnemosyne-mcp free?
Yes. pg-mnemosyne-mcp is open source, so you can use and self-host it for free.
What are the best alternatives to pg-mnemosyne-mcp?
The closest alternatives to pg-mnemosyne-mcp are Agent-MCP, Gnosis Memory, Compoid MCP and Memxus.
Where this comes from
- Description: written from the project's README.
