Skip to main content
Glama

terminal-reader-mcp

An MCP server that gives Claude Desktop read-only access to your terminal output. No more copy-pasting errors — just ask Claude to check your terminal.

Quickstart

1. Clone and install

git clone https://github.com/chrisvin-jabamani/terminal-reader-mcp.git
cd terminal-reader-mcp
npm install

2. Add the cap function to your shell

The MCP server can only read files — it can't see your terminal directly. The cap function wraps your commands and saves their output to a log file that Claude can read.

Open your shell config:

open ~/.zshrc

Paste this at the bottom:

# Capture terminal output for Claude
cap() {
  local log_file="$HOME/.terminal_history.log"
  local exit_code
  
  echo "---CMD---" >> "$log_file"
  echo "$ $*" >> "$log_file"
  echo "---OUTPUT---" >> "$log_file"
  
  "$@" 2>&1 | tee -a "$log_file"
  exit_code=${pipestatus[1]}
  
  echo "" >> "$log_file"
  echo "---EXIT:$exit_code---" >> "$log_file"
  echo "---END---" >> "$log_file"
  
  return $exit_code
}

Save, then reload:

source ~/.zshrc

3. Configure Claude Desktop

Open the config:

open ~/Library/Application\ Support/Claude/claude_desktop_config.json

Add the terminal-reader server:

{
  "mcpServers": {
    "terminal-reader": {
      "command": "node",
      "args": ["/FULL/PATH/TO/terminal-reader-mcp/index.js"]
    }
  }
}

Replace /FULL/PATH/TO/ with where you cloned the repo.

4. Restart Claude Desktop

Quit completely (Cmd+Q) and reopen.

5. Test it

cap echo "hello from terminal"

Ask Claude: "what was my last terminal command?"


Related MCP server: Tmux MCP Server

Usage

Prefix commands with cap when you want Claude to see them:

cap npm run dev
cap python script.py
cap cargo build

Commands without cap are not captured.

Install Server
F
license - not found
A
quality
D
maintenance

Maintenance

Maintainers
Response time
Release cycle
Releases (12mo)
Commit activity

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Servers

  • A
    license
    A
    quality
    F
    maintenance
    Enables Claude Desktop to interact with and view tmux session content, allowing AI assistants to read from, control, and observe terminal sessions.
    13
    569
    297
    MIT
  • A
    license
    -
    quality
    D
    maintenance
    Monitors development commands and exposes terminal output to Claude in real-time, allowing AI assistants to see errors, logs, and stack traces without copy-pasting.
    6
    3
    MIT
  • A
    license
    -
    quality
    C
    maintenance
    A VSCode and Cursor extension that captures real-time terminal output and exposes it to AI assistants via the Model Context Protocol. It enables agents to proactively monitor logs, command execution, and errors without requiring manual copy-pasting from the user.
    3
    MIT

View all related MCP servers

Related MCP Connectors

  • Persistent context for Claude. Your AI always knows your projects and next actions across sessions.

  • Let ChatGPT, Claude & Cursor use your Mac: email, calendar, iMessage, Teams, files. Local, free.

  • Read and write your Fresh Jots notes from Claude, Cursor, and any MCP client.

View all MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/chrisvin-jabamani/terminal-reader-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server