Skip to main content
Glama
cwj9195

session-bridge-mcp

by cwj9195

session-bridge-mcp

MCP (Model Context Protocol) server for cross-tool session reading and bidirectional incremental context sync.

Supports reading session history from Codex, Claude Code, and VS Code Copilot, with exact caller identification for all three tools (and extensible to other AI coding tools).

Tools

Tool

Description

current_session

Returns the calling tool's current thread/session ID from exact metadata or environment variables; supports Codex threadId/x-codex-turn-metadata.thread_id and VS Code vscode.conversationId; returns unknown when unavailable and never infers by cwd

list_sessions

Lists recent Codex, Claude Code, Kilo, and VS Code Copilot sessions with id, source, timestamp, project cwd, and summary

read_session

Reads a full session transcript; supports since (incremental from timestamp) and max_chars (output size limit, default 60000)

Related MCP server: Claude Session MCP

Usage

This is an MCP server — configure it in your MCP host:

Codex (~/.codex/config.toml)

[mcp_servers.session-bridge]
type = "stdio"
command = "npx"
args = ["-y", "session-bridge-mcp@0.2.0"]

Claude Code (~/.claude/settings.json or project .claude/settings.json)

{
  "mcpServers": {
    "session-bridge": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "session-bridge-mcp@0.2.0"]
    }
  }
}

Configuration

Environment Variable

Default

Description

SB_STATE_DIR

~/.cache/session-bridge

Runtime state directory (watermark, etc.)

SB_COPILOT_TRANSCRIPTS_DIR

自动探测 VS Code workspaceStorage

Optional direct path to the Copilot transcripts directory

SB_DEBUG

(unset)

Set to 1 to enable debug logging to /tmp/sb.log

SB_DEBUG_LOG

/tmp/sb.log

Debug log path

Development

# Build and test locally
node mcp-server.mjs --list

# Adapter architecture — add new tool support by pushing to `adapters` array

License

MIT

Maintenance

ActivityMaintained
ResponsivenessNo issues

Related MCP Connectors

Related MCP Servers

  • -
    license
    Not graded
    quality
    Not graded
    maintenance
    Enables AI coding assistants like Claude Code, Cursor, and Codex to share chat logs, terminal history, and session context with each other. Eliminates the need to re-explain context when switching between different AI coding tools.
    2
    -
  • A
    license
    A
    quality
    D
    maintenance
    Provides Claude Code with programmatic session awareness to track context usage, session history, and task progress. It enables intelligent context reset recommendations and automatic synchronization of project planning documentation.
    5
    MIT
  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables handoff of context between AI coding agents like Claude Code, Cursor, Codex, and Windsurf with built-in provenance tracking.
    10,385
    MIT
  • A
    license
    Not graded
    quality
    C
    maintenance
    Persistent cross-session memory for AI coding assistants, automatically capturing and injecting context across sessions via MCP tools.
    6
    11
    AGPL 3.0