Token导航 LogoToken导航TokenDH.com
MCP Histfile logo
开发工具stdio官方级别未说明来源级核验

MCP Histfile

MCP Server

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

工具数

0

提示词数

0

GitHub Stars

2

资源数

0
开发工具PythonClaudeClaudeCursor

安装说明

本站只整理中文说明和来源信息,不托管安装包,也不代用户安装。

作者 / 组织

rajpdus

提供方

rajpdus

最后核验

2026/5/18 03:34

快速接入

先看主来源和安装命令,再打开仓库或文档;下面只保留这个条目的关键接入事实。

命令预览

pip install -r requirements.txt

详细介绍

MCP命令历史记录

通过MCP(模型控制协议)界面探索、搜索和管理shell命令历史的强大工具。此项目允许您轻松访问、搜索和检索以前执行的shell命令。

特性

  • 命令历史访问:以编程方式访问shell命令历史记录
  • 强大的搜索功能:使用文本查询搜索命令历史记录
  • 最近的命令:快速检索最近执行的命令
  • MCP集成:与Cursor和其他MCP兼容工具无缝集成

安装

先决条件

  • Python 3.6或更高版本
  • 支持历史记录的shell(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

默认情况下,服务器将从中指定的位置读取shell历史记录 HISTFILE 环境变量,或回退到 ~/.bash_history.

与光标一起使用

服务器运行后,您可以在Cursor中使用以下MCP工具:

  1. 获取最近使用的命令:
   Please show me my most recent shell commands.
  1. 搜索命令历史记录:
   Please search my command history for 'git commit' and show me the results.
  1. 获取特定命令:

在搜索或列出最近的命令后,您可以通过其ID检索特定命令。

api参考

MCP工具

  • search_commands(query: str):在shell历史记录中搜索命令
  • get_recent_commands(limit: int = 10):从历史记录中获取最新命令
  • get_command(command_id: int):通过ID获取特定命令

MCP资源

  • history://recent/{limit}:获取最近的命令(HTTP端点)
  • history://search/{query}:搜索命令(HTTP端点)

贡献

欢迎投稿!请看 贡献.md 作为指导方针。

许可证

此项目根据MIT许可证获得许可-请参阅 许可证 文件以获取详细信息。

目录标签

目录标签

开发工具PythonClaudedeveloper-tools命令历史本地部署shell工具MCP集成开发效率

支持客户端

ClaudeCursor

接入字段

传输方式(transport,传输协议)

stdio

鉴权方式(authType,认证方式)

none

部署方式(deploymentType,部署类型)

local-only

工具数量(toolCount,工具数)

0

资源数量(resourceCount,资源数)

0

提示词数量(promptCount,提示词数)

0

权限和风险

stdiononelocal-only

接入前请确认传输方式、认证方式和部署位置,并根据实际工具能力限制访问范围。

安装前确认

不要直接授予不必要的文件、网络或账号权限;先核对安装命令和配置内容。

来源信息

继续浏览同类 MCP