Sage logo

Sage

by PsYcGoD

Local-first shell wrapper that compresses terminal output, stores history, and optionally exposes command workflows through MCP.

Install Sage

Pick your client, then add it in one click or paste the config.

STDIONode.js
~/Library/Application Support/Claude/claude_desktop_config.json
claude_desktop_config.json
{
  "mcpServers": {
    "psycgod-sage": {
      "command": "npx",
      "args": [
        "-y",
        "psycgod-sage"
      ]
    }
  }
}

Settings → Developer → Edit Config, merge this into mcpServers, then fully quit and reopen Claude Desktop.

Install not yet sandbox-tested— we haven't run this command through our automated sandbox yet. Not a red flag; we're working through the catalog.

Overview

PsYcGoD/sage wraps local shell commands for AI coding agents, preserving raw output on the machine while returning compact summaries. Its CLI supports command execution, history, context reports, failed-command explanations, fix suggestions, and optional automatic fixes. Install it through PyPI or npm, run `sage install`, and use `sage run -- <command>` when terminal output would otherwise consume agent context. Reach for it when local privacy, command history, and reduced terminal noise matter more than direct MCP activation.

Use cases

  • Wrap test and build commands for coding agents
  • Compress noisy terminal output before it reaches an agent
  • Review recent command history and context savings
  • Explain failed commands and suggest follow-up fixes
  • Route commands from a known project directory

Key features

  • Local shell command wrapper
  • Compressed terminal summaries
  • Local command history
  • Context and compression reports
  • Failed-command explanations and fix suggestions
  • Optional manual MCP configuration

Security & health

What it can reach and how reliably it runs — from our own checks, not the maintainer’s claims.

ActiveLast checked 1d ago

Recent health check succeeded.

17/18 checks healthy over the last 79d

Supply-chain signal

No high-severity advisories surfaced by our automated scan.

Critical 0High 0Medium 0Low 0

Scanned 8d ago via OSV.dev · psycgod-sage (npm)

Adoption & maintenance

Factual signals from GitHub, npm, and our automated checks — not a rating.

GitHub stars11Stargazers on the source repository.
npm downloads292Package downloads in the last 30 days.
Last commit7d agoMost recent push to the default branch.
Directory activity6 viewsConfig copies, upvotes, and views on AllMCPs.

How Sage works

What PsYcGoD/sage does

PsYcGoD/sage is a local-first command wrapper for AI coding workflows. It places SAGE between an agent and the shell: commands run locally, complete terminal output is retained locally, and the agent receives a compressed result intended to emphasize useful output over repetitive logs. The project also records command history, compression evidence, retry context, and related local metrics.

The package can be used from ordinary terminal sessions, CI scripts, or supported coding agents. It is distributed through both PyPI and npm; the npm package launches the Python implementation, so both installation routes use the same local behavior and database.

How it works

Install the package, then run sage install once. That activation step updates or repairs supported local agent instructions and checks whether activation succeeded. New agent sessions can then be directed to route terminal work through SAGE. Existing sessions should be restarted so they reload the instructions.

The primary execution form is:

text
sage run -- <command>

SAGE executes the command, saves its raw output locally, and returns a shorter summary. Shortcuts such as sage pytest, sage npm test, and sage git status map to the same wrapper. When the host starts in the wrong directory, sage run --cwd /project -- <command> supplies an explicit workspace.

MCP support is optional and manual rather than automatically enabled by package installation. The project includes an sage mcp install command for MCP configuration, while normal CLI execution remains the default path.

Setup and configuration

Install with either package manager:

Terminal
pip install psycgod-sage
sage install

or:

Terminal
npm install -g psycgod-sage
npx -y psycgod-sage install

After activation, verify the setup with sage doctor --activation. Useful commands include sage context stats for a savings summary, sage context report for a fuller compression report, and sage history --limit 10 for recent commands.

The SAGE_WORKSPACE_CWD setting can define the workspace directory for host integrations. An explicit --cwd argument is available when a single invocation needs a different project location.

Tools and capabilities

  • Execute arbitrary shell commands through sage run --.
  • Keep raw terminal output and command history on the local machine.
  • Return compressed terminal summaries to reduce repeated log context.
  • Report context and compression statistics.
  • Explain the latest failed command and suggest a next fix.
  • Attempt an automatic fix with sage fix --apply.

Limitations and notes

Package installation does not activate SAGE automatically; sage install is required. Host applications that disable shell tools prevent SAGE from enabling them. MCP may disconnect in some stdio agent sessions, so the regular CLI wrapper is the recommended default when that occurs.

Local-only mode sends nothing away from the machine. Optional debug telemetry can send redacted diagnostic summaries only when explicitly enabled. The project is licensed under MIT.

Reviews

No reviews yet — be the first to share how it worked for you.

Frequently Asked Questions about Sage

PsYcGoD/sage is an MCP server that connects AI coding agents to local shell workflows through SAGE. Its main tools and commands run terminal tasks, compress their output, retain command history, report context savings, explain failures, suggest fixes, and optionally apply fixes while keeping raw logs on the machine.

Install `psycgod-sage` with PyPI or npm, then run `sage install` once. For Python, use `pip install psycgod-sage`; for npm, use `npm install -g psycgod-sage` followed by `npx -y psycgod-sage install`. MCP configuration is optional and can be initiated with `sage mcp install`.

Run `sage run -- <command>` to execute a shell command through SAGE. Shortcuts such as `sage pytest`, `sage npm test`, and `sage git status` are also supported. Use `sage run --cwd /project -- <command>` when the command must run from a specific workspace.

Yes, PsYcGoD/sage supports Cursor after activation. Run `sage install`, restart existing Cursor sessions, and route terminal commands through SAGE. If Cursor starts in the wrong directory, use `--cwd` or configure `SAGE_WORKSPACE_CWD`.

No, local-only mode sends nothing away from the machine. Raw command output, prompts, source code, credentials, and project files remain local unless a user deliberately enables a feature that requires sending data. Optional debug telemetry sends only redacted diagnostic summaries when opted in.

Related MCP servers

Add a badge to your READMEShow it’s listed — live SVG, Markdown or HTML.

AllMCPs Directory Badge

Full Badge Customizer

Showcase your server listing on GitHub or your project documentation. Embed this dynamic SVG badge to highlight official listing status and live engagement.

Badge Style:
Live Dynamic SVG PreviewSage AllMCPs Directory Badge
Markdown (GitHub README)
[![AllMCPs](https://allmcps.com/api/badge/psycgod-sage?style=directory)](https://allmcps.com/mcp/psycgod-sage)
HTML Embed
<a href="https://allmcps.com/mcp/psycgod-sage"><img src="https://allmcps.com/api/badge/psycgod-sage?style=directory" alt="Sage on AllMCPs" /></a>