@mcpc-tech/cli 0.1.32 → 0.1.34
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 +98 -33
- package/bin/mcpc.cjs +8159 -9856
- package/bin/mcpc.mjs +8111 -9808
- package/package.json +1 -1
- package/types/mod.d.ts +0 -1
- package/types/mod.d.ts.map +1 -1
- package/types/src/app.d.ts.map +1 -1
- package/types/src/config/loader.d.ts +7 -3
- package/types/src/config/loader.d.ts.map +1 -1
package/README.md
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
[](https://www.npmjs.com/package/@mcpc-tech/cli)
|
|
4
4
|
[](https://jsr.io/@mcpc/cli)
|
|
5
5
|
|
|
6
|
-
CLI
|
|
6
|
+
CLI for running MCPC agentic servers with configuration support.
|
|
7
7
|
|
|
8
8
|
> **Note:** Published as `@mcpc-tech/cli` on npm and `@mcpc/cli` on JSR.
|
|
9
9
|
|
|
@@ -13,72 +13,134 @@ CLI server for MCPC with configuration support.
|
|
|
13
13
|
# Install globally (or use npx -y @mcpc-tech/cli instead of mcpc)
|
|
14
14
|
npm install -g @mcpc-tech/cli
|
|
15
15
|
|
|
16
|
-
#
|
|
16
|
+
# Quick wrap: wrap an existing MCP server and run immediately
|
|
17
17
|
mcpc --wrap --name "file-manager" \
|
|
18
18
|
--mcp-stdio "npx -y @wonderwhy-er/desktop-commander"
|
|
19
19
|
|
|
20
|
-
#
|
|
21
|
-
mcpc --
|
|
22
|
-
|
|
20
|
+
# Full config: load a complete agent configuration
|
|
21
|
+
mcpc --config-file ./my-agent.json
|
|
22
|
+
|
|
23
|
+
# Code execution mode (no MCP server required)
|
|
24
|
+
mcpc # Runs with built-in code_execution mode by default
|
|
23
25
|
|
|
24
26
|
# Show help
|
|
25
27
|
mcpc --help
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
##
|
|
30
|
+
## Usage Modes
|
|
29
31
|
|
|
30
|
-
|
|
31
|
-
execution modes:
|
|
32
|
+
### 1. Quick Wrap Mode
|
|
32
33
|
|
|
33
|
-
|
|
34
|
+
The simplest way to get started - wrap existing MCP servers:
|
|
34
35
|
|
|
35
36
|
```bash
|
|
36
|
-
#
|
|
37
|
-
mcpc --wrap --name "my-
|
|
37
|
+
# One-time run (no config saved)
|
|
38
|
+
mcpc --wrap --name "my-agent" \
|
|
38
39
|
--mcp-stdio "npx -y @wonderwhy-er/desktop-commander"
|
|
39
40
|
|
|
40
|
-
#
|
|
41
|
-
mcpc --
|
|
42
|
-
|
|
43
|
-
--mcp-http "https://api.github.com/mcp"
|
|
41
|
+
# Save to config for reuse
|
|
42
|
+
mcpc --add --mcp-stdio "npx -y @wonderwhy-er/desktop-commander"
|
|
43
|
+
mcpc # Loads ~/.mcpc/config.json
|
|
44
44
|
```
|
|
45
45
|
|
|
46
|
-
###
|
|
46
|
+
### 2. Full Configuration Mode
|
|
47
|
+
|
|
48
|
+
Load complete agent configurations with custom descriptions, tool references,
|
|
49
|
+
and execution modes:
|
|
47
50
|
|
|
48
51
|
```bash
|
|
49
|
-
#
|
|
50
|
-
mcpc --
|
|
52
|
+
# From JSON file
|
|
53
|
+
mcpc --config-file ./agents/codex-fork.json
|
|
51
54
|
|
|
52
|
-
#
|
|
55
|
+
# From Markdown agent file
|
|
56
|
+
mcpc --config-file ./agents/coding-agent.md
|
|
53
57
|
|
|
54
|
-
#
|
|
55
|
-
mcpc
|
|
58
|
+
# From URL
|
|
59
|
+
mcpc --config-url https://example.com/agent-config.json
|
|
56
60
|
```
|
|
57
61
|
|
|
58
|
-
|
|
59
|
-
settings:
|
|
62
|
+
Example JSON configuration:
|
|
60
63
|
|
|
61
64
|
```json
|
|
62
65
|
{
|
|
66
|
+
"name": "my-server",
|
|
67
|
+
"version": "1.0.0",
|
|
63
68
|
"agents": [{
|
|
69
|
+
"name": "codex-fork",
|
|
70
|
+
"description": "A coding agent.\n\nAvailable tools:\n<tool name=\"desktop-commander.read_file\"/>\n<tool name=\"desktop-commander.write_file\"/>",
|
|
64
71
|
"deps": {
|
|
65
72
|
"mcpServers": {
|
|
66
|
-
"
|
|
67
|
-
"command": "
|
|
68
|
-
"
|
|
69
|
-
"
|
|
70
|
-
"Authorization": "Bearer YOUR_TOKEN"
|
|
71
|
-
}
|
|
73
|
+
"desktop-commander": {
|
|
74
|
+
"command": "npx",
|
|
75
|
+
"args": ["-y", "@wonderwhy-er/desktop-commander"],
|
|
76
|
+
"transportType": "stdio"
|
|
72
77
|
}
|
|
73
78
|
}
|
|
79
|
+
},
|
|
80
|
+
"options": {
|
|
81
|
+
"mode": "agentic"
|
|
74
82
|
}
|
|
75
83
|
}]
|
|
76
84
|
}
|
|
77
85
|
```
|
|
78
86
|
|
|
87
|
+
### 3. Standalone Mode (No External MCP Servers)
|
|
88
|
+
|
|
89
|
+
Run with built-in capabilities only, using the `code_execution` mode:
|
|
90
|
+
|
|
91
|
+
```bash
|
|
92
|
+
# Default mode - code execution without external dependencies
|
|
93
|
+
mcpc
|
|
94
|
+
|
|
95
|
+
# Explicit standalone with code execution
|
|
96
|
+
mcpc --config '[{"name":null,"options":{"mode":"code_execution"}}]'
|
|
97
|
+
```
|
|
98
|
+
|
|
79
99
|
## Configuration Files
|
|
80
100
|
|
|
81
|
-
|
|
101
|
+
### Supported Formats
|
|
102
|
+
|
|
103
|
+
- **JSON** (`.json`): Standard configuration format
|
|
104
|
+
- **Markdown** (`.md`): Agent definition with YAML front matter (via
|
|
105
|
+
`@mcpc/plugin-markdown-loader`)
|
|
106
|
+
|
|
107
|
+
You can also use markdown file paths directly in the `agents` array:
|
|
108
|
+
|
|
109
|
+
```json
|
|
110
|
+
{
|
|
111
|
+
"name": "my-server",
|
|
112
|
+
"version": "1.0.0",
|
|
113
|
+
"agents": [
|
|
114
|
+
"./agents/coding-agent.md",
|
|
115
|
+
{ "name": "inline-agent", "description": "..." }
|
|
116
|
+
]
|
|
117
|
+
}
|
|
118
|
+
```
|
|
119
|
+
|
|
120
|
+
### Markdown Agent File Format
|
|
121
|
+
|
|
122
|
+
```markdown
|
|
123
|
+
---
|
|
124
|
+
name: coding-agent
|
|
125
|
+
mode: agentic
|
|
126
|
+
deps:
|
|
127
|
+
mcpServers:
|
|
128
|
+
desktop-commander:
|
|
129
|
+
command: npx
|
|
130
|
+
args: ["-y", "@wonderwhy-er/desktop-commander"]
|
|
131
|
+
transportType: stdio
|
|
132
|
+
---
|
|
133
|
+
|
|
134
|
+
# Coding Agent
|
|
135
|
+
|
|
136
|
+
I am a coding assistant that can read and write files.
|
|
137
|
+
|
|
138
|
+
Available tools:
|
|
139
|
+
<tool name="desktop-commander.read_file"/>
|
|
140
|
+
<tool name="desktop-commander.write_file"/>
|
|
141
|
+
```
|
|
142
|
+
|
|
143
|
+
### Loading Configuration
|
|
82
144
|
|
|
83
145
|
```bash
|
|
84
146
|
# From a specific file
|
|
@@ -144,7 +206,8 @@ deno run -A jsr:@mcpc/cli/server --config-file ./my-config.json
|
|
|
144
206
|
- `--mcp-sse <url>` - Add SSE MCP server
|
|
145
207
|
- `--name <name>` - Custom agent name (default: auto-generated from server
|
|
146
208
|
names)
|
|
147
|
-
- `--mode <mode>` - Execution mode (default: `agentic`)
|
|
209
|
+
- `--mode <mode>` - Execution mode for JSON/object agents (default: `agentic`).
|
|
210
|
+
Markdown agent files define their own mode in frontmatter.
|
|
148
211
|
|
|
149
212
|
### Execution Modes (`--mode`)
|
|
150
213
|
|
|
@@ -182,7 +245,7 @@ mcpc --wrap --mode ai_acp --name "coding-agent" \
|
|
|
182
245
|
#### `code_execution`
|
|
183
246
|
|
|
184
247
|
Enables code execution capabilities for running code snippets and scripts
|
|
185
|
-
through the agent.
|
|
248
|
+
through the agent. Requires the `@mcpc-tech/plugin-code-execution` plugin.
|
|
186
249
|
|
|
187
250
|
```bash
|
|
188
251
|
mcpc --wrap --mode code_execution --name "code-runner" \
|
|
@@ -190,7 +253,9 @@ mcpc --wrap --mode code_execution --name "code-runner" \
|
|
|
190
253
|
```
|
|
191
254
|
|
|
192
255
|
> **Note:** Different modes may require specific plugins to be available. The
|
|
193
|
-
> `agentic` mode is always available by default.
|
|
256
|
+
> `agentic` mode is always available by default. The `code_execution` mode
|
|
257
|
+
> requires `@mcpc-tech/plugin-code-execution` which is included by default in
|
|
258
|
+
> the CLI.
|
|
194
259
|
|
|
195
260
|
### Config Options
|
|
196
261
|
|