Skip to main content
Glama

sessions-mcp

Search, share, and pull your AI coding-agent sessions — Claude Code and Codex — from inside the agent itself. A small MCP server: no account, no signup, one-command install.

  • Share the current session as a link. Anyone with the link can view it and pull the full session into their own agent to build on it.

  • Automatic capture: every session is uploaded + summarized on its own — you never have to remember to save. Sharing stays explicit.

  • Search your past sessions by meaning ("how did I fix that flaky auth thing") — not just keywords.

  • Pull a shared session into your current one to continue where someone left off.

Install (one command)

You keep using Claude Code / Codex exactly as-is.

Needs: node ≥ 18, and at least one of Claude Code / Codex / mo. macOS and Linux. (The installer is POSIX sh and takes curl or wget, so it needs nothing else — bare Alpine works.)

Don't assume your agent already brought node: Claude Code's native install and mo are standalone binaries, so only an npm-installed Codex guarantees it. The server needs node at runtime too — it runs on every session, not just at install. 18 is the floor because the client uses global fetch; the installer refuses anything older, since on node 16 it would install cleanly and then fail every upload from inside a hook where the error is never seen.

curl -fsSL https://raw.githubusercontent.com/danielamiao/sessions-mcp/main/install.sh | sh

Or from a checkout, which installs the bundle you just built instead of downloading one:

./install.sh

Either way the server lands at ~/.sessions-mcp/sessions-mcp.mjs and the config points there, so you can delete the checkout afterwards. Re-running is safe, and switches an existing install to the current path rather than leaving a stale one behind.

The installer wires whichever harnesses it finds — it doesn't require any particular one:

what it does

Claude Code

registers the MCP server at user scope, wires the capture hooks, adds /share-session + /find-session

mo

registers the server in ~/.mo/config.toml and enables MCP; capture hooks come from the Claude-compatible settings file

Codex

prints the ~/.codex/config.toml block to paste — Codex has no CLI to register a server, and its config is hand-edited

Start a new agent session afterward.

Piping a script into bash means running whatever that URL serves today. This one has no CI and the bundle it fetches is a hand-built artifact committed to the repo, so nothing signs or reproduces it — read install.sh first if that matters to you, or clone and use the checkout path.

Then just ask your agent: "share this session" or "find my session about X."

Related MCP server: codemem

What it does with your data

This talks to a small hosted backend. When you share a session, its full transcript becomes readable and pullable by anyone with the link — treat a share link like a public paste. Captured sessions are private to your (anonymous) token until you share them, and hosted copies expire after ~30 days. Obvious key shapes (sk-ant-…, sk-…, gwk_live_…, AKIA…, Bearer …) are scrubbed on your machine before upload, and again server-side — but pattern-matching only catches what it recognises, so it is a backstop, not a guarantee. This is a personal project shared as-is (see the LICENSE) with no warranty — don't put anything you couldn't paste into a public gist.

Point it at a different backend with SESSIONS_MCP_URL if you run your own.

Build from source

npm install && npm run build && npm run bundle   # produces dist/sessions-mcp.mjs
npm test

Available Tools

5 tools
list_recent_sessionsA

List the user's recent agent sessions (Claude Code, Codex) from their private session corpus. Syncs local session logs first, so the list is current.

Inputs: no named parameters.

pull_sessionA

Pull a shared agent session (by share link or token) into the current conversation to continue or build on it. A SHORT session comes back as the full transcript automatically. A LONGER session comes back as a summary + its most recent turns (full=false); when that happens you MUST ask the user whether they want the full transcript before proceeding — do not silently continue on just the summary. If they say yes, call pull_session again with full=true.

Inputs: link (required), full.

search_my_sessionsA

Semantic search over the user's own agent sessions — matches by MEANING, not just keywords (a query about 'retries' finds a session about 'exponential backoff'), ranked by relevance with a one-line why per hit. Each result shows what was asked and a summary of what the session did. Private: only the user's own sessions are reachable.

Inputs: query (required).

share_sessionA

Mint a public share link for ONE of the user's sessions. Anyone with the link can view it AND pull the full session content into their own agent (it is not just a read-only view) — so this shares the whole transcript. ONLY call this when the user has explicitly asked to share a session (e.g. 'share this with…', 'give me a link'). Never call it proactively; offering is fine, minting requires their yes. The link is revocable via unshare_session.

Inputs: session_id (required).

unshare_sessionA

Revoke a session's share link — the link stops working immediately.

Inputs: session_id (required).

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

Loading tool schema changelog…

    TDQS

    A4.4/5.0

    Scored across 5 tools

    Disambiguation5/5

    Each tool targets a distinct operation: listing recent sessions, semantic search, sharing, unsharing, and pulling a shared session. There is no overlap or potential for confusion between them.

    Naming Consistency5/5

    All tools follow a consistent verb_noun pattern in snake_case (list_recent_sessions, search_my_sessions, share_session, unshare_session, pull_session). The naming is uniform and predictable.

    Tool Count5/5

    With only 5 tools, the server is well-scoped and each tool serves a clear purpose within the session management domain. This is within the ideal range.

    Completeness5/5

    The tool set covers the full lifecycle of session management: discovering recent sessions, searching them, sharing a session, revoking a share, and pulling a shared session into the current context. There are no obvious gaps for the stated purpose.

    Maintenance

    ActivityInactive
    ResponsivenessNo recent community issues

    Related MCP Connectors

    Related MCP Servers

    • A
      license
      B
      quality
      B
      maintenance
      Persistent memory MCP server that captures coding session context and automatically injects relevant memories into prompts using hybrid search for OpenCode and Claude Code.
      14
      80
      MIT
    • A
      license
      Not graded
      quality
      D
      maintenance
      MCP server that captures and recalls coding session memory (failures, decisions, diffs) for AI agents, enabling cross-agent continuity and preventing repeated mistakes.
      78 npm
      MIT
    • A
      license
      A
      quality
      D
      maintenance
      Enables multiple coding agents (Claude Code, Codex, Cursor) to discover each other's sessions, search transcripts, ask questions, and handoff tasks through a shared MCP server.
      5
      2 npm
      MIT