@gresmcp/mcp 1.0.0 → 1.1.0

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
@@ -15,7 +15,7 @@ Knowledge is stored in PostgreSQL using `pgvector` (semantic similarity) and `ts
15
15
  - PostgreSQL with the [`pgvector`](https://github.com/pgvector/pgvector) extension installed (default `gres` database and `gres` user `gres` password used in the examples bellow)
16
16
  - An [Ollama](https://ollama.com) server with an embedding model pulled (e.g. `ollama pull nomic-embed-text` or `ollama pull bge-m3`)
17
17
 
18
- Run `gresmcp check` to verify all of these at once (it also creates the `vector` extension for you if it is missing).
18
+ Run `gresmcp check --model <model>` to verify all of these at once (it also creates the `vector` extension for you if it is missing).
19
19
 
20
20
  ## Install
21
21
 
@@ -46,8 +46,9 @@ gresmcp ks create docs --model nomic-embed-text --description "Project documenta
46
46
 
47
47
  # 2. Feed it
48
48
  gresmcp feed docs --path ./docs # a folder (text, markdown, code, html)
49
- gresmcp feed docs --path ./README.md # a single file
49
+ gresmcp feed docs --path ./README.md # a single file (text, markdown, code, html)
50
50
  gresmcp feed docs --text "Note: the API key lives in vault" --title "API keys" --tags secrets
51
+ gresmcp feed docs --url https://example.com/docs/ --max-pages 200 --depth 3 # scrape a website
51
52
 
52
53
  # 3. Serve it to your AI tool over MCP
53
54
  mcp docs # stdio transport, scoped to the 'docs' knowledge source
@@ -71,23 +72,30 @@ Edits a knowledge source. The Ollama server URL, name and description can change
71
72
 
72
73
  Lists knowledge sources with model, dimension, URL and entry counts.
73
74
 
75
+ ### `gresmcp ks stats <name> [--json]`
76
+
77
+ Shows the statistics of a knowledge source: entry chunk count, distinct sources, total content volume with average/min/max chunk length, when it was last fed, plus the ks metadata (model, dimension, Ollama URL).
78
+
74
79
  ### `gresmcp ks delete <name> [--yes]`
75
80
 
76
81
  Deletes a knowledge source and drops its entry table (asks for confirmation unless `--yes`).
77
82
 
78
- ### `gresmcp feed <ks> (--path <path> | --text <text> | --stdin) [options]`
83
+ ### `gresmcp feed <ks> (--path <path> | --url <url> | --text <text> | --stdin) [options]`
79
84
 
80
- Feeds data into a knowledge source. Exactly one input of `--path`, `--text` or `--stdin` must be given.
85
+ Feeds data into a knowledge source. Exactly one input of `--path`, `--url`, `--text` or `--stdin` must be given.
81
86
 
82
87
  | Option | Description |
83
88
  | --- | --- |
84
89
  | `--path <path>` | File or folder. Folders are walked recursively (skips `node_modules`, `.git`, `dist`, ...). Supported: text, markdown, code files, HTML (converted to Markdown via turndown). Binaries and empty files are skipped with a warning. |
90
+ | `--url <url>` | Scrape a website (http/https). Follows same-host links from the seed, converts HTML to Markdown (main-content extraction via Readability) and ingests linked `text/markdown` / `text/plain` resources. Each page becomes a source keyed by its URL, so re-feeding is idempotent. Only 2XX responses are ingested; failures are reported as skipped. |
91
+ | `--crawler <name>` | Crawler backend for `--url`: `auto` (default), `crawlee` (static HTTP), `playwright` or `puppeteer` (full browser rendering for SPAs; must be installed globally, e.g. `npm i -g playwright && npx playwright install chromium`). With `auto`, pages that look like empty JS shells are retried with Playwright when available. |
92
+ | `--max-pages <n>` | Max pages to fetch when crawling (default 999) |
93
+ | `--depth <n>` | Max link depth from the seed URL (default 5; 0 = seed page only) |
85
94
  | `--text <text>` / `--stdin` | Manual entry text (chunked the same way as documents) |
86
95
  | `--title <title>` | Title for manual entries |
87
96
  | `--source-name <name>` | Source name for manual entries (default `manual`) |
88
- | `--tags a,b` | Tags stored in metadata, filterable by MCP `search` |
97
+ | `--tags a,b` | Tags stored in metadata, filterable by MCP `search`; for `--url`, merged with each page's HTML `keywords`/`og:article:tag` |
89
98
  | `--metadata k=v ...` | Repeatable custom metadata entries |
90
- | `--url <url>` | Ollama URL override for this run (the model stays the ks's) |
91
99
  | `--replace` | Replace all chunks of the same source instead of skipping unchanged ones |
92
100
  | `--dry-run` | Parse and chunk only; no embeddings, no writes |
93
101
  | `--chunk-size <n>` | Max chunk length in characters (default 1200) |
@@ -95,11 +103,15 @@ Feeds data into a knowledge source. Exactly one input of `--path`, `--text` or `
95
103
 
