Cover image
Try Now
2025-03-13

MCP(模型上下文协议)服务器,用于检索和与MCP客户端(光标,Claude等)检索和共享您的BASH/ZSH历史记录

3 years

Works with Finder

1

Github Watches

1

Github Forks

1

Github Stars

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

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

# Install dependencies
pip install -r requirements.txt

Usage

Starting the Server

python mcp_history_server.py

By default, the server will read your shell history from the location specified in the HISTFILE environment variable, or fall back to ~/.bash_history.

Using with Cursor

Once the server is running, you can use the following MCP tools in Cursor:

  1. Get Recent Commands:

    Please show me my most recent shell commands.
    
  2. Search Command History:

    Please search my command history for 'git commit' and show me the results.
    
  3. Get Specific Command: You can retrieve a specific command by its ID after searching or listing recent commands.

API Reference

MCP Tools

  • 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

MCP Resources

  • history://recent/{limit}: Get recent commands (HTTP endpoint)
  • history://search/{query}: Search for commands (HTTP endpoint)

Contributing

Contributions are welcome! Please see CONTRIBUTING.md for guidelines.

License

This project is licensed under the MIT License - see the LICENSE file for details.

相关推荐

  • NiKole Maxwell
  • I craft unique cereal names, stories, and ridiculously cute Cereal Baby images.

  • Joshua Armstrong
  • Confidential guide on numerology and astrology, based of GG33 Public information

  • https://suefel.com
  • Latest advice and best practices for custom GPT development.

  • Emmet Halm
  • Converts Figma frames into front-end code for various mobile frameworks.

  • Callycode Limited
  • A geek-themed horoscope generator blending Bitcoin prices, tech jargon, and astrological whimsy.

  • Khalid kalib
  • Write professional emails

  • ANGEL LEON
  • A world class elite tech co-founder entrepreneur, expert in software development, entrepreneurship, marketing, coaching style leadership and aligned with ambition for excellence, global market penetration and worldy perspectives.

  • Elijah Ng Shi Yi
  • Advanced software engineer GPT that excels through nailing the basics.

  • INFOLAB OPERATIONS 2
  • A medical specialist offering assistance grounded in clinical guidelines. Disclaimer: This is intended for research and is NOT safe for clinical use!

  • Yasir Eryilmaz
  • AI scriptwriting assistant for short, engaging video content.

  • apappascs
  • 发现市场上最全面,最新的MCP服务器集合。该存储库充当集中式枢纽,提供了广泛的开源和专有MCP服务器目录,并提供功能,文档链接和贡献者。

  • ShrimpingIt
  • MCP系列GPIO Expander的基于Micropython I2C的操作,源自ADAFRUIT_MCP230XX

  • OffchainLabs
  • 进行以太坊的实施

  • huahuayu
  • 统一的API网关,用于将多个Etherscan样区块链Explorer API与对AI助手的模型上下文协议(MCP)支持。

  • deemkeen
  • 用电源组合控制您的MBOT2:MQTT+MCP+LLM

  • zhaoyunxing92
  • MCP(消息连接器协议)服务

  • pontusab
  • 光标与风浪冲浪社区,查找规则和MCP

    Reviews

    1 (1)
    Avatar
    user_ZIdYUHIL
    2025-04-15

    As a dedicated MCP user, I highly recommend the MCP Server by AleksanStark. This server is incredibly reliable and efficient for managing data with IPFS technology. The seamless integration and user-friendly interface make it a must-have for anyone in need of a robust server solution. Check it out at https://mcp.so/server/mcp-ipfs-server/AleksanStark and experience the difference for yourself!