Skip to main content
Glama
HasanJahidul

Terminal History MCP

by HasanJahidul

terminal-history-mcp

MCPize mcp.so terminal-history-mcp MCP server CI npm version License: MIT

Search your shell history (zsh / bash / fish) from Claude Code, Cline, Cursor, Zed, or any MCP client. Local-only. SQLite FTS5. Secret-redacted before storage.

demo

What you can ask

  • "When did I last ssh into the staging server?"

  • "Show recent failed commands."

  • "What did I run yesterday in /etc/nginx?"

  • "What's that long docker compose flag I used 3 weeks ago?"

  • "Show command chains around kubectl apply."

Related MCP server: ClaudeX

Install

npm install -g terminal-history-mcp
terminal-history-mcp index           # one-time backfill from existing history

(Or run from a clone: git clone … && npm install && npm run build && npm link.)

Wire to Claude Code

claude mcp add --scope user terminal-history -- terminal-history-mcp
claude mcp list

Wire to other MCP clients

Anywhere that takes a stdio MCP server config:

{
  "mcpServers": {
    "terminal-history": {
      "command": "terminal-history-mcp"
    }
  }
}

Connect via MCPize

Use this MCP server instantly with no local installation:

npx -y mcpize connect @HasanJahidul/terminal-history --client claude

Or connect at: https://mcpize.com/mcp/terminal-history

By default zsh/bash history files store only the command. To unlock recent_in_dir and failed_commands, install the shell hook:

terminal-history-mcp install-hook zsh    # or bash, or fish
exec $SHELL                              # reload

The hook appends pipe-delimited lines to ~/.terminal-history-mcp/extended.log. Reindex picks them up.

To inspect the snippet first:

terminal-history-mcp print-hook zsh

To remove:

terminal-history-mcp uninstall-hook zsh

Tools

Tool

What it does

search_history(query, limit)

FTS5 keyword + prefix match across all history

recent_in_dir(cwd, limit)

Last N commands in a working dir (needs hook)

failed_commands(since_ts_ms, limit)

Commands with non-zero exit (needs hook)

command_chains(query, window_ms, limit)

For each match, list commands within ±5 min

reindex

Re-parse history files + extended log

Privacy

Everything is local. The DB lives at ~/.terminal-history-mcp/history.db. Nothing is uploaded.

Secrets are scrubbed before insert. Detected patterns:

  • GitHub PATs (ghp_*, gho_*, …)

  • OpenAI keys (sk-*)

  • Slack tokens (xox[baprs]-*)

  • AWS access keys (AKIA…)

  • Authorization: Bearer/Basic <value>

  • X-*-Token: …, X-*-Key: …, X-*-Secret: … headers

  • Env vars containing TOKEN / KEY / SECRET / PASSWORD / API_KEY

  • CLI flags --token=…, --api-key …, -k …

  • URL basic-auth https://user:pass@host

  • JWTs (eyJ.*.*)

If you find a leak, please open an issue. To wipe and re-index after upgrading patterns:

rm ~/.terminal-history-mcp/history.db*
terminal-history-mcp index

Development

git clone https://github.com/hasanjahidul/terminal-history-mcp
cd terminal-history-mcp
npm install
npm run build
npm test

License

MIT — see LICENSE.

Available Tools

5 tools
command_chainsA
Read-onlyIdempotent

Read-only. For each command matching query, returns the commands run within a time window around it (default ±5 min) — surfacing multi-step sequences like cd → npm run build → deploy. Useful for reconstructing "how did I do X last time?". Returns up to limit chains, each a time-ordered list of command rows. Local index only.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of chains (one per anchor match) to return. Default 5.
queryYesFTS5 query identifying the anchor command(s). Same syntax as `search_history`.
window_msNoHalf-width of the time window around each match, in milliseconds. Default 300000 (±5 min).

Output Schema

ParametersJSON Schema
NameRequiredDescription
countNo
chainsNoEach chain is a time-ordered list of command rows around one anchor match.

