Terminal Reader MCP

Terminal Reader MCP

Enables Claude Desktop to read terminal command output by capturing commands prefixed with 'cap' to a log file. Eliminates the need to copy-paste terminal errors and output when asking Claude for help.

Category
Visit Server

README

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?"


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.

Recommended Servers

playwright-mcp

playwright-mcp

A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.

Official
Featured
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.

Official
Featured
Local
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.

Official
Featured
Local
TypeScript
VeyraX MCP

VeyraX MCP

Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.

Official
Featured
Local
Kagi MCP Server

Kagi MCP Server

An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.

Official
Featured
Python
graphlit-mcp-server

graphlit-mcp-server

The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.

Official
Featured
TypeScript
Qdrant Server

Qdrant Server

This repository is an example of how to create a MCP server for Qdrant, a vector search engine.

Official
Featured
Neon Database

Neon Database

MCP server for interacting with Neon Management API and databases

Official
Featured
Exa Search

Exa Search

A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.

Official
Featured
E2B

E2B

Using MCP to run code via e2b.

Official
Featured