@agiflowai/one-mcp 0.2.6 → 0.2.7

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 CHANGED
@@ -259,9 +259,51 @@ When multiple paths are configured, skills from earlier paths take precedence ov
259
259
 
260
260
  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
261
 
262
- #### Configuration
262
+ #### Auto-Detection from Front-Matter (Recommended)
263
+
264
+ 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.
265
+
266
+ **Prompt content with front-matter:**
267
+ ```markdown
268
+ ---
269
+ name: code-reviewer
270
+ description: Review code for best practices and potential issues
271
+ ---
263
272
 
264
- Add a `prompts` section under a server's `config`:
273
+ # Code Review Instructions
274
+
275
+ When reviewing code, follow these guidelines...
276
+ ```
277
+
278
+ MCP servers like `@agiflowai/scaffold-mcp` support the `--prompt-as-skill` flag to automatically add front-matter to prompts:
279
+
280
+ ```yaml
281
+ mcpServers:
282
+ scaffold-mcp:
283
+ command: npx
284
+ args:
285
+ - -y
286
+ - "@agiflowai/scaffold-mcp"
287
+ - "mcp-serve"
288
+ - "--prompt-as-skill" # Enables front-matter in prompts
289
+ ```
290
+
291
+ **Multi-line descriptions** are supported using YAML block scalars:
292
+
293
+ ```markdown
294
+ ---
295
+ name: complex-skill
296
+ description: |
297
+ A skill that does multiple things:
298
+ - First capability
299
+ - Second capability
300
+ - Third capability
301
+ ---
302
+ ```
303
+
304
+ #### Explicit Configuration (Alternative)
305
+
306
+ You can also explicitly configure which prompts should be exposed as skills:
265
307
 
266
308
  ```yaml
267
309
  mcpServers:
@@ -286,14 +328,14 @@ mcpServers:
286
328
 
287
329
  #### How Prompt-Based Skills Work
288
330
 
289
- 1. **Configuration**: Define which prompts should be exposed as skills in the server config
290
- 2. **Discovery**: Prompt-based skills appear alongside file-based skills in `describe_tools`
331
+ 1. **Discovery**: one-mcp scans all prompts from connected servers for front-matter with `name` and `description`
332
+ 2. **Fallback**: Explicitly configured prompts (in `config.prompts`) take precedence over auto-detected ones
291
333
  3. **Invocation**: When an AI agent requests a prompt-based skill, one-mcp:
292
334
  - Fetches the prompt content from the MCP server
293
335
  - Returns the prompt messages as skill instructions
294
336
  4. **Execution**: The AI agent follows the skill instructions
295
337
 
296
- #### Skill Configuration Fields
338
+ #### Skill Configuration Fields (Explicit Config)
297
339
 
298
340
  | Field | Required | Description |
299
341
  |-------|----------|-------------|
@@ -301,6 +343,12 @@ mcpServers:
301
343
  | `description` | Yes | Brief description of what the skill does |
302
344
  | `folder` | No | Optional folder path for skill resources |
303
345
 
346
+ #### Skill Naming and Precedence
347
+
348
+ - **File-based skills** take precedence over prompt-based skills with the same name
349
+ - Skills are only prefixed with `skill__` when they clash with MCP tool names
350
+ - Skills that only clash with other skills are deduplicated (first one wins, no prefix)
351
+
304
352
  #### Example Use Case
305
353
 
306
354
  Convert a complex prompt from an MCP server into a reusable skill:
package/dist/cli.cjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- const require_http = require('./http-xSfxBa8A.cjs');
2
+ const require_http = require('./http-B4NAfsQl.cjs');
3
3
  let node_fs_promises = require("node:fs/promises");
4
4
  let node_path = require("node:path");
5
5
  let liquidjs = require("liquidjs");
@@ -548,7 +548,7 @@ const initCommand = new commander.Command("init").description("Initialize MCP co
548
548
 
549
549
  //#endregion
550
550
  //#region package.json
551
- var version = "0.2.5";
551
+ var version = "0.2.6";
552
552
 
553
553
  //#endregion
554
554
  //#region src/cli.ts
package/dist/cli.mjs CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
- import { a as findConfigFile, c as ConfigFetcherService, i as createServer, n as SseTransportHandler, o as SkillService, r as StdioTransportHandler, s as McpClientManagerService, t as HttpTransportHandler } from "./http-D9BDXhHn.mjs";
2
+ import { a as SkillService, c as ConfigFetcherService, i as createServer, n as SseTransportHandler, o as findConfigFile, r as StdioTransportHandler, s as McpClientManagerService, t as HttpTransportHandler } from "./http-DSkkpGJU.mjs";
3
3
  import { writeFile } from "node:fs/promises";
4
4
  import { resolve } from "node:path";
5
5
  import { Liquid } from "liquidjs";
@@ -548,7 +548,7 @@ const initCommand = new Command("init").description("Initialize MCP configuratio
548
548
 
549
549
  //#endregion
550
550
  //#region package.json
551
- var version = "0.2.5";
551
+ var version = "0.2.6";
552
552
 
553
553
  //#endregion
554
554
  //#region src/cli.ts