Terminal History MCP
Server Configuration
Describes the environment variables required to run the server.
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Instructions
Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.
This server publishes no instructions, or was last inspected before Glama recorded them.
Capabilities
Features and capabilities supported by this server
Protocol revision2025-11-25
| Capability | Details |
|---|---|
| tools | {} |
Tools
Functions exposed to the LLM to take actions
| Name | Description |
|---|---|
| reindexA | Re-parses the local shell history files ( |
| search_historyA | Read-only. Full-text search (SQLite FTS5, stemmed, Unicode-aware) over all indexed shell commands. Supports keyword and prefix queries — e.g. |
| recent_in_dirA | Read-only. Lists the most recent commands that were run with a given working directory — answers "what was I doing in this project?". Requires the shell hook to have been installed (legacy entries have no cwd and won't appear). Returns newest first with timestamps and exit codes. Local index only. |
| failed_commandsA | Read-only. Lists recent commands that exited non-zero — a quick "what just broke?" feed. Optionally restrict to commands after a given epoch-millisecond timestamp. Requires the shell hook for exit-code capture (legacy entries have no exit code). Newest first. Local index only. |
| command_chainsA | Read-only. For each command matching |
Prompts
Interactive templates invoked by user choice
| Name | Description |
|---|---|
No prompts | |
Resources
Contextual data attached and managed by the client
| Name | Description |
|---|---|
No resources | |
TDQS
Scored across 5 tools
Each tool has a clearly distinct purpose: command_chains finds related sequences, failed_commands lists failures, recent_in_dir shows commands in a directory, reindex manages the index, and search_history does full-text search. There is no overlap.
Tool names use snake_case but vary in pattern: command_chains and recent_in_dir are noun phrases, failed_commands is adjective+noun, while reindex and search_history are verbs. This mixing reduces predictability.
With 5 tools, the server is well-scoped for querying and managing terminal history. Each tool serves a specific need without being excessive or insufficient.
The tool surface covers major query types (search, chains, failures, directory context) and index maintenance. A minor gap is the lack of a tool to directly retrieve a single command by ID, but it's not essential for common use cases.