Skip to main content
Glama

MCPコマンド履歴

MCP(Model Control Protocol)インターフェースを介してシェルコマンド履歴を探索、検索、管理するための強力なツールです。このプロジェクトを使用すると、以前に実行したシェルコマンドに簡単にアクセス、検索、取得できます。

特徴

  • コマンド履歴アクセス: プログラムでシェルのコマンド履歴にアクセスする

  • 強力な検索: テキストクエリを使用してコマンド履歴を検索します

  • 最近実行したコマンド: 最近実行したコマンドを素早く取得します

  • MCP統合:カーソルやその他のMCP互換ツールとシームレスに統合します

Related MCP server: Terminal History MCP

インストール

前提条件

  • Python 3.6以上

  • 履歴サポート付きのシェル (Bash、Zsh など)

ソースからインストール

# Clone the repository
git clone https://github.com/yourusername/mcp-cmd-history.git
cd mcp-cmd-history

# Install dependencies
pip install -r requirements.txt

使用法

サーバーの起動

python mcp_history_server.py

デフォルトでは、サーバーはHISTFILE環境変数で指定された場所からシェル履歴を読み取るか、 ~/.bash_historyにフォールバックします。

カーソルの使用

サーバーが実行される場合は、Cursor で次の MCP ツールを使用できます。

  1. 最近のコマンドを取得:

    Please show me my most recent shell commands.
  2. コマンド履歴の検索:

    Please search my command history for 'git commit' and show me the results.
  3. 特定のコマンドの取得: 最近のコマンドを検索または一覧表示した後、ID で特定のコマンドを取得できます。

APIリファレンス

MCPツール

  • search_commands(query: str) : シェル履歴内のコマンドを検索する

  • get_recent_commands(limit: int = 10) : 履歴から最新のコマンドを取得します。

  • get_command(command_id: int) : IDで特定のコマンドを取得する

MCPリソース

  • history://recent/{limit} : 最近のコマンドを取得する (HTTP エンドポイント)

  • history://search/{query} : コマンドの検索(HTTPエンドポイント)

貢献

貢献を歓迎します!ガイドラインについてはCONTRIBUTING.mdをご覧ください。

ライセンス

このプロジェクトは MIT ライセンスに基づいてライセンスされています - 詳細についてはLICENSEファイルを参照してください。

A
license - permissive license
-
quality - not tested
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

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

  • A
    license
    A
    quality
    D
    maintenance
    An MCP server that enables users to retrieve, filter, and search through Claude Code conversation history stored in local projects. It provides tools for listing projects and sessions, paginating through message history, and searching across conversations with keyword filtering.
    4
    25
    11
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Developers: Search your zsh, bash, or fish shell history from Claude Code, Cline, Cursor, Zed, or any MCP client using tools like search_history (full-text with timestamp/CWD/exit code), recent_in_dir, failed_commands, and command_chains for multi-step sequences. Reindex after new activity. Local-only SQLite FTS5 with secrets redacted before storage.
    5
    20
    4
    MIT
  • F
    license
    -
    quality
    B
    maintenance
    Local semantic search over Claude Code sessions and shell command history, exposed to Claude Code as an MCP tool. Everything is indexed into one vector space and runs entirely on your machine.
    2
  • F
    license
    -
    quality
    A
    maintenance
    Local MCP server that lets your AI coding agent query its own cross-tool project history - file/command freshness, past test failures, cost & token spend, cache status, and session handoff - over stdio, 100% local, no telemetry.
    37

View all related MCP servers

Related MCP Connectors

  • Search your AI chat history (ChatGPT, Claude, Codex) from any MCP client. Remote, private, read-only

  • Personal assistant MCP server with search, execute, packages, jobs, secrets, and integrations.

  • A comprehensive Model Context Protocol (MCP) server that enables AI assistants to interact with yo…

View all MCP Connectors

Latest Blog Posts

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/rajpdus/mcp-histfile'

If you have feedback or need assistance with the MCP directory API, please join our Discord server