$npx -y skills add zilliztech/mfs --skill mfs-ingestRegister, update, or re-sync data sources for MFS so they become searchable — postgres / mysql / mongo / snowflake / bigquery, github / jira / linear / notion / hubspot / zendesk, slack / discord / gmail / feishu, s3 / gdrive / web / file. Use whenever the user wants to ADD a new
| 1 | # MFS — register / update / re-sync data sources |
| 2 | |
| 3 | ## 1. What this skill does |
| 4 | |
| 5 | Walks the user through getting a data source into MFS so it's searchable. |
| 6 | The work splits into: |
| 7 | |
| 8 | 1. Picking the right connector scheme. |
| 9 | 2. Collecting credentials (preferring `env:VAR` / `file:/path` indirection |
| 10 | over plaintext). |
| 11 | 3. Writing a connector TOML. |
| 12 | 4. Calling `mfs add <uri> --config <toml>` and monitoring the returned job. |
| 13 | |
| 14 | Each connector has its own field set, credential acquisition story, and |
| 15 | gotchas. Per-connector details live in |
| 16 | `reference/connectors/<scheme>.md` — **read the matching one before |
| 17 | collecting fields** for any scheme. |
| 18 | |
| 19 | ## Step 0: Pre-flight (always run first) |
| 20 | |
| 21 | ```bash |
| 22 | mfs --version # missing? `cargo install mfs-cli` (see install row below) |
| 23 | mfs status # server reachable? connectors/jobs visible? |
| 24 | mfs config show # endpoint/profile/client id/server-info debugging |
| 25 | mfs connector list # what's already configured? |
| 26 | ``` |
| 27 | |
| 28 | Branch on the result: |
| 29 | |
| 30 | | Signal | Action | |
| 31 | |---|---| |
| 32 | | `mfs` not found | install the CLI (Rust): `cargo install mfs-cli`, or the shell installer from the project's GitHub releases page. | |
| 33 | | `mfs status` connection refused | the configured server is down. Tell the user how to bring it up — pre-release, the server runs from source: `git clone https://github.com/zilliztech/mfs.git && cd mfs/server/python && uv sync && uv run mfs-server setup && uv run mfs-server run` — and wait. Work only through the configured endpoint rather than pointing the CLI at a different server. | |
| 34 | | `mfs status` returns 401 unauthorized | the user's `MFS_API_TOKEN` is missing/wrong. Use `mfs config show` to confirm the endpoint/profile, then set the intended token source and retry. | |
| 35 | | server up + `connector list` empty | first-ever connector; jump to **§B (greenfield walk-through)** when intent matches | |
| 36 | | server up + N connectors registered | proceed to Step 1 intent classification | |
| 37 | |
| 38 | ## Step 1: Classify intent (the central decision) |
| 39 | |
| 40 | Read the user's most recent message. Pick exactly one row: |
| 41 | |
| 42 | | User said... | Intent | Jump to | |
| 43 | |---|---|---| |
| 44 | | "add postgres prod-db to MFS" + credentials available (env / file / about to paste) | **A. Zero-friction add** | §A | |
| 45 | | "I want to add postgres / slack / X" (no specifics, vague) | **B. Greenfield walk-through** | §B | |
| 46 | | "re-sync github", "re-index slack", "pull latest from jira" | **C. Force re-ingest** | §C | |
| 47 | | "update my slack token", "change postgres host", "switch to new DSN" | **D. Edit existing config** | §D | |
| 48 | | "what connectors do I have", "list registered sources" | **E. List** | §E | |
| 49 | | "find X" / "search Y" / "grep Z" / "cat W" | **wrong skill** | redirect to `mfs-find`, stop | |
| 50 | | "is X indexed yet" / "did the sync finish" / "search returns nothing" | **wrong skill or boundary** | suggest `mfs-find` for query-side diagnosis; if user says it's an ingest issue, jump to §C or §F | |
| 51 | | Truly unclear after a re-read | **F. Clarify** | §F | |
| 52 | |
| 53 | ### Mid-flow redirect |
| 54 | |
| 55 | If at any point the user changes intent ("wait, just list what I have" / |
| 56 | "actually let me just re-sync the existing one"), abandon the current § |
| 57 | and jump to the new one. Don't insist on finishing the original branch. |
| 58 | |
| 59 | --- |
| 60 | |
| 61 | ## §A. Zero-friction add |
| 62 | |
| 63 | User knows what to add and has credentials handy. Aim for: ≤3 questions |
| 64 | to the user, then write toml + run `mfs add`. |
| 65 | |
| 66 | 1. **Parse the URI** from the user's message. Shape: `<scheme>://<alias>`. |
| 67 | Scheme is required and is the connector type (`postgres`, `slack`, …). |
| 68 | Alias is the human-readable instance ID — gets used as the toml |
| 69 | filename and the connector's row in metadata. |
| 70 | - If only `<scheme>` was given (no alias), ASK: "What should I call |
| 71 | this instance? (free-form; appears as the URI host part, e.g. |
| 72 | `postgres://**prod-db**`)" |
| 73 | - **`file` takes a bare path, not an alias.** The target is a local |
| 74 | path: `mfs add /abs/path` (the URI is derived as `file://local/abs/path`). |
| 75 | The path is client-side: on the same host the server reads it directly; on |
| 76 | a different host the CLI bundles and uploads the tree (`--upload` / |
| 77 | `--no-uplo |