claude-web-history-mcp
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., "@claude-web-history-mcpList my recent claude.ai conversations about the auth redesign"
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.
claude-web-history-mcp
I have ideas on my phone. I write code in VS Code. Those two things don't talk to each other, so every time I sat down to actually build something, the conversation where I worked it out was stuck on the other side of a wall.
This is an MCP server that tears down that wall — it lets Claude Code browse and pull in conversations from your claude.ai account, so a chat you had on your phone this morning is available in your editor this afternoon.
You choose which conversation to import. Nothing syncs automatically, nothing is written back to claude.ai, and no credential ever lands in a config file.
Before you use this: terms of service
Anthropic's Consumer Terms of Service prohibit what this tool does. Section 3 prohibits accessing the service "through automated or non-human means, whether through a bot, script, or otherwise," with the only carve-out being an official API key or Anthropic's explicit permission. That clause has been in place since February 2024 and has been enforced — in early 2026, accounts using third-party harnesses were terminated under it.
I'm not going to tell you this is fine. Read the terms yourself: https://www.anthropic.com/legal/consumer-terms. Decide for yourself.
What I can offer is the distinction I found relevant when deciding to use it myself. The enforcement action in 2026 targeted tools that routed inference traffic through consumer subscriptions — using a flat-rate plan to avoid API costs. This tool consumes no inference quota. It makes a few read-only requests for conversations you already created, data Anthropic also hands you via the official export feature under Settings.
That is a difference in kind, not a legal exemption. The clause doesn't have a "but it's read-only" exception. I judge the practical risk to be low. That is a judgment, not a promise, and I have no standing to make promises about how Anthropic enforces its terms. If you get your account suspended, that's your account, not mine.
If any of that gives you pause, stop here. The official export under Settings gets you the same data, slower and manually, with zero risk. It's a real option and for many people it's the right one.
Related MCP server: Claude Code History MCP
Other things you should know
Your session key is equivalent to your claude.ai login. Anyone who obtains it can act as you. This code stores it in your OS keychain and only ever sends it to
claude.ai— but you should verify that claim rather than take my word for it.Don't paste your session key into any tool you haven't read the source of. Including this one. It's ~850 lines across four files, deliberately, so that reading it is realistic. Please do. Start with
claude-web.js.Be careful with forks. This code is short and simple enough that adding three lines to exfiltrate your key would be easy and easy to miss. Read the diff of whatever you actually run.
This uses undocumented endpoints and will break when Anthropic changes the web app. Treat it as disposable.
Anthropic has an open feature request for an official version (
anthropics/claude-code#15542). That's the real fix. If it ships, delete this. Adding your use case to that thread is more useful than starring this repo.
Requirements
Node.js 18+
Claude Code (CLI, VS Code, JetBrains, or desktop — they share one config)
Works on macOS, Windows, and Linux
Install
Read the source first. Seriously — see the section above.
git clone https://github.com/DestinyJazz/claude-web-history-mcp.git
cd claude-web-history-mcp
npm install
npm run authnpm run auth walks you through finding your session key, stores it in your
OS keychain (macOS Keychain / Windows Credential Manager / Linux Secret
Service), verifies it against claude.ai, and prints the exact command to
register the server. Input is hidden while you type.
Then run the command it gives you — roughly:
claude mcp add claude-web-history --transport stdio -s user -- node /abs/path/to/index.jsThere's deliberately no --env flag: the key lives in the keychain, not in
~/.claude.json.
Open the Claude Code panel, type /mcp, confirm it connected. Done.
You don't need to keep anything running
This is a stdio server. Claude Code spawns it on demand and it exits when the call finishes. Nothing to start, nothing to leave open, survives reboots.
Using it
Just talk to Claude Code:
List my recent claude.ai conversations about the auth redesign
Read conversation
abc-123and use it as context for what we're building here
Save conversation
abc-123todocs/context/auth-design.md
That last one is worth a habit: parking an important conversation as a file in the repo means it survives even if this server stops working.
Tools
Tool | What it does |
| Lists your claude.ai chats. Supports |
| Pulls one conversation into the session as markdown. Truncates at |
| Writes a conversation to a file in your repo. |
| Verifies the session and shows the resolved org id. Pass |
Credentials
Command | Effect |
| Store or replace the session key. |
| Verify the stored key still works. |
| Delete the key from the keychain. |
Resolution order: CLAUDE_SESSION_KEY env var (escape hatch, CI, headless
Linux) → OS keychain (the default).
Session keys expire every few weeks, or immediately if you log out in the
browser. When they do, tools return a message telling you to run npm run auth.
Safeguards in the code, so you can verify them:
The key is stored via
@napi-rs/keyring— never written to a config file.A hardcoded host allowlist means the server refuses to send the cookie anywhere but
claude.ai. SeeALLOWED_HOSTSinclaude-web.js.All output and error text passes through
redact()before leaving the server, so a key can't leak into the model's context or a transcript.Setup input is read with terminal echo off.
No logging to disk. Ever.
Other env vars
Var | Purpose |
| Skip org lookup by pinning your org uuid. |
| Override the base URL. Must still resolve to claude.ai. |
| Override the User-Agent string. |
When it breaks
Run debug_connection, or npm run check from a terminal.
"Session expired or missing" → run
npm run authwith a fresh key.HTTP 404 → the endpoint moved. Open claude.ai with DevTools → Network, click through your chat list, and compare against the
EPblock at the top ofclaude-web.js. That's the only place paths are defined — one edit fixes it.List works but message text is empty → the message payload shape changed. See the
content[]handling ingetConversation().Keychain unavailable (headless Linux, no Secret Service) → set
CLAUDE_SESSION_KEYas an env var instead.
Layout
index.js MCP server — tool definitions
claude-web.js claude.ai client — all endpoints live at the top
credentials.js keychain storage, key normalization, redaction
setup.js interactive `npm run auth`Dependency direction is one-way: index.js and setup.js both depend on
claude-web.js, which depends only on credentials.js. Reading those last two
is enough to confirm where the key can and can't go.
License
MIT. Not affiliated with, endorsed by, or supported by Anthropic.
This server cannot be installed
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 Servers
- Alicense-qualityAmaintenanceEnables searching and retrieving Claude Code conversation history that would otherwise expire after 30 days. Supports full-text search, semantic search, and session management with automatic backup of all conversations.Last updated1828MIT
- Alicense-qualityDmaintenanceSearch and reference your Claude Code conversation history directly from Claude, with full-text search, conversation viewing, and project browsing.Last updated36MIT
- Flicense-qualityCmaintenanceEnables Claude Code to interact with WhatsApp, allowing reading messages, sending messages, and daily summaries using a local WhatsApp Web session.Last updated
- Alicense-qualityDmaintenanceEnables searching and browsing past Claude Code conversations directly from within an active Claude session, with full-text search and cost tracking.Last updatedMIT
Related MCP Connectors
Read, edit, publish, and preview your pepita websites from Claude.
Persistent context for Claude. Your AI always knows your projects and next actions across sessions.
Live SEO workflow tools for Claude Code, Codex, and AI agents.
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/DestinyJazz/claude-web-history-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server