@agiflowai/one-mcp 0.2.6 → 0.2.8
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 +87 -5
- package/dist/cli.cjs +564 -52
- package/dist/cli.mjs +565 -53
- package/dist/{http-xSfxBa8A.cjs → http-BzrxGEr-.cjs} +669 -286
- package/dist/{http-D9BDXhHn.mjs → http-DeUYygKb.mjs} +672 -289
- package/dist/index.cjs +1 -1
- package/dist/index.d.cts +8 -0
- package/dist/index.d.mts +8 -0
- package/dist/index.mjs +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -128,6 +128,12 @@ mcpServers:
|
|
|
128
128
|
command: node
|
|
129
129
|
args: ["server.js"]
|
|
130
130
|
disabled: true
|
|
131
|
+
|
|
132
|
+
# Custom timeout for slow servers
|
|
133
|
+
slow-server:
|
|
134
|
+
command: npx
|
|
135
|
+
args: ["-y", "@heavy/mcp-package"]
|
|
136
|
+
timeout: 60000 # 60 seconds (default: 30000)
|
|
131
137
|
```
|
|
132
138
|
|
|
133
139
|
### Environment Variables
|
|
@@ -259,9 +265,51 @@ When multiple paths are configured, skills from earlier paths take precedence ov
|
|
|
259
265
|
|
|
260
266
|
You can also convert MCP server prompts into skills. This allows you to expose prompts from MCP servers as executable skills that AI agents can invoke.
|
|
261
267
|
|
|
262
|
-
####
|
|
268
|
+
#### Auto-Detection from Front-Matter (Recommended)
|
|
269
|
+
|
|
270
|
+
The easiest way to create prompt-based skills is to add YAML front-matter directly in your prompt content. one-mcp automatically detects prompts with `name` and `description` front-matter and exposes them as skills.
|
|
271
|
+
|
|
272
|
+
**Prompt content with front-matter:**
|
|
273
|
+
```markdown
|
|
274
|
+
---
|
|
275
|
+
name: code-reviewer
|
|
276
|
+
description: Review code for best practices and potential issues
|
|
277
|
+
---
|
|
278
|
+
|
|
279
|
+
# Code Review Instructions
|
|
280
|
+
|
|
281
|
+
When reviewing code, follow these guidelines...
|
|
282
|
+
```
|
|
263
283
|
|
|
264
|
-
|
|
284
|
+
MCP servers like `@agiflowai/scaffold-mcp` support the `--prompt-as-skill` flag to automatically add front-matter to prompts:
|
|
285
|
+
|
|
286
|
+
```yaml
|
|
287
|
+
mcpServers:
|
|
288
|
+
scaffold-mcp:
|
|
289
|
+
command: npx
|
|
290
|
+
args:
|
|
291
|
+
- -y
|
|
292
|
+
- "@agiflowai/scaffold-mcp"
|
|
293
|
+
- "mcp-serve"
|
|
294
|
+
- "--prompt-as-skill" # Enables front-matter in prompts
|
|
295
|
+
```
|
|
296
|
+
|
|
297
|
+
**Multi-line descriptions** are supported using YAML block scalars:
|
|
298
|
+
|
|
299
|
+
```markdown
|
|
300
|
+
---
|
|
301
|
+
name: complex-skill
|
|
302
|
+
description: |
|
|
303
|
+
A skill that does multiple things:
|
|
304
|
+
- First capability
|
|
305
|
+
- Second capability
|
|
306
|
+
- Third capability
|
|
307
|
+
---
|
|
308
|
+
```
|
|
309
|
+
|
|
310
|
+
#### Explicit Configuration (Alternative)
|
|
311
|
+
|
|
312
|
+
You can also explicitly configure which prompts should be exposed as skills:
|
|
265
313
|
|
|
266
314
|
```yaml
|
|
267
315
|
mcpServers:
|
|
@@ -286,14 +334,14 @@ mcpServers:
|
|
|
286
334
|
|
|
287
335
|
#### How Prompt-Based Skills Work
|
|
288
336
|
|
|
289
|
-
1. **
|
|
290
|
-
2. **
|
|
337
|
+
1. **Discovery**: one-mcp scans all prompts from connected servers for front-matter with `name` and `description`
|
|
338
|
+
2. **Fallback**: Explicitly configured prompts (in `config.prompts`) take precedence over auto-detected ones
|
|
291
339
|
3. **Invocation**: When an AI agent requests a prompt-based skill, one-mcp:
|
|
292
340
|
- Fetches the prompt content from the MCP server
|
|
293
341
|
- Returns the prompt messages as skill instructions
|
|
294
342
|
4. **Execution**: The AI agent follows the skill instructions
|
|
295
343
|
|
|
296
|
-
#### Skill Configuration Fields
|
|
344
|
+
#### Skill Configuration Fields (Explicit Config)
|
|
297
345
|
|
|
298
346
|
| Field | Required | Description |
|
|
299
347
|
|-------|----------|-------------|
|
|
@@ -301,6 +349,12 @@ mcpServers:
|
|
|
301
349
|
| `description` | Yes | Brief description of what the skill does |
|
|
302
350
|
| `folder` | No | Optional folder path for skill resources |
|
|
303
351
|
|
|
352
|
+
#### Skill Naming and Precedence
|
|
353
|
+
|
|
354
|
+
- **File-based skills** take precedence over prompt-based skills with the same name
|
|
355
|
+
- Skills are only prefixed with `skill__` when they clash with MCP tool names
|
|
356
|
+
- Skills that only clash with other skills are deduplicated (first one wins, no prefix)
|
|
357
|
+
|
|
304
358
|
#### Example Use Case
|
|
305
359
|
|
|
306
360
|
Convert a complex prompt from an MCP server into a reusable skill:
|
|
@@ -366,6 +420,9 @@ npx @agiflowai/one-mcp mcp-serve --config ./mcp-config.yaml --type http --port 3
|
|
|
366
420
|
# Initialize config file
|
|
367
421
|
npx @agiflowai/one-mcp init --output mcp-config.yaml
|
|
368
422
|
|
|
423
|
+
# Pre-download packages for faster startup
|
|
424
|
+
npx @agiflowai/one-mcp prefetch --config ./mcp-config.yaml
|
|
425
|
+
|
|
369
426
|
# List all tools from configured servers
|
|
370
427
|
npx @agiflowai/one-mcp list-tools --config ./mcp-config.yaml
|
|
371
428
|
|
|
@@ -376,6 +433,31 @@ npx @agiflowai/one-mcp describe-tools --config ./mcp-config.yaml --tools read_fi
|
|
|
376
433
|
npx @agiflowai/one-mcp use-tool --config ./mcp-config.yaml --tool-name read_file --args '{"path": "/tmp/test.txt"}'
|
|
377
434
|
```
|
|
378
435
|
|
|
436
|
+
### Prefetch Command
|
|
437
|
+
|
|
438
|
+
Pre-download packages used by MCP servers (npx, pnpx, uvx, uv) to speed up initial connections:
|
|
439
|
+
|
|
440
|
+
```bash
|
|
441
|
+
# Prefetch all packages
|
|
442
|
+
npx @agiflowai/one-mcp prefetch --config ./mcp-config.yaml
|
|
443
|
+
|
|
444
|
+
# Dry run - see what would be prefetched
|
|
445
|
+
npx @agiflowai/one-mcp prefetch --config ./mcp-config.yaml --dry-run
|
|
446
|
+
|
|
447
|
+
# Run prefetch in parallel (faster)
|
|
448
|
+
npx @agiflowai/one-mcp prefetch --config ./mcp-config.yaml --parallel
|
|
449
|
+
|
|
450
|
+
# Filter by package manager
|
|
451
|
+
npx @agiflowai/one-mcp prefetch --config ./mcp-config.yaml --filter npx
|
|
452
|
+
```
|
|
453
|
+
|
|
454
|
+
| Option | Description |
|
|
455
|
+
|--------|-------------|
|
|
456
|
+
| `-c, --config` | Path to config file |
|
|
457
|
+
| `-p, --parallel` | Run prefetch commands in parallel |
|
|
458
|
+
| `-d, --dry-run` | Show what would be prefetched without executing |
|
|
459
|
+
| `-f, --filter` | Filter by package manager: `npx`, `pnpx`, `uvx`, or `uv` |
|
|
460
|
+
|
|
379
461
|
### Server Options
|
|
380
462
|
|
|
381
463
|
| Option | Description | Default |
|