96
104
  Feeding is idempotent: a chunk whose `(source, chunk_index, content hash)` already exists is skipped, so re-running a feed only adds new content. Use `--replace` to force a clean re-ingest of a source.
97
105
 
106
+ While feeding, live progress is shown on stderr: a bar for the currently processed file (chunks processed, chars) plus a total line with files processed/total, cumulative chars and the number of rejected/ignored files — rejected files are reported but excluded from the progress percentage. In a non-interactive terminal (or when piped), plain per-file lines are printed instead. After a successful non-dry-run feed, a `this run` summary prints the same statistics as `gresmcp ks stats` (chunks, distinct sources, chars, avg/min/max per chunk), scoped to the chunks written during that run.
107
+
108
+ For `--url`, page titles come from `<title>`/`og:title`/`<h1>` and each page's metadata records `source_url`, `crawled_at`, the meta `description` (if present) and tags. Crawling stays on the seed's hostname; non-HTTP links and obvious binary URLs are skipped. Requests are made without consulting robots.txt, and CWD is never polluted (crawlee state goes to a temp directory).
109
+
98
110
  ### `gresmcp init`
99
111
 
100
112
  Explicitly initializes/repairs the schema (runs automatically for every command anyway).
101
113
 
102
- ### `gresmcp check [--model <model>] [--url <url>] [--probe] [--json]`
114
+ ### `gresmcp check --model <model> [--url <url>] [--probe] [--json]`
103
115
 
104
116
  Verifies that your environment meets all requirements:
105
117
 
@@ -110,7 +122,7 @@ Verifies that your environment meets all requirements:
110
122
  | pgvector | Extension installed (created automatically if missing); warns below 0.5.0, which is required for HNSW indexes |
111
123
  | schema | `ks` table and every knowledge source's entry table exist (`gresmcp init` repairs them) |
112
124
  | Ollama | Server reachable at the configured URL |
113
- | models | The embedding model of every existing knowledge source (plus `--model`, if given) is pulled at the right URL; `--probe` also embeds a test string to verify the dimension |
125
+ | models | The embedding model given via `--model` plus the embedding model of every existing knowledge source is pulled at the right URL; `--probe` also embeds a test string to verify the dimension |
114
126
 
115
127
  ```sh
116
128
  gresmcp check --model nomic-embed-text
@@ -145,6 +157,8 @@ Hybrid mode fuses pgvector cosine ranking and `ts_rank_cd` full-text ranking wit
145
157
 
146
158
  ## Using with AI tools
147
159
 
160
+ Please always mention in AGENTS.md which resources are included in the `gresmcp` knowledge base, so the agent aware what to look for and where.
161
+
148
162
  ### opencode
149
163
 
150
164
  ```json