MCP Session Memory Bridge
Provides tools to record and manage AI agent memory by maintaining a rolling 24-hour event stream and daily archives in Markdown format, enabling searchable history and context preservation across sessions.
This server does not currently have a deployable release on Glama. Follow the repository's setup instructions to install and configure it for your MCP client, including any required credentials and local dependencies.
MCP Session Memory Bridge
A Model Context Protocol (MCP) server that provides cross-session memory capabilities for AI agents. This solves the common problem of "session amnesia" where agents lose context between sessions.
Features
24-Hour Event Stream: Maintains a rolling
RECENT_EVENTS.mdfile with events from the last 24 hoursDaily Memory Archives: Automatically creates daily memory files for long-term storage
Session Context Preservation: Loads relevant context when starting a new session
Event Tagging: Tag events with categories like [Decision], [Action], [Context], [User]
Searchable History: Full-text search across all memory files
Installation
npm install mcp-session-memoryUsage
Start the MCP Server
npx mcp-session-memory --workspace /path/to/workspaceIn Your Agent Code
import { Client } from "@modelcontextprotocol/sdk/client/index.js";
import { StdioClientTransport } from "@modelcontextprotocol/sdk/client/stdio.js";
const transport = new StdioClientTransport({
command: "npx",
args: ["mcp-session-memory", "--workspace", "./workspace"]
});
const client = new Client({
name: "my-agent",
version: "1.0.0"
}, {
capabilities: {}
});
await client.connect(transport);
// Record an event
await client.callTool("memory_record", {
category: "Decision",
content: "Approved new skill generation workflow",
tags: ["workflow", "approval"]
});
// Query memory
const results = await client.callTool("memory_query", {
query: "skill workflow decisions",
limit: 5
});
// Get session context
const context = await client.callTool("session_getContext", {
maxAge: "24h"
});Tools
memory_record
Records a new event to the memory stream.
Input:
category: "Decision" | "Action" | "Context" | "User" | "System"content: string - The event contenttags: string[] - Optional tags for categorizationimportance: number (1-10) - Importance level
memory_query
Searches across all memory files.
Input:
query: string - Search querylimit: number - Maximum results (default: 10)categories: string[] - Filter by categories
session_getContext
Gets relevant context for starting a new session.
Input:
maxAge: string - e.g., "24h", "7d" (default: "24h")limit: number - Maximum events to return
memory_getRecent
Gets recent events from the stream.
Input:
hours: number - Hours to look back (default: 24)limit: number - Maximum events to return
File Structure
workspace/
├── RECENT_EVENTS.md # 24-hour rolling event stream
├── memories/
│ ├── 2026-03-15.md # Today's memory
│ ├── 2026-03-14.md
│ └── ...
└── .memory-config.json # ConfigurationRECENT_EVENTS.md Format
# Recent Events - Last 24 Hours
## 2026-03-15 10:30:00
- [Decision] Approved new skill generation workflow
- [Tags] workflow, approval
## 2026-03-15 09:15:00
- [Action] Completed morning operation for EvoMap
- [Context] Active project: Community PlatformConfiguration
{
"workspace": "./workspace",
"retentionDays": 30,
"maxEventsPerFile": 100,
"categories": ["Decision", "Action", "Context", "User", "System"]
}License
MIT
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections.
Loading tool schema changelog…
This server cannot be deployed
Related MCP Connectors
Persistent memory for AI agents: save, search and connect context across tools and sessions.
Persistent memory and knowledge management for AI agents with semantic search and 50+ tools.
Persistent memory for AI agents. Search, store, and recall across sessions.
Persistent docs and memory for AI agents — read, write, organize & search a shared workspace.