Shell Command History MCP lets an assistant search and retrieve a selected local shell-history file through FastMCP tools.
Shell Command History MCP lets an assistant search and retrieve a selected local shell-history file through FastMCP tools.
The implementation exposes search_commands, get_recent_commands and get_command. It reads the selected shell-history file and returns command records for an assistant to inspect. It is a retrieval interface; those tools do not execute the returned command text.
The source defines a FastMCP object but does not call its run method. The README's bare Python command therefore is not a complete serving entry point. Use the SDK CLI to load the file as a stdio server, with a compatible SDK version for the source's FastMCP import. The setup below pins that import-compatible SDK generation.
HISTFILE selects the source; the implementation falls back to a Bash history path. Start with a small synthetic history file and compare search results with its lines. Shell formats differ, and fallback timestamps should not be treated as the original execution time. History can contain credentials and private commands, so expose only the file intended for the task.
Check the linked publisher documentation and your connected client's tool list. Names and availability can vary with the server version and account permissions.
| Tool | What it does |
|---|---|
| search_commands | Search stored shell command text. |
| get_recent_commands | Retrieve recent command records. |
| get_command | Retrieve a command record by its identifier. |
{
"mcpServers": {
"shell-history": {
"command": "uv",
"args": [
"run",
"--with",
"mcp[cli]<2",
"mcp",
"run",
"/ABSOLUTE_PATH/mcp-histfile/mcp_history_server.py"
],
"env": {
"HISTFILE": "/ABSOLUTE_PATH/test-history.txt"
}
}
}
}Python 3.10 or later, uv, an SDK version compatible with the source’s FastMCP import and the intended history file.
| Variable | Description | Required |
|---|---|---|
| HISTFILE | Path of the intended history file. Use a synthetic file for a first trial. | Optional |
Read, search and edit files inside allowed directories with the Model Context Protocol reference Filesystem server.
Retrieve version-aware library documentation and code examples with Context7 MCP, using resolve-library-id and query-docs.
Use Microsoft’s Playwright MCP server to navigate pages, inspect accessibility snapshots, fill forms and capture browser screenshots.
Connect GitHub MCP to repositories, issues and pull requests with GitHub’s hosted service or a locally run server.
Use the Supabase MCP server to inspect database schemas, query project data and retrieve docs through a project-scoped connection.
Search Linear issues and projects, inspect work context and manage updates through Linear’s hosted MCP server with OAuth.