MCP Command History

by rajpdus

2 stars
167 downloads
Not rated
GitHub

About

An MCP(Model Context Protocol) Server for retrieving and sharing your bash/zsh history with MCP Client (Cursor, Claude etc.)

Details

Author
rajpdus
GitHub stars
2
Downloads
167
Categories
Developer Tools

- Access shell command history programmatically
- Search history with text queries
- Retrieve most recent commands with configurable limit
- Get a specific command by its numeric ID
- Seamless integration with Cursor and other MCP tools
- Supports Bash, Zsh, and any shell with history files

Setting up with Highlight

This MCP is not yet compatible with Highlight’s one-click setup. However, you can still use it with Highlight by following these steps:

  1. Download and install Highlight from highlightai.com/download
  2. Navigate to the plugins tab and select "Add Custom Plugin"
  3. Configure the plugin with the settings below
    Plugin Name MCP Command History
    Command (node, npx, python, etc.)

    Please refer to the README for specific instructions on how to obtain API keys or other required environment variables.

  4. Enable "Start Automatically" if you want the plugin to start when Highlight launches

From the repository

Install from source with Git and pip. Start the server with python mcp_history_server.py; it reads history from the HISTFILE environment variable (default: ~/.bash_history). Once running, use MCP tools such as search_commands, get_recent_commands, and get_command from a Cursor client or any MCP‑compatible host.

Claude Desktop / Cursor

Paste into your MCP client config file to install this server.

{
    "mcpServers": {
        "mcp command history": {
            "mcp-histfile": {
                "command": "python",
                "args": [
                    "mcp_history_server.py"
                ]
            }
        }
    }
}

McpServers

{
    "mcp-histfile": {
        "command": "python",
        "args": [
            "mcp_history_server.py"
        ]
    }
}

MCP Command History

A powerful tool for exploring, searching, and managing your shell command history through the MCP (Model Control Protocol) interface. This project allows you to easily access, search, and retrieve your previously executed shell commands.

Features

- Command History Access: Access your shell command history programmatically
- Powerful Search: Search through your command history with text queries
- Recent Commands: Quickly retrieve your most recently executed commands
- MCP Integration: Seamlessly integrates with Cursor and other MCP-compatible tools

Installation

Prerequisites

- Python 3.6 or higher
- A shell with history support (Bash, Zsh, etc.)

Install from Source

```bash

No reviews yet — be the first

Sign in to leave a review

Use Google, GitHub, or an email account so ratings stay tied to real people.

Email sign in

No reviews posted yet.