# Memory (MCP Server)

> Knowledge graph-based persistent memory across conversations

- Type: MCP server
- Publisher: Model Context Protocol (official)
- Categories: AI & ML, Productivity
- Website: https://github.com/modelcontextprotocol/servers/tree/main/src/memory
- Source: https://github.com/modelcontextprotocol/servers
- Transport: stdio
- Launch command: npx -y @modelcontextprotocol/server-memory
- Sign-in: none
- Environment variables: MEMORY_FILE_PATH
- GitHub stars: 90924
- Listed: 2024-11-25

## About

Reference MCP server that stores entities, relations and observations in a local knowledge graph (JSONL file). Lets assistants remember facts about users and projects across sessions.

## Install

1. **Add the server to Codex**

   Codex CLI:

   ```bash
   codex mcp add memory --env MEMORY_FILE_PATH=YOUR_MEMORY_FILE_PATH -- npx -y @modelcontextprotocol/server-memory
   ```

   config.toml:

   ```toml
   [mcp_servers.memory]
   command = "npx"
   args = ["-y", "@modelcontextprotocol/server-memory"]
   
   [mcp_servers.memory.env]
   MEMORY_FILE_PATH = "YOUR_MEMORY_FILE_PATH"
   ```

   Agents SDK:

   ```python
   from agents import Agent, Runner
   from agents.mcp import MCPServerStdio
   
   async with MCPServerStdio(
       name="Memory",
       params={"command": "npx", "args": ["-y", "@modelcontextprotocol/server-memory"]},
   ) as server:
       agent = Agent(name="Assistant", mcp_servers=[server])
       result = await Runner.run(agent, "Remember that I prefer TypeScript over JavaScript")
       print(result.final_output)
   ```

## Tools

- `create_entities`
- `create_relations`
- `add_observations`
- `delete_entities`
- `delete_observations`
- `delete_relations`
- `read_graph`
- `search_nodes`
- `open_nodes`

## Example prompts

- "Remember that I prefer TypeScript over JavaScript"
- "What do you know about my project Atlas?"
- "Add a relation: Alice works at Acme"
- "Forget everything about my old address"

## Related

- [Notion](https://chatgptplugins.directory/mcp/notion.md): Search, read, and write Notion pages, databases, and comments via hosted MCP
- [Excalidraw](https://chatgptplugins.directory/mcp/excalidraw.md): Draw hand-drawn Excalidraw diagrams live inside ChatGPT, Claude and VS Code
- [Atlassian Rovo (Jira & Confluence)](https://chatgptplugins.directory/mcp/atlassian-rovo.md): Work with Jira issues and Confluence pages through Atlassian's hosted MCP
- [Browser Use](https://chatgptplugins.directory/mcp/browser-use.md): Run Browser Use cloud browser agents or control a local browser over MCP
- [Filesystem](https://chatgptplugins.directory/mcp/filesystem.md): Secure local file operations with configurable directory access
- [Mem0](https://chatgptplugins.directory/mcp/mem0.md): Hosted long-term memory for AI agents and clients

---
Source: https://chatgptplugins.directory/mcp/memory · Index: https://chatgptplugins.directory/llms.txt · Independent and community-run. Not affiliated with or endorsed by OpenAI. ChatGPT is a trademark of OpenAI.
