MCP Session Memory Bridge MCP Server

1

Add it to Claude Code

Run this in a terminal.

Run in terminal
claude mcp add session-memory-bridge -- npx mcp-session-memory --workspace /path/to/workspace
README.md

Provides cross-session memory for AI agents by maintaining event streams.

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.md file with events from the last 24 hours
  • Daily 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-memory

Usage

Start the MCP Server

npx mcp-session-memory --workspace /path/to/workspace

In 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 content
  • tags: string[] - Optional tags for categorization
  • importance: number (1-10) - Importance level

memory_query

Searches across all memory files.

Input:

  • query: string - Search query
  • limit: 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   # Configuration

RECENT_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 Platform

Configuration

{
  "workspace": "./workspace",
  "retentionDays": 30,
  "maxEventsPerFile": 100,
  "categories": ["Decision", "Action", "Context", "User", "System"]
}

License

MIT

Tools (4)

memory_recordRecords a new event to the memory stream.
memory_querySearches across all memory files.
session_getContextGets relevant context for starting a new session.
memory_getRecentGets recent events from the stream.

Configuration

claude_desktop_config.json
{"mcpServers": {"session-memory": {"command": "npx", "args": ["mcp-session-memory", "--workspace", "/path/to/workspace"]}}}

Try it

Record a decision that we decided to use PostgreSQL for the new project database.
Search my memory for any previous decisions regarding the authentication workflow.
Get the session context from the last 24 hours to help me continue my work.
What were the last 5 actions I performed in the system?

Frequently Asked Questions

What are the key features of MCP Session Memory Bridge?

Maintains a rolling 24-hour event stream in RECENT_EVENTS.md. Automatically creates daily memory files for long-term storage. Preserves session context to prevent session amnesia. Supports event tagging with categories like Decision, Action, and Context. Provides full-text search capabilities across all memory archives.

What can I use MCP Session Memory Bridge for?

Maintaining continuity for long-running development projects across multiple chat sessions. Tracking architectural decisions and project milestones for AI-assisted coding. Retrieving historical context to avoid repeating previous mistakes or redundant work. Organizing system logs and user interactions for better agent performance.

How do I install MCP Session Memory Bridge?

Install MCP Session Memory Bridge by running: npx mcp-session-memory --workspace /path/to/workspace

What MCP clients work with MCP Session Memory Bridge?

MCP Session Memory Bridge works with any MCP-compatible client including Claude Desktop, Claude Code, Cursor, and other editors with MCP support.

Turn this server into reusable context

Keep MCP Session Memory Bridge docs, env vars, and workflow notes in Conare so your agent carries them across sessions.

Need the old visual installer? Open Conare IDE.
Open Conare