💡I recommend to clear history before using it like: "history -c"
shell-history-mcp-server bridges your shell history and AI assistants using the Model Context Protocol (MCP). It reads shell commands from ZSH, then lets AI agents query them through structured function calls
Functions:
shell_history: Returns shell history commands
Prompt:
On which project did I work today ?
Output:
- You should see a tool call to the Shell History before output is generated
- Clone the project
$ git clone https://github.com/quentinchampenois/shell-history-mcp-server.git
$ cd shell-history-mcp-server- Build the server
$ go mod tidy
$ go build -o shell-history-mcp-server💡 Binary shell-history-mcp-server must be present in $PATH to be callable
🚀 MCP Server is ready to use ! But how ?
If you try to run it directly $ ./shell-history-mcp-server process will run but nothing happens, and it's the expected behaviour.
Package @modelcontextprotocol/inspector starts a WebUI to test directly your MCP server, test output based on provided input.
- Node
Start inspector as following
$ npx @modelcontextprotocol/inspector shell-history-mcp-serverAccess WebUI at http://localhost:6274/?MCP_PROXY_AUTH_TOKEN=<GENERATED_TOKEN>
In this example we will use Cherry Studio as client and model qwen3-235b-a22b-instruct-2507 from Scaleway provider.
- Configure account on Scaleway and generate API token (~5 minutes)
- Cherry studio installed
Open Cherry Studio and configure the Scaleway provider:
Configure the MCP server just installed:
Start a new chat with MCP
🚀 Once Cherry studio let's give a try with a basic prompt, example: "Which scripts I am using ?"
- Source Cherry studio: https://github.com/CherryHQ/cherry-studio
- Source Scaleway AI (Generative API): https://www.scaleway.com/en/docs/generative-apis/quickstart/
- Go MCP SDK: https://github.com/modelcontextprotocol/go-sdk/tree/main
- MCP Inspector: https://modelcontextprotocol.io/docs/tools/inspector





