MCP Command History

by rajpdus

2 167 downloads Not rated yet MIT
GitHub

About

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

Details

License
MIT

Explore

- 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

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

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


pip install -r requirements.txt

- search_commands(query: str): Search for commands in shell history
- get_recent_commands(limit: int = 10): Get the most recent commands from history
- get_command(command_id: int): Get a specific command by ID

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"
        ]
    }
}

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.