TDQS

A4.5/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description starts with 'Read-only', matching annotations (readOnlyHint=true, destructiveHint=false). It also discloses that it returns time-ordered sequences and uses a local index only, providing full behavioral transparency beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (4 sentences), front-loaded with 'Read-only', includes an example sequence and a practical use case. Every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema (not shown but implied), the description need not detail return format. It covers behavior, use case, and limitations (local index), making it complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with parameter descriptions. The description adds context like default window and purpose but doesn't significantly enhance parameter semantics beyond what's already in the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it returns command chains around a query match, surfacing multi-step sequences. It distinguishes itself from siblings like search_history (which gives individual commands) and recent_in_dir (which shows recent commands).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It provides a clear use case: 'reconstructing how did I do X last time?'. While it doesn't explicitly exclude scenarios, the context of sibling tools implies when to use this vs. other search tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

failed_commandsA
Read-onlyIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of commands to return, newest first. Default 20.
since_ts_msNoOnly return commands with a timestamp at or after this epoch-millisecond value. Null/omitted = no lower bound.

Output Schema

ParametersJSON Schema
NameRequiredDescription
countNo
resultsNo

TDQS

A4.2/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Beyond annotations (readOnlyHint, idempotentHint, destructiveHint), the description adds behavioral details: the need for a shell hook, legacy behavior, ordering (newest first), and scope (local index only). No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is three sentences with no redundancy. Each sentence serves a purpose: stating the function, describing optional filtering, and listing constraints. It is front-loaded with the most critical information.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple list tool with two well-documented parameters, the description covers purpose, constraints, filtering, and prerequisites (shell hook). Output schema exists for return values. Minor gap: no mention of what happens if hook is missing, but that is acceptable.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% with clear descriptions. The description adds minor value by restating the filter option in prose ('optionally restrict to commands after a given epoch-millisecond timestamp') and mentioning ordering, but the schema already defines the parameters adequately.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool lists recent failed commands (non-zero exit) as a quick feed. It uses specific verb 'lists' and resource 'failed commands', and distinguishes from siblings like search_history by emphasizing its scope and immediacy.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides explicit usage context: read-only, requires shell hook for exit-code capture, legacy entries lack exit codes, and results are newest first and local index only. It doesn't explicitly name alternatives but implies when to use this tool.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

recent_in_dirA
Read-onlyIdempotent

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.

ParametersJSON Schema
NameRequiredDescriptionDefault
cwdYesAbsolute working-directory path to filter by, e.g. `/Users/me/code/myapp`. Matched exactly.
limitNoMaximum number of commands to return, newest first. Default 20.

Output Schema

ParametersJSON Schema
NameRequiredDescription
countNo
resultsNo

TDQS

A3.9/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations already indicate read-only, idempotent, non-destructive. Description adds prerequisite, limitation on legacy entries, return order (newest first with timestamps and exit codes), and scope (local index only). No contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, each adding key info: read-only status, purpose, prerequisite, limitation, output details. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given full schema coverage, annotations, and output schema, the description covers purpose, prerequisites, limitations, output order, and scope. Complete for a list tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema covers both parameters fully (100% coverage). Description adds no extra parameter-specific detail beyond output format (newest first, timestamps). Baseline 3 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it lists recent commands by working directory with a natural language example. Does not explicitly compare to siblings like search_history, but the specificity is sufficient for an agent to distinguish.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Describes when to use it (recall commands in a project directory) and mentions a prerequisite (shell hook) and limitation (legacy entries excluded). Does not explicitly say when not to use it or name alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

reindexA
Idempotent

Re-parses the local shell history files (~/.zsh_history, ~/.bash_history) and the hook's extended log into the SQLite index. Idempotent — already-indexed commands are skipped by hash, so it is safe to call repeatedly. Run it after a burst of shell activity to make recent commands searchable. Reads only local files; writes only to ~/.terminal-history-mcp/. Takes no arguments. Returns counts of parsed / inserted / skipped entries.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription
parsedNoHistory-file lines parsed this run.
skippedNoRows skipped because already indexed.
insertedNoNew rows added from history files.
ext_appliedNoExtended-log records merged into existing rows.
ext_insertedNoExtended-log records inserted as new rows.

TDQS

A4.8/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

The description reveals idempotency (already-indexed skipped by hash), safety for repeated calls, reads only local files, writes only to a specific directory, and returns counts. Annotations provide idempotentHint=true and destructiveHint=false, and the description adds specific behavioral details beyond annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (three sentences), front-loaded with the main action, and every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With zero parameters, an output schema (mentioned), and clear annotations, the description fully covers purpose, behavior, use case, and return value. No gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Input schema has no properties, and the description explicitly states 'Takes no arguments.' Schema coverage is 100%, so no additional parameter info needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool re-parses shell history files into a SQLite index. It distinguishes itself from sibling query tools by focusing on indexing, and it explicitly mentions idempotency and use case (after burst of shell activity).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly recommends running after a burst of shell activity to make recent commands searchable. It does not explicitly state when not to use it, but the sibling tools imply that this is for indexing rather than querying, providing sufficient context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_historyA
Read-onlyIdempotent

Read-only. Full-text search (SQLite FTS5, stemmed, Unicode-aware) over all indexed shell commands. Supports keyword and prefix queries — e.g. docker build, git reb*. Returns the most recent matches first, each with timestamp, shell, cwd, and exit code when available. Local index only; nothing is sent anywhere. If a query returns nothing you may need reindex first.

ParametersJSON Schema
NameRequiredDescriptionDefault
limitNoMaximum number of matching commands to return, newest first. Default 20.
queryYesFTS5 query. Plain keywords are ANDed; append `*` for prefix match. E.g. `npm install`, `kubectl get po*`.

Output Schema

ParametersJSON Schema
NameRequiredDescription
countNo
resultsNo

TDQS

A4.7/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Adds significant behavioral context beyond annotations: declares read-only, specifies search algorithm (FTS5, stemming, Unicode), result ordering, returned fields (timestamp, shell, cwd, exit code), and privacy guarantee (local index only). No contradictions with annotations.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with core action and key features. Every sentence adds essential information without redundancy. Efficiently covers purpose, usage, details, and fallback.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given full schema coverage, annotations, and output schema existence, the description is complete. It covers what the tool does, how to use it, what to expect in return, privacy, and relationship to sibling tool, leaving no gaps for an agent.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema already describes both parameters (100% coverage). Description adds value by explaining query syntax with examples and clarifying that prefix matching requires an asterisk, and by noting the default limit is 20 and results are newest first.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states it is a full-text search over indexed shell commands using SQLite FTS5. Specifies resource (shell history) and action (search), with details on stemming and Unicode-awareness. Differentiates from sibling 'reindex' by mentioning it as a fallback.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit examples of keyword and prefix queries, describes return fields and ordering, and advises when to use 'reindex' if no results. Does not explicitly compare to other sibling tools like command_chains or failed_commands, but context is sufficient.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections.

  1. 5 tool updatesv0.2.2
    • Changedcommand_chains5 fields changed
      • addedInput schema / additionalProperties
        Added value: +false
      • addedInput schema / properties / limit / description
        Added value: +"Maximum number of chains (one per anchor match) to return. Default 5."
      • addedInput schema / properties / query / description
        Added value: +"FTS5 query identifying the anchor command(s). Same syntax as `search_history`."
      • addedInput schema / properties / window_ms / description
        Added value: +"Half-width of the time window around each match, in milliseconds. Default 300000 (±5 min)."
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "chains": {
        +      "description": "Each chain is a time-ordered list of command rows around one anchor match.",
        +      "items": {
        +        "items": {
        +          "properties": {
        +            "cmd": {
        +              "description": "The command line as recorded (secrets already redacted at index time).",
        +              "type": "string"
        +            },
        +            "cwd": {
        +              "description": "Working directory the command ran in. Null for entries recorded before the hook was installed.",
        +              "type": [
        +                "string",
        +                "null"
        +              ]
        +            },
        +            "duration_ms": {
        +              "description": "Wall-clock duration in milliseconds, if the hook captured it.",
        +              "type": [
        +                "number",
        +                "null"
        +              ]
        +            },
        +            "exit_code": {
        +              "description": "Process exit code. Null when not captured.",
        +              "type": [
        +                "number",
        +                "null"
        +              ]
        +            },
        +            "shell": {
        +              "description": "`zsh`, `bash`, `fish`, or `ext` (entry enriched by the shell hook).",
        +              "type": "string"
        +            },
        +            "ts": {
        +              "description": "Epoch milliseconds when the command ran, or null if the shell did not record a timestamp.",
        +              "type": [
        +                "number",
        +                "null"
        +              ]
        +            }
        +          },
        +          "type": "object"
        +        },
        +        "type": "array"
        +      },
        +      "type": "array"
        +    },
        +    "count": {
        +      "type": "number"
        +    }
        +  },
        +  "type": "object"
        +}
    • Changedfailed_commands4 fields changed
      • addedInput schema / additionalProperties
        Added value: +false
      • addedInput schema / properties / limit / description
        Added value: +"Maximum number of commands to return, newest first. Default 20."
      • addedInput schema / properties / since_ts_ms / description
        Added value: +"Only return commands with a timestamp at or after this epoch-millisecond value. Null/omitted = no lower bound."
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "count": {
        +      "type": "number"
        +    },
        +    "results": {
        +      "items": {
        +        "properties": {
        +          "cmd": {
        +            "description": "The command line as recorded (secrets already redacted at index time).",
        +            "type": "string"
        +          },
        +          "cwd": {
        +            "description": "Working directory the command ran in. Null for entries recorded before the hook was installed.",
        +            "type": [
        +              "string",
        +              "null"
        +            ]
        +          },
        +          "duration_ms": {
        +            "description": "Wall-clock duration in milliseconds, if the hook captured it.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          },
        +          "exit_code": {
        +            "description": "Process exit code. Null when not captured.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          },
        +          "shell": {
        +            "description": "`zsh`, `bash`, `fish`, or `ext` (entry enriched by the shell hook).",
        +            "type": "string"
        +          },
        +          "ts": {
        +            "description": "Epoch milliseconds when the command ran, or null if the shell did not record a timestamp.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          }
        +        },
        +        "type": "object"
        +      },
        +      "type": "array"
        +    }
        +  },
        +  "type": "object"
        +}
    • Changedrecent_in_dir4 fields changed
      • addedInput schema / additionalProperties
        Added value: +false
      • addedInput schema / properties / cwd / description
        Added value: +"Absolute working-directory path to filter by, e.g. `/Users/me/code/myapp`. Matched exactly."
      • addedInput schema / properties / limit / description
        Added value: +"Maximum number of commands to return, newest first. Default 20."
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "count": {
        +      "type": "number"
        +    },
        +    "results": {
        +      "items": {
        +        "properties": {
        +          "cmd": {
        +            "description": "The command line as recorded (secrets already redacted at index time).",
        +            "type": "string"
        +          },
        +          "cwd": {
        +            "description": "Working directory the command ran in. Null for entries recorded before the hook was installed.",
        +            "type": [
        +              "string",
        +              "null"
        +            ]
        +          },
        +          "duration_ms": {
        +            "description": "Wall-clock duration in milliseconds, if the hook captured it.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          },
        +          "exit_code": {
        +            "description": "Process exit code. Null when not captured.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          },
        +          "shell": {
        +            "description": "`zsh`, `bash`, `fish`, or `ext` (entry enriched by the shell hook).",
        +            "type": "string"
        +          },
        +          "ts": {
        +            "description": "Epoch milliseconds when the command ran, or null if the shell did not record a timestamp.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          }
        +        },
        +        "type": "object"
        +      },
        +      "type": "array"
        +    }
        +  },
        +  "type": "object"
        +}
    • Changedreindex1 field changed
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "ext_applied": {
        +      "description": "Extended-log records merged into existing rows.",
        +      "type": "number"
        +    },
        +    "ext_inserted": {
        +      "description": "Extended-log records inserted as new rows.",
        +      "type": "number"
        +    },
        +    "inserted": {
        +      "description": "New rows added from history files.",
        +      "type": "number"
        +    },
        +    "parsed": {
        +      "description": "History-file lines parsed this run.",
        +      "type": "number"
        +    },
        +    "skipped": {
        +      "description": "Rows skipped because already indexed.",
        +      "type": "number"
        +    }
        +  },
        +  "type": "object"
        +}
    • Changedsearch_history4 fields changed
      • addedInput schema / additionalProperties
        Added value: +false
      • addedInput schema / properties / limit / description
        Added value: +"Maximum number of matching commands to return, newest first. Default 20."
      • changedInput schema / properties / query / description
        Previous value: -"Keywords to search. Supports prefix match."New value: +"FTS5 query. Plain keywords are ANDed; append `*` for prefix match. E.g. `npm install`, `kubectl get po*`."
      • changedOutput schema / (root)
        Previous value: -nullNew value: +{
        +  "properties": {
        +    "count": {
        +      "type": "number"
        +    },
        +    "results": {
        +      "items": {
        +        "properties": {
        +          "cmd": {
        +            "description": "The command line as recorded (secrets already redacted at index time).",
        +            "type": "string"
        +          },
        +          "cwd": {
        +            "description": "Working directory the command ran in. Null for entries recorded before the hook was installed.",
        +            "type": [
        +              "string",
        +              "null"
        +            ]
        +          },
        +          "duration_ms": {
        +            "description": "Wall-clock duration in milliseconds, if the hook captured it.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          },
        +          "exit_code": {
        +            "description": "Process exit code. Null when not captured.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          },
        +          "shell": {
        +            "description": "`zsh`, `bash`, `fish`, or `ext` (entry enriched by the shell hook).",
        +            "type": "string"
        +          },
        +          "ts": {
        +            "description": "Epoch milliseconds when the command ran, or null if the shell did not record a timestamp.",
        +            "type": [
        +              "number",
        +              "null"
        +            ]
        +          }
        +        },
        +        "type": "object"
        +      },
        +      "type": "array"
        +    }
        +  },
        +  "type": "object"
        +}
  2. 5 tool updates
    • First observedcommand_chains
    • First observedfailed_commands
    • First observedrecent_in_dir
    • First observedreindex
    • First observedsearch_history

TDQS

A4.2/5.0

Scored across 5 tools

Disambiguation5/5

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.

Naming Consistency3/5

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.

Tool Count5/5

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.

Completeness4/5

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.

Maintenance

ActivityInactive
ResponsivenessUnresponsive

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    A powerful tool for exploring, searching, and managing your shell command history through the MCP (Model Control Protocol) interface. This project allows you to easily access, search, and retrieve your previously executed shell commands.
    2
    MIT
  • A
    license
    A
    quality
    B
    maintenance
    Persistent memory + FTS5 full-text search for Claude Code conversation history. Indexes ~/.claude/projects/ JSONL into SQLite, exposes 10 MCP tools (store/recall/search memories, browse sessions, get summaries) plus prompts. Includes a web UI for visual exploration
    10
    42 npm
    93
    MIT
  • A
    license
    A
    quality
    D
    maintenance
    Inspect, manage, and kill local dev servers via MCP. Stop guessing what's on :3000. Five tools: list servers with framework detection, inspect ports, find zombies, diagnose conflicts, safe-kill with dry-run default. Local, no cloud, no telemetry.
    5
    10 npm
    3
    MIT