mcp-histfile

by rajpdus

Integrations

  • Allows searching command history for Git operations, helping users retrieve previously executed Git commands like 'git commit'.

  • Provides access to shell command history, enabling users to search, explore, and retrieve previously executed commands from Bash and other shell environments.

  • Supports reading command history from Zsh, allowing users to access and search their Zsh command history through the MCP interface.

MCP 명령 기록

MCP(모델 제어 프로토콜) 인터페이스를 통해 셸 명령 기록을 탐색, 검색 및 관리할 수 있는 강력한 도구입니다. 이 프로젝트를 사용하면 이전에 실행한 셸 명령에 쉽게 접근하고 검색하고 불러올 수 있습니다.

특징

  • 명령 기록 액세스 : 프로그래밍 방식으로 셸 명령 기록에 액세스합니다.
  • 강력한 검색 : 텍스트 쿼리로 명령 기록을 검색합니다.
  • 최근 명령 : 가장 최근에 실행한 명령을 빠르게 검색합니다.
  • MCP 통합 : Cursor 및 기타 MCP 호환 도구와 완벽하게 통합됩니다.

설치

필수 조건

  • Python 3.6 이상
  • 히스토리 지원 셸(Bash, Zsh 등)

소스에서 설치

지엑스피1

용법

서버 시작

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 라이선스에 따라 라이선스가 부여되었습니다. 자세한 내용은 라이선스 파일을 참조하세요.

-
security - not tested
A
license - permissive license
-
quality - not tested

local-only server

The server can only run on the client's local machine because it depends on local resources.

MCP(모델 제어 프로토콜) 인터페이스를 통해 셸 명령 기록을 탐색, 검색 및 관리할 수 있는 강력한 도구입니다. 이 프로젝트를 사용하면 이전에 실행한 셸 명령에 쉽게 접근하고 검색하고 불러올 수 있습니다.

  1. 특징
    1. 설치
      1. 필수 조건
      2. 소스에서 설치
    2. 용법
      1. 서버 시작
      2. 커서와 함께 사용
    3. API 참조
      1. MCP 도구
      2. MCP 리소스
    4. 기여하다
      1. 특허

        Related MCP Servers

        • A
          security
          A
          license
          A
          quality
          This MCP server enables users to execute shell commands in the current iTerm2 session through integration with Claude Desktop, facilitating seamless command execution via the Model Context Protocol.
          Last updated -
          3
          514
          296
          TypeScript
          MIT License
          • Apple
        • A
          security
          A
          license
          A
          quality
          A secure shell command execution server implementing the Model Context Protocol (MCP). This server allows remote execution of whitelisted shell commands with support for stdin input.
          Last updated -
          1
          74
          Python
          MIT License
          • Apple
        • A
          security
          A
          license
          A
          quality
          A secure terminal execution server that enables controlled command execution with security features and resource limits via the Model Context Protocol (MCP).
          Last updated -
          1
          12
          1
          JavaScript
          MIT License
          • Apple
        • -
          security
          -
          license
          -
          quality
          A secure server that implements the Model Context Protocol (MCP) to enable controlled execution of authorized shell commands with stdin support.
          Last updated -
          Python

        View all related MCP servers

        ID: f4rg1dkjmw