@master4n/master-cli 3.0.3 → 3.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +24 -2
- package/SECURITY.md +1 -1
- package/bin/commands/index.d.ts +2 -1
- package/bin/commands/mcp.d.ts +7 -0
- package/bin/index.js +6 -6
- package/bin/index.js.map +1 -1
- package/bin/utility/mcp-server.d.ts +3 -0
- package/bin/utility/mcp-tools.d.ts +55 -0
- package/llms.txt +9 -3
- package/package.json +6 -3
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
/** Commands an MCP client may not invoke. */
|
|
2
|
+
export declare const DENYLIST: Record<string, string>;
|
|
3
|
+
export declare const RUNNABLE: string[];
|
|
4
|
+
export declare const TOOLS: ({
|
|
5
|
+
name: string;
|
|
6
|
+
description: string;
|
|
7
|
+
inputSchema: {
|
|
8
|
+
type: string;
|
|
9
|
+
properties: {
|
|
10
|
+
command?: undefined;
|
|
11
|
+
args?: undefined;
|
|
12
|
+
};
|
|
13
|
+
additionalProperties: boolean;
|
|
14
|
+
required?: undefined;
|
|
15
|
+
};
|
|
16
|
+
} | {
|
|
17
|
+
name: string;
|
|
18
|
+
description: string;
|
|
19
|
+
inputSchema: {
|
|
20
|
+
type: string;
|
|
21
|
+
properties: {
|
|
22
|
+
command: {
|
|
23
|
+
type: string;
|
|
24
|
+
description: string;
|
|
25
|
+
enum: string[];
|
|
26
|
+
};
|
|
27
|
+
args: {
|
|
28
|
+
type: string;
|
|
29
|
+
items: {
|
|
30
|
+
type: string;
|
|
31
|
+
};
|
|
32
|
+
description: string;
|
|
33
|
+
};
|
|
34
|
+
};
|
|
35
|
+
required: string[];
|
|
36
|
+
additionalProperties: boolean;
|
|
37
|
+
};
|
|
38
|
+
} | {
|
|
39
|
+
name: string;
|
|
40
|
+
description: string;
|
|
41
|
+
inputSchema: {
|
|
42
|
+
type: string;
|
|
43
|
+
properties: {
|
|
44
|
+
command: {
|
|
45
|
+
type: string;
|
|
46
|
+
description: string;
|
|
47
|
+
enum?: undefined;
|
|
48
|
+
};
|
|
49
|
+
args?: undefined;
|
|
50
|
+
};
|
|
51
|
+
required: string[];
|
|
52
|
+
additionalProperties: boolean;
|
|
53
|
+
};
|
|
54
|
+
})[];
|
|
55
|
+
export declare function callTool(name: string, input: any): Promise<Record<string, unknown>>;
|
package/llms.txt
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @master4n/master-cli (`mfn`)
|
|
2
2
|
|
|
3
|
-
>
|
|
3
|
+
> 51 headless, JSON-first commands for AI agents and developers: extract instead
|
|
4
4
|
> of dump (token savers), compute instead of guess (hallucination killers),
|
|
5
5
|
> one-call system/code/network facts, and cross-platform OS actions (clipboard,
|
|
6
6
|
> notifications, trash, processes). Every command behaves identically for a
|
|
@@ -12,6 +12,11 @@
|
|
|
12
12
|
global install; with it installed, the binary is `mfn`.
|
|
13
13
|
- **Discover commands:** `mfn capabilities --json` returns the full manifest
|
|
14
14
|
(`{ name, version, bin, conventions, docs, categories, commands:[{name,category,summary,examples}] }`).
|
|
15
|
+
- **MCP server built in:** `mfn mcp` serves every command over the Model Context
|
|
16
|
+
Protocol (stdio) for MCP-only clients — tools `mfn_capabilities`, `mfn_run`
|
|
17
|
+
`{command, args[]}`, `mfn_help`; `update` is deny-listed. Client config:
|
|
18
|
+
`{ "command": "npx", "args": ["-y", "@master4n/master-cli", "mcp"] }`.
|
|
19
|
+
`mfn mcp --json` describes the server without starting it.
|
|
15
20
|
- **Machine output:** pass `--json`, OR just pipe the command (when stdout is not
|
|
16
21
|
a TTY the CLI auto-emits JSON). Output is exactly one object on stdout:
|
|
17
22
|
success → `{ "ok": true, ... }`, failure → `{ "ok": false, "error", "message" }`.
|
|
@@ -109,8 +114,9 @@
|
|
|
109
114
|
|
|
110
115
|
## Guardrails (always on — there are no bypass flags)
|
|
111
116
|
|
|
112
|
-
- File-content commands (`lines` `json` `schema` `diff` `freq` `regex -f`)
|
|
113
|
-
credential/secret paths (`~/.ssh`, `.env*`, `*.pem`, `.npmrc`, …)
|
|
117
|
+
- File-content commands (`lines` `json` `schema` `diff` `freq` `regex -f`) and
|
|
118
|
+
`hash -f` refuse credential/secret paths (`~/.ssh`, `.env*`, `*.pem`, `.npmrc`, …)
|
|
119
|
+
→ `SensitivePath`, exit 2 (a digest of a secrets file is offline-brute-forceable).
|
|
114
120
|
- `clip` read redacts secret-shaped content (keys/JWTs/tokens) → `redacted:true`.
|
|
115
121
|
- `env` redacts by name AND value shape; `dotenv` never reads values at all.
|
|
116
122
|
- `http`/`wait -u` refuse cloud metadata endpoints (169.254.169.254 etc.) → `BlockedTarget`;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@master4n/master-cli",
|
|
3
|
-
"version": "3.0.
|
|
4
|
-
"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.",
|
|
3
|
+
"version": "3.0.4",
|
|
4
|
+
"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).",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"repository": {
|
|
7
7
|
"type": "git",
|
|
@@ -46,7 +46,10 @@
|
|
|
46
46
|
"developer-cli",
|
|
47
47
|
"agent-cli",
|
|
48
48
|
"mfn",
|
|
49
|
-
"master-cli"
|
|
49
|
+
"master-cli",
|
|
50
|
+
"mcp",
|
|
51
|
+
"mcp-server",
|
|
52
|
+
"model-context-protocol"
|
|
50
53
|
],
|
|
51
54
|
"author": "dwivna",
|
|
52
55
|
"license": "MIT",
|