# PsYcGoD/sage [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/PsYcGoD/sage  
**GitHub Stars:** 10  
**npm Downloads (last month):** 402  
**Views:** 5  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/psycgod-sage

## Description
Local-first CLI and MCP wrapper for AI coding agents. Routes shell commands through sage run --, stores command history locally, and returns compressed terminal output to reduce context noise.

## Claude Desktop Quick Installation
Install path detected from listing signals. Uses `npx` (confidence: high):

```json
"mcpServers": {
  "sage": {
    "command": "npx",
    "args": ["-y","psycgod-sage"]
  }
}
```

## Documentation

## What PsYcGoD/sage MCP server does

PsYcGoD/sage MCP server provides a local-first command wrapper for coding agents and ordinary terminal workflows. Commands run through `sage run -- <command>`; SAGE stores the complete terminal output locally and gives the agent a shorter result intended to preserve useful errors, summaries, and status information without placing every log line in the conversation.

The package also keeps local command history, retry context, and compression proof data. Its command-line interface includes shortcuts such as `sage pytest`, `sage npm test`, and `sage git status`, which are treated as wrapped commands. Additional commands expose context statistics, reports, recent history, failed-command explanations, suggested fixes, and an optional automatic fix attempt.

## How it works

Install the Python package from PyPI or the npm package that launches the Python implementation. Installation does not activate the workflow automatically. Run `sage install` once to connect the machine, repair or add supported agent instructions, and verify activation. Existing agent sessions may need to be restarted before they load those instructions.

After activation, an agent can route noisy shell work through SAGE. The raw result stays on the user's machine while the returned output is compressed for agent consumption. The local database records command history and context-saving measurements. Local-only mode requires no login and sends nothing away from the machine.

Connected proof mode is optional. When enabled, it sends aggregate counters and proof metrics rather than raw logs. Debug telemetry is also optional and uses redacted diagnostic summaries when explicitly enabled. SAGE is not automatically enabled as MCP during package installation; MCP configuration is a separate, manual option.

## Setup and configuration

The documented Python setup is:

```bash
pip install psycgod-sage
sage install
sage run -- python -m pytest
```

The npm-based setup is:

```bash
npm install -g psycgod-sage
npx -y psycgod-sage install
npx -y psycgod-sage run -- npm test
```

Use `sage doctor --activation` to check activation. Host integrations can specify a working directory with `sage run --cwd /project -- <command>`. The documented `SAGE_WORKSPACE_CWD` setting can also address hosts that start shells in the wrong folder, though the provided material does not define additional configuration variables.

## Tools and capabilities

PsYcGoD/sage MCP server supports these documented CLI operations:

- Wrap arbitrary shell commands with `sage run --`.
- Run commands in an explicit workspace using `--cwd`.
- View token-saving statistics with `sage context stats`.
- Generate a full compression report with `sage context report`.
- Inspect recent commands with `sage history --limit 10`.
- Explain or suggest fixes for the latest failed command.
- Attempt an automatic fix with `sage fix --apply`.
- Install optional ML V2 dependencies with `sage ml setup`.
- Configure MCP manually with `sage mcp install`.
- Start the local dashboard with `sage dashboard start`.

The README identifies compatibility with Claude Code, Codex, Cursor, Windsurf, OpenCode, Cline, custom agents, CI scripts, and normal terminal use. The supplied material does not describe a separate list of MCP tool names.

## Limitations and notes

PsYcGoD/sage MCP server cannot enable shell tools that a host application has disabled. MCP may disconnect in some stdio agent sessions, so the project recommends using normal `sage run -- <command>` by default and enabling MCP manually only when needed. Package installation is intentionally passive, meaning activation always requires a separate `sage install` step.

Raw prompts, source code, credentials, raw command output, and project files are intended to remain local unless a user deliberately enables a feature that sends data. Connected proof mode requires machine authentication and transmits aggregate proof metrics. The project is licensed under MIT.

_Full upstream README: https://allmcps.com/mcp/psycgod-sage/readme_

