ephemeral-buffer
一時バッファMCPサーバー(ephemeral-buffer)
AIコーディングアシスタント(Claude Code、Antigravity、Cursorなど)向けの、一時的なインメモリコマンド出力キャプチャ&ハイブリッド検索エンジン(BM25 + セマンティック埋め込み)。
🎯 これが解決する問題
コーディングエージェントが大量の出力(数千行のビルドログ、テスト実行、スタックトレース、JSONダンプ)を生成するコマンドを実行すると、エージェントは2つの障害モードに直面します:
コンテキスト汚染: メガバイト単位の生テキストを取り込むと、トークン制限を超え、モデルの推論能力が低下します。
盲目的なBashフィルタリング: エージェントはエラーパターンを推測するために、
head、tail、grep、awkを実行して複数のターンを無駄にします。
Related MCP server: Qurio MCP Server
💡 解決策
ephemeral-buffer は、デュアルハイブリッドインデックスを備えた一時的なインメモリリングバッファを提供します:
BM25 語彙検索(SQLite FTS5): エラーコード(
NullPointerException、ECONNREFUSED、exit 137、HTTP502)の完全一致検索用。高密度セマンティックベクトル検索(FastEmbed ONNX): 曖昧な概念クエリ(「DB接続プールの障害はどこで発生しましたか?」 や 「認証が失敗したのはなぜですか?」)用。
相互ランク融合(RRF): 語彙ランキングとセマンティックランキングをブレンドし、高精度な検索を実現。
リングバッファの退避: 直近の $N$ 件のキャプチャ(デフォルト:10件)のみを保持し、永続ストレージの蓄積やメモリリークをゼロにします。
🏗 アーキテクチャとフロー
flowchart TD
subgraph Ingestion["1. Ingestion Paths"]
A["CLI Pipe: command 2>&1 | agy-cap"] --> D["Unix Socket (/tmp/ephemeral_buffer.sock)"]
B["Agent Tool: execute_and_capture(cmd)"] --> E["Ephemeral Ring Buffer Engine"]
C["Agent Tool: capture_text / capture_file"] --> E
D --> E
end
subgraph Indexing["2. Dual Hybrid Indexing"]
E --> F["SQLite FTS5 (BM25 Lexical)"]
E --> G["FastEmbed ONNX (Dense Vectors)"]
end
subgraph Querying["3. Agent Query & Retrieval"]
F & G --> H["Reciprocal Rank Fusion (RRF)"]
H --> I["search_capture(query, mode='hybrid')"]
I --> J["Precise Context Chunk + Line Numbers"]
end🚀 使用方法
1. ターミナルから(agy-cap によるCLIパイプ)
コマンド出力を実行中のMCPサーバーに直接パイプできます:
# Pipe any command output into the buffer
pytest -v 2>&1 | agy-cap --label "pytest run"
# Or wrap command execution
agy-cap --label "backend build" -- cargo build --verbose2. AIエージェントからMCPツール経由
エージェントは以下のツールにアクセスできます:
ツール | 目的 |
| シェルコマンドを実行し、すべての出力をバッファにキャプチャし、エージェントコンテキストにはコンパクトな診断サマリー(終了コード、行数、シグナル)のみを返します。 |
| テキストを直接バッファに取り込みます。 |
| ディスクからログ/出力ファイルを取り込みます。 |
| キャプチャした出力に対するハイブリッド/BM25/セマンティック検索。周囲のコンテキスト行と正確な行番号を含む一致チャンクを返します。 |
| 完全なスタックトレースやログを検査するための正確な行範囲を取得します。 |
| 診断概要(行数、エラーシグナル、先頭/末尾プレビュー)。 |
| リングバッファ内のアクティブなキャプチャを一覧表示します。 |
| バッファをクリアします。 |
🛠 サーバーのテスト
テストスイートを実行します:
./venv/bin/python test_engine.pyThis 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
- AlicenseAqualityDmaintenanceProvides persistent memory for AI agents using hybrid search (vector embeddings + BM25) with neural reranking, enabling storage and retrieval of insights, debugging solutions, and patterns across coding sessions.8MIT
- AlicenseNot gradedqualityDmaintenanceEnables AI coding assistants to search and retrieve information from a locally ingested knowledge base using hybrid search, grounded in user-curated documentation.17MIT
- AlicenseNot gradedqualityCmaintenanceEnables AI coding agents to retrieve and manage code context with hybrid search, project memory, and observability via MCP tools.29MIT
- AlicenseAqualityAmaintenanceProvides persistent, searchable memory across AI coding agent and chat history (Claude Code, Codex, Gemini CLI, ChatGPT, and more) via retrieval-augmented generation, enabling semantic and hybrid search to retain context across sessions.55MIT
Related MCP Connectors
Search your knowledge bases from any AI assistant using hybrid RAG.
Long-term memory for AI assistants. Hybrid retrieval, query expansion, auto-topics.
Token-efficient search for coding agents over public and private documentation.
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/k-rister/ephemeral-buffer-mcp'
If you have feedback or need assistance with the MCP directory API, please join our Discord server