bash-history

Provides access to bidirectional bash history from Claude Code via AtuIn, including search and recent history with timestamps and exit codes.
  • javascript

3

GitHub Stars

javascript

Language

6 months ago

First Indexed

2 months ago

Catalog Refreshed

Documentation & install

Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.

Installation

Add the following to your MCP client configuration file.

Configuration

View docs
{
  "mcpServers": {
    "nitsanavni-bash-history-mcp": {
      "command": "bunx",
      "args": [
        "github:nitsanavni/bash-history-mcp",
        "mcp"
      ]
    }
  }
}

You can query and read your AtuIn-based bash history from Claude Code through a dedicated MCP server. This server lets Claude request your history, search for commands, and incorporate rich context like timestamps and exit codes into its responses.

How to use

You set up a local MCP server that Claude Code can talk to. Once configured, you can useClaude to query your bash history with two main capabilities: searching for commands that match a pattern and retrieving recent commands with timestamps and exit codes. Use these tools to speed up revisiting past workflows, learning from command usage, and reproducing successful command lines across sessions.

How to install

Prerequisites you need before installation are: atuin installed and configured, and Bun installed.

bun pm cache rm
mkdir -p ~/.claude
touch ~/.claude/settings.json

Configure Claude Code to use the MCP server by adding the following to your Claude Code settings. This registers a local runtime that Claude can invoke to reach your history data.

{
  "mcpServers": {
    "bash-history": {
      "type": "stdio",
      "command": "bunx",
      "args": ["github:nitsanavni/bash-history-mcp", "mcp"]
    }
  }
}

If you already have other MCP servers configured, merge this entry with your existing configuration so Claude can keep all endpoints in one place. Here is an example of merging without losing other hooks or servers:

{
  "mcpServers": {
    "bash-history": {
      "type": "stdio",
      "command": "bunx",
      "args": ["github:nitsanavni/bash-history-mcp", "mcp"]
    }
    // ... your other MCP servers
  }
}

Alternatively, you can register the MCP server from the command line:

claude mcp add -s user bash-history bunx -- github:nitsanavni/bash-history-mcp mcp

Additional setup notes

After you complete the setup, restart Claude Code and start using it to query history. You can verify the MCP integration by running a few bash commands in Claude Code and then checking the history from your local AtuIn store.

Troubleshooting and tips

If the hook or MCP connection isn’t working, enable debugging in Claude and check the logs for hook execution messages. You should also verify that the MCP entry exists in your settings and that the Bun runtime can reach the npm package you referenced.

To test the MCP integration manually, confirm you can invoke the MCP via the configured command and that it returns history data when Claude asks for it.

Security and notes

The MCP server only reads history data and does not modify your history store. Ensure you keep AtuIn synced and backed up if you rely on cross-machine history. Only run this integration with trusted environments.

Available tools

search_history

Search for commands matching a pattern with an optional limit to constrain results.

get_recent_history

Fetch recent commands with timestamps and exit codes, up to an optional limit.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational