nelly-elephant-mcp

nelly-elephant-mcp

Search and resume past Claude Code conversations via MCP. Reads local JSONL session files, runs locally, MIT licensed. An elephant never forgets.

Category
访问服务器

README

nelly-elephant-mcp

An elephant never forgets — and neither should your AI.

Search and resume past Claude Code conversations via the Model Context Protocol (MCP).

Read the full story →

Install

npm install -g nelly-elephant-mcp

Or install from source:

git clone https://github.com/SpicyRiceCakes/nelly-elephant-mcp.git
cd nelly-elephant-mcp
npm install && npm run build
npm install -g .

Configure

Where Nelly looks

Claude Code stores all session transcripts — from every project — in one place:

~/.claude/projects/
  ├── -Users-you-project-alpha/     ← sessions from project alpha
  │   ├── abc123.jsonl
  │   └── def456.jsonl
  ├── -Users-you-project-beta/      ← sessions from project beta
  │   └── ghi789.jsonl
  └── ...                           ← every project you've ever opened

Nelly searches all of them at once. It doesn't matter which project you're in when you ask — she searches everything.

Recommended: Global config

Because Nelly searches across all projects, install her globally so she's available in every session. Add to ~/.claude/mcp_settings.json:

{
  "mcpServers": {
    "nelly": {
      "command": "nelly-elephant-mcp",
      "args": []
    }
  }
}

Alternative: Per-project config

If you only want Nelly in specific projects, add to your project's .mcp.json instead:

{
  "mcpServers": {
    "nelly": {
      "command": "nelly-elephant-mcp",
      "args": []
    }
  }
}

Even in per-project mode, Nelly still searches all sessions. The only difference is whether she's available to call.

Restart Claude Code after configuring. Nelly is ready.

Trunk Modes

Nelly has two modes — just say which one you want:

  • 🐘 Long Trunk — the full Nelly experience. She'll talk you through the search, ask follow-up questions, and celebrate when she finds it. An elephant never forgets.
  • 🐘 Short Trunk — just the results. No personality, no narration. Date, project, snippet, resume command. Done.

Say "Nelly long trunk" or "Nelly short trunk" to switch anytime.

Tools

Tool What it does
nelly_instructions Returns usage guide and system status.
nelly_search Search past sessions by keyword. Supports date range and project filters.
nelly_context Get expanded context from a specific session.
nelly_recent List most recent sessions.

How it works

Claude Code stores session transcripts as JSONL files in ~/.claude/projects/. Nelly searches these files, extracts human-readable text, and returns matching sessions with claude --resume commands.

You can filter by project name or date range if you want to narrow the search. But by default, Nelly searches everything — that's the point.

The AI uses a "spiral search" pattern — starting broad, trying variations, and asking for hints rather than giving up after one attempt.

Privacy

Elephants have trunks, not phones.

What Nelly does: Reads local files on your machine. Zero network calls. Zero telemetry. Zero data collection. Nelly doesn't send data anywhere. Read the source — it's four files.

What you should know: Nelly runs inside Claude Code. When she finds a matching session, the snippets and project names she returns become part of your current conversation for Claude to process — the same way anything you discuss in a Claude session does. Nelly isn't sending data anywhere extra — it's just that whatever she finds becomes part of the chat, like reading a file or pasting text.

In plain English: Nelly searches locally, but the results become part of your conversation. For sensitive searches, use grep directly in your terminal instead — that stays fully on your machine.

Use Nelly for moments of need, not as a browsing tool. Every search puts past session content into your current conversation. Search when you need to find something specific, not to casually explore your history.

Never use Nelly to search for passwords, API keys, or secrets. If a past session contains a leaked credential, searching for it with Nelly copies it into a second session — doubling the exposure. Use grep directly in your terminal instead:

grep -r "your-search-term" ~/.claude/projects/

That stays fully local. No API, no cloud, no second copy.

Compatibility

Version Platform Status
v1.0 Claude Code (macOS, Windows, Linux) Live
v1.a Codex CLI PRs welcome
v1.b Gemini CLI PRs welcome
v1.c Cursor Research needed
v1.d Windsurf Research needed
v1.e Cline Research needed

Contributing

We built the Claude Code adapter. Want to make one for your tool?

  • Fork the repo and look at src/search.ts — that's the pattern
  • Adapters need to find session files and parse them for your tool's format
  • PRs welcome

Origin

Born from a real need — couldn't find a fix from a previous session. Knew it was somewhere in the conversation history but couldn't remember which one. Searched with grep, found it, realized this should be a tool. Built it that night.

Read the full story →

License

MIT


Built by SpicyRiceCakes x Claude

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选