You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: CHANGELOG.md
+41-25Lines changed: 41 additions & 25 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,38 +4,53 @@ All notable changes to this project will be documented in this file.
4
4
5
5
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
6
6
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
+
Tagged releases are published to npm from GitHub Actions when a **GitHub Release** is published (see `.github/workflows/publish.yml`).
7
8
8
9
## [Unreleased]
9
10
10
11
### Added
11
12
12
-
-`list_namespaces` tool: discovers all namespaces with record counts and sampled metadata fields
13
-
-`namespace_router` tool: ranks namespaces by relevance to a natural-language query
14
-
-`suggest_query_params` tool: mandatory flow gate that recommends fields and tool variant before queries
15
-
-`count` tool: counts unique documents matching a query, with `truncated` flag when results exceed `COUNT_TOP_K`
16
-
-`query_fast` tool: lightweight chunk-level search with minimal field set
17
-
-`query_detailed` tool: chunk-level search with optional semantic reranking
18
-
-`query` tool: unified query entry-point supporting `query_fast` and `query_detailed` modes
19
-
-`guided_query` tool: single-call orchestrator that runs routing → suggestion → execution, returning a `decision_trace`
20
-
-`generate_urls` tool: synthesizes URLs for records whose metadata lacks a `url` field
21
-
-`query_documents` tool: reassembles full documents from chunks grouped by document identifier
22
-
- Centralized structured logger (`src/logger.ts`) with level-gated stderr output and stack-trace capture
23
-
- Dockerfile for containerised deployment
24
-
-`About.md` project documentation covering architecture, tools, and operating principles
13
+
-`.coderabbit.yaml` sets the pre-merge **docstring coverage** threshold to **79%** (default **80%**) so marginal documentation-only gaps do not block merges; adjust upward as coverage improves.
14
+
-`registerBuiltinUrlGenerators()` for built-in URL generators; `setupServer()` invokes it so CLI/library parity stays default.
15
+
- Discriminated result type for `listNamespacesFromKeywordIndex()` (`KeywordIndexNamespacesResult`).
16
+
- Unit tests for `withRetry` / `withTimeout` in `src/server/retry.test.ts`.
17
+
-`SERVER_VERSION` is now read from `package.json` at runtime so MCP `serverInfo` always matches the published package version.
18
+
-`--version` CLI flag prints the package version and exits.
19
+
-`list_namespaces` response now includes `expires_at_iso` so clients see the cache expiry as an ISO-8601 timestamp without converting `cache_ttl_seconds`.
20
+
-`examples/README.md` describing the library embedding sample.
21
+
- GitHub Actions **CI** matrix across **ubuntu-latest**, **windows-latest**, and **macos-latest**, each with **Node.js****20.x** and **22.x**: typecheck, lint, Prettier, build, `test:coverage`, **CycloneDX** SBOM artifact upload (per job), **Codecov** upload (**Ubuntu** + Node **20.x** only), plus a separate **quality** job (`npm audit`, `npm pack --dry-run`).
22
+
-`npm run test:coverage` with Vitest coverage thresholds (see `vitest.config.ts`).
23
+
-`@vitest/coverage-v8` devDependency for coverage reports (`lcov`, `json-summary`, HTML).
25
24
26
25
### Changed
27
26
28
-
- Modularised server into focused files under `src/server/` (tools, caches, formatters, suggestion flow)
29
-
- CI workflow updated: multi-node matrix (`18.x`, `20.x`, `22.x`), separate quality job with `continue-on-error`
30
-
- Replaced all `console.error` calls in `pinecone-client.ts` with typed `logInfo` / `logDebug` / `logError`
31
-
32
-
### Fixed
33
-
34
-
- Timestamp-based metadata filter now correctly handles numeric epoch values
35
-
36
-
### Security
37
-
38
-
- N/A
27
+
-**Breaking (MCP):**`suggest_query_params` and in-process suggestion flow now emit `recommended_tool` as `count` | `fast` | `detailed` | `full` (aligned with the unified `query` tool `preset`), not legacy `query_fast` / `query_detailed` strings.
28
+
-**Breaking (MCP):** Single hybrid `query` tool with `preset` (`fast` | `detailed` | `full`); removed separate `query_fast` / `query_detailed` tool registrations.
29
+
-`resolveConfig()` throws if the Pinecone API key is missing (after trim); library callers must supply `apiKey` via overrides or set `PINECONE_API_KEY`.
30
+
-`withTimeout` aborts an internal `AbortSignal` on deadline (cooperative cancellation).
31
+
-`PineconeClient`: shared hit-field extraction, safer merge dedup without empty `_id` collisions, metadata sampling skips zero-vector probe when dimension is unknown, `listNamespacesFromKeywordIndex` surfaces errors via `{ ok: false }`.
32
+
- Metadata filter manual validation accepts primitive arrays for `$in`/`$nin` including numbers (matches Zod).
33
+
- README: deployment model for process-global gate/cache/registry; adjusted feature wording vs pre-1.0 semver.
34
+
-`.npmignore` no longer excludes `dist/` (still shipped via `package.json``files`).
35
+
-`.env.example` log-level options corrected to the four levels actually supported (`DEBUG`, `INFO`, `WARN`, `ERROR`); the stale `WARNING`/`CRITICAL` values are gone.
36
+
- README Slack URL example now matches the generator output (`https://app.slack.com/client/{team_id}/{channel_id}/p{messageId}`).
37
+
- README "Comparison with Python Version" no longer claims an identical API; the new TypeScript-only tools (`guided_query`, `query_documents`, `keyword_search`, `namespace_router`, `suggest_query_params`, `count`, `generate_urls`) are listed explicitly.
38
+
-`npm run ci` now runs `test:coverage` so merges are gated on coverage thresholds.
39
+
-**Breaking (runtime / tooling):**`engines.node` is now **>=20.12.0**. Vitest **4** (bundled **rolldown**) imports `util.styleText` from `node:util` (added in Node **20.12**), and **`@vitest/coverage-v8`** uses `node:inspector/promises` (Node **≥19**). CI tests only **20.x** and **22.x**.
40
+
- Dependabot groups related **vitest**, **typescript-eslint**, and **eslint/prettier** updates.
41
+
42
+
### Removed
43
+
44
+
- Dead `test:mcp` npm script (referenced a `test-mcp-server.js` file that has never existed).
45
+
46
+
## [0.1.6] - 2026-04-24
47
+
48
+
Historical 0.1.x releases (0.1.0 → 0.1.6) shipped the full tool surface
Copy file name to clipboardExpand all lines: README.md
+47-17Lines changed: 47 additions & 17 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,18 +7,34 @@
7
7
8
8
A Model Context Protocol (MCP) server that provides semantic search over Pinecone vector databases using hybrid search (dense + sparse) with reranking.
9
9
10
+
## Documentation
11
+
12
+
| Doc | Description |
13
+
|-----|---------------|
14
+
|[docs/README.md](docs/README.md)| Index of all guides |
-**Hybrid Search**: Combines dense and sparse embeddings for superior recall
13
27
-**Semantic Reranking**: Uses BGE reranker model for improved precision
14
28
-**Dynamic Namespace Discovery**: Automatically discovers available namespaces in your Pinecone index
15
29
-**Metadata Filtering**: Supports optional metadata filters for refined searches
16
-
-**Fast & Optimized**: Lazy initialization, connection pooling, and efficient result merging
17
-
-**Production Ready**: Input validation, error handling, and configurable logging
30
+
-**Fast presets**: Lazy initialization, connection pooling, and efficient result merging; use the `query` tool `preset=fast | detailed | full` to trade latency vs quality (no published benchmarks yet — treat descriptions as qualitative).
31
+
-**Production-oriented defaults**: Input validation, error handling, and configurable logging (semantic versioning is pre-1.0 — review CHANGELOG before upgrading).
18
32
-**TypeScript Support**: Full TypeScript support with type definitions
19
33
20
34
## Installation
21
35
36
+
**Node.js [20.12](https://nodejs.org/en/download) or later** is required (`engines` in `package.json`).
37
+
22
38
### As a Package
23
39
24
40
```bash
@@ -54,16 +70,23 @@ npm run build
54
70
55
71
## Configuration
56
72
57
-
The server requires a Pinecone API key and supports the following configuration options:
73
+
You need a **Pinecone API key** and (by default) a **dense** index plus matching **sparse** index; see [docs/CONFIGURATION.md](docs/CONFIGURATION.md) for every environment variable and CLI flag.
74
+
75
+
Quick reference:
76
+
77
+
| Variable | Required | Default |
78
+
| -------- | -------- | ------- |
79
+
|`PINECONE_API_KEY`| Yes (for live Pinecone) | — |
80
+
|`PINECONE_INDEX_NAME`| No |`rag-hybrid`|
81
+
|`PINECONE_SPARSE_INDEX_NAME`| No |`{index}-sparse`|
82
+
|`PINECONE_READ_ONLY_MCP_LOG_LEVEL`| No |`INFO` (`DEBUG`–`ERROR`) |
83
+
|`PINECONE_READ_ONLY_MCP_LOG_FORMAT`| No |`text` (`json` for log pipelines) |
58
84
59
-
### Environment Variables
85
+
Run `pinecone-read-only-mcp --help` for CLI equivalents (`--cache-ttl-seconds`, `--request-timeout-ms`, `--disable-suggest-flow`, etc.).
|`PINECONE_API_KEY`| Yes | - | Your Pinecone API key |
64
-
|`PINECONE_INDEX_NAME`| No |`rag-hybrid`| Pinecone index name (dense + sparse for hybrid) |
65
-
|`PINECONE_RERANK_MODEL`| No |`bge-reranker-v2-m3`| Reranking model |
66
-
|`PINECONE_READ_ONLY_MCP_LOG_LEVEL`| No |`INFO`| Logging level |
87
+
### Deployment model
88
+
89
+
The server uses **process-global** memory for the suggest-flow gate (`suggest_query_params` context), namespaces cache, URL generator registry, and active configuration. **Stdio MCP (one client per Node process)** matches this model. If you embed `setupServer` behind a multi-tenant HTTP transport, isolate those structures per session yourself or treat the suggest-flow guard as best-effort only.
67
90
68
91
### Claude Desktop Configuration
69
92
@@ -237,7 +260,7 @@ Discovers and lists all available namespaces in the configured Pinecone index, i
237
260
238
261
### `suggest_query_params`
239
262
240
-
Suggests which **fields** to request and which tool to use (`count`, `query_fast`, or `query_detailed`), based on the namespace’s schema (from `list_namespaces`) and the user’s natural language query. This is a mandatory flow step before `count`/`query` tools.
263
+
Suggests which **fields** to request and which path to use (`count`, or hybrid query presets **fast** / **detailed** / **full** — same vocabulary as the `query` tool `preset` argument), based on the namespace’s schema (from `list_namespaces`) and the user’s natural language query. This is a mandatory flow step before `count` / `query` tools.
241
264
242
265
**Parameters:**
243
266
@@ -255,7 +278,7 @@ Suggests which **fields** to request and which tool to use (`count`, `query_fast
@@ -577,13 +600,20 @@ npm run dev -- --api-key YOUR_API_KEY
577
600
578
601
## Comparison with Python Version
579
602
580
-
This TypeScript implementation provides the same functionality as the [Python version](https://github.com/CppDigest/pinecone-read-only-mcp) with the following benefits:
603
+
This TypeScript implementation grew out of the [Python version](https://github.com/CppDigest/pinecone-read-only-mcp) and now exposes a strict superset of its tool surface, including:
604
+
605
+
-`guided_query` (single-call orchestrator with decision trace)
606
+
-`query_documents` (full-document reassembly from chunks)
607
+
-`keyword_search` (sparse-index-only retrieval)
608
+
-`namespace_router` and `suggest_query_params` (flow guidance)
|[custom-url-generator.ts](./custom-url-generator.ts)| Embed the MCP server as a library, register a **custom URL generator** for a namespace, and wire `PineconeClient` + `setupServer()`. |
6
+
7
+
Run with `npx tsx examples/custom-url-generator.ts` after `npm install` (requires valid Pinecone credentials in env).
0 commit comments