# @master4n/master-cli [Health: Active]

**Category:** 🖥️ Command Line  
**Repository:** https://github.com/Master4Novice/master-cli  
**GitHub Stars:** 0  
**Views:** 0  
**Installs:** 0  
**Upvotes:** 0  
**Directory Page:** https://allmcps.com/mcp/master4n-master-cli

## Description
AI-agent-friendly command-line toolkit: timestamp/date conversion, JWT decoding, port killing, file finding, and directory trees — headless, --json, with a self-describing manifest and a built-in MCP server (mfn mcp).

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

```json
"mcpServers": {
  "master-cli": {
    "command": "npx",
    "args": ["-y","@master4n/master-cli"]
  }
}
```

## Documentation

## What @master4n/master-cli does

@master4n/master-cli packages 51 headless command-line utilities under the `mfn` executable and makes the same catalog available over Model Context Protocol. The toolkit covers four practical areas: reducing context by extracting selected file or JSON content, performing deterministic calculations and conversions, inspecting local projects and system state, and carrying out bounded actions such as waiting for a service or freeing a port.

Commands include JSON path extraction, schema inference, line and symbol inspection, structured diffs, dependency checks, repository status, disk and process information, port discovery, URL and JWT decoding, semver and cron operations, timezone conversion, regular-expression testing, encoding and escaping, HTTP probing, file replacement, directory search, and tree generation. OS-oriented commands also cover clipboard access, notifications, opening validated paths or URLs, DNS lookups, reversible trash operations, and process searches.

## How it works

The MCP entry point is `mfn mcp`, which uses stdio transport and requires no additional MCP dependency. It exposes three tools:

- `mfn_capabilities` returns the machine-readable command manifest.
- `mfn_help` returns flags and help for an individual command.
- `mfn_run` accepts a command name and an argument array, then returns that command's JSON result.

The MCP layer deny-lists `update`, preventing an MCP-only client from installing packages through the self-update command. Running `mfn mcp --json` describes the server without starting it.

The underlying CLI accepts flags or piped input and can emit JSON explicitly with `--json`; non-TTY use also produces machine-readable output. Successful responses use an `ok: true` object, while failures use `ok: false` with an error and message. Exit status `0` indicates success, `1` a runtime failure, and `2` invalid usage. Logs, banners, and spinners are sent to stderr so stdout remains suitable for parsing.

## Setup and configuration

Install the package globally with:

```sh
npm install -g @master4n/master-cli
```

This adds the `mfn` command. For one-off or agent use, run it without a global installation:

```sh
npx -y @master4n/master-cli capabilities --json
```

Configure an MCP client with a stdio server entry such as:

```json
{
  "mcpServers": {
    "mfn": {
      "command": "npx",
      "args": ["-y", "@master4n/master-cli@latest", "mcp"]
    }
  }
}
```

The repository also includes an equivalent `.mcp.json`. The package ships `llms.txt` with the agent contract and an Agent Skill at `skills/mfn/SKILL.md` containing the command catalog, output rules, examples, and usage notes.

## Tools and capabilities

The command catalog is designed for narrow, single-purpose operations rather than returning large raw inputs. Examples include:

- Read one JSON value, infer a JSON shape, extract exact line ranges, or list source symbols.
- Calculate with BigInt-safe arithmetic, convert bases, compare or bump semantic versions, and explain cron schedules.
- Convert epoch values and timezones, inspect URLs, test regex groups, decode JWT headers and payloads, and apply context-specific escaping.
- Inspect ports, processes, files, repositories, dependencies, environment files, and disk usage.
- Find files, build directory trees, probe HTTP endpoints, wait for readiness, replace text with a dry-run default, and move files to the system trash.

## Limitations and notes

The MCP transport is stdio, so the client must launch the command and communicate over standard input and output. Local system commands can inspect or affect the machine where `mfn` runs. Replacement is dry-run by default, while the trash command is designed for reversible deletion. JWT decoding reports header, payload, and expiry information but does not verify the token signature. Strict parsing rejects unknown commands, flags, and missing arguments rather than treating them as successful calls.

_Full upstream README: https://allmcps.com/mcp/master4n-master-cli/readme_

