sessions-mcp
This server manages, searches, shares, and reuses your AI coding-agent sessions (Claude Code, Codex) automatically. Every session is captured, summarized, and kept private by default, with sensitive data like API keys scrubbed. From your agent you can:
List recent sessions: View your latest sessions after local logs are synced.
Semantic search: Find sessions by meaning (e.g., “retries” matches “exponential backoff”), with ranked results and one-line explanations.
Share a session: Generate a public, revocable link so others can view and pull the full transcript (only on explicit request).
Unshare a session: Instantly revoke access to a previously shared session.
Pull a shared session: Import a shared session (via link or token) into the current conversation to continue or build on existing work; long sessions return a summary first, with the option to fetch the full transcript.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@sessions-mcpfind my session about fixing the flaky auth test"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
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 | shOr from a checkout, which installs the bundle you just built instead of downloading one:
./install.shEither 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 |
mo | registers the server in |
Codex | prints the |
Start a new agent session afterward.
Piping a script into
bashmeans 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 — readinstall.shfirst 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 testAvailable Tools
5 toolslist_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.
| Name | Required | Description | Default |
|---|---|---|---|
No parameters | |||
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the burden. It discloses the sync behavior (local session logs first), which is a side-effect, and notes the private scope. That adds useful transparency beyond a simple list operation.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two concise sentences with front-loaded purpose and a brief behavior note. No wasted words.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
The description is sufficient for a simple no-parameter tool: it states what it lists and the sync behavior. It doesn't detail output format, but the name and description imply a list of sessions, which is adequate.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The tool has 0 parameters, and the description provides no parameter info, but the baseline is 4 for no-param tools as there is nothing to explain.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
Description clearly states the tool lists recent agent sessions (Claude Code, Codex) from the user's private corpus, using a specific verb and resource. This distinguishes it from siblings like search_my_sessions and share_session.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description implies this is the tool for getting a current list of sessions, especially by mentioning the local sync for up-to-date data. However, it doesn't explicitly mention alternatives or when not to use it.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | pull the entire transcript (use after the user confirms they want the full session) | |
| link | Yes | a session share link (https://…/s/<token>) or the bare 64-hex token |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
With no annotations provided, the description fully discloses key behaviors: short sessions return full transcript automatically, long sessions return summary + recent turns, and the agent MUST ask the user before proceeding on a summary. It also instructs to call again with full=true only after confirmation. This is exemplary transparency.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
Two sentences, no filler. The purpose is front-loaded, and the conditional behavior is explained in a structured, easy-to-follow manner. Every clause earns its place.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Despite lacking an output schema and annotations, the description covers the main decision flow, parameter usage, and the critical user-confirmation requirement. It is complete enough for an agent to select, invoke, and correctly handle the tool's results.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already provides detailed descriptions for both parameters (100% coverage), so the baseline is 3. The description adds contextual semantics by explaining that full=false is the observed behavior for longer sessions and that full=true should be used after user confirmation, going slightly beyond the schema's wording.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description states a specific verb and resource: 'Pull a shared agent session (by share link or token) into the current conversation to continue or build on it.' It clearly distinguishes from sibling tools (list/search/share/unshare) by focusing on importing a shared session.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
The description explains when to use the tool (to continue/build on a shared session) and gives important procedural guidance for short vs. long sessions, including mandatory user confirmation. It does not explicitly name alternatives or state when not to use it, but the context and sibling tool names make the usage clear.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
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.
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | what to find — a topic, error, or how something was solved (e.g. 'how did I fix the 401') |
TDQS
Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?
No annotations are provided, so the description carries the full burden and does an excellent job. It discloses key behaviors: semantic matching (with example), relevance ranking, a 'why' explanation per hit, result contents (what was asked and a summary), and the privacy boundary ('only the user's own sessions'). This is substantial and goes beyond a minimal tool description.
Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.
Is the description appropriately sized, front-loaded, and free of redundancy?
The description is three concise sentences: core purpose and semantics, result format, and privacy. Each sentence adds distinct information with no filler. It is front-loaded with the main action and immediately conveys what the tool does.
Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.
Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?
Given there is no output schema and no annotations, the description adequately covers what the tool does, what results look like (why line, asked query, summary), and the access scope. This is complete enough for an agent to understand when and how to invoke it without missing critical context.
Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.
Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?
The schema already documents the 'query' parameter with a helpful description. The tool description adds value by explaining how the query is interpreted semantically (e.g., 'retries' finds 'exponential backoff'), enriching the meaning beyond the schema's literal field description.
Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.
Does the description clearly state what the tool does and how it differs from similar tools?
The description clearly states a specific action (semantic search) over a specific resource (the user's own agent sessions) and differentiates from siblings like list_recent_sessions by emphasizing meaning-based retrieval rather than listing. The phrase 'matches by MEANING, not just keywords' adds a distinctive feature that sets it apart.
Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.
Does the description explain when to use this tool, when not to, or what alternatives exist?
Provides clear context that this tool is for finding sessions by meaning or topic, with a note about privacy. It does not explicitly list alternatives or exclusions, but the context distinguishes it from the sibling tools (list, share, unshare, pull), and the description implies it is the go-to for semantic discovery of past sessions.
Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.
Tool Schema Changelog
Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.
5 tool updates
v0.0.1- First observed
list_recent_sessions - First observed
pull_session - First observed
search_my_sessions - First observed
share_session - First observed
unshare_session
TDQS
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.
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.
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.
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
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Related MCP Connectors
Persistent memory and cross-session learning for AI coding assistants (hosted remote MCP).
Persistent AI memory shared across Claude, ChatGPT, coding agents, and compatible MCP clients.
Hosted MCP memory: save sessions/decisions once, search from Claude, Cursor, ChatGPT. EU-hosted FTS.
Real-time chat for AI agents. Claude Code, Cursor, Cline and Codex join channels over MCP.
Related MCP Servers
- AlicenseCqualityDmaintenanceMCP server for sharing source-backed engineering memory across AI coding clients like Cursor and VS Code.301MIT
- AlicenseNot gradedqualityAmaintenancePersistent memory MCP server that captures coding session context and automatically injects relevant memories into prompts using hybrid search for OpenCode and Claude Code.64MIT
- AlicenseNot gradedqualityDmaintenanceMCP server that captures and recalls coding session memory (failures, decisions, diffs) for AI agents, enabling cross-agent continuity and preventing repeated mistakes.106MIT
- AlicenseAqualityBmaintenanceEnables 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.57MIT
Latest Blog Posts
- Who's Calling? MCP Hosts Are an Identity Blind Spot (And the Spec Knows It)By Om-Shree-0709 on .mcpAgent IdentityOAuth 2.1
- Your AI Chatbot Just Exposed Your CEO's Salary to an InternBy Om-Shree-0709 on .Agent IdentityMCP SecurityOAuth Delegation
- Why MCP Servers Need Execution Sandboxing (And Why Your Current Stack Isn't Enough)By Om-Shree-0709 on .Agentic AiPrompt InjectionWebAssembly
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/danielamiao/sessions-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server