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
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Tagged releases are published to npm from GitHub Actions when a **GitHub Release
10
10
11
11
### Added
12
12
13
-
-**Multi-source mode:** configure multiple Pinecone API keys / indexes in one MCP server via `PINECONE_SOURCES`, `--sources`, or a JSON config file (`PINECONE_CONFIG_FILE` / `--config-file`). New `list_sources` tool (when more than one source is configured). Optional `source` parameter on discovery and query tools; `list_namespaces` aggregates across sources and tags each namespace with `source`. See [CONFIGURATION.md](docs/CONFIGURATION.md#multi-source-mode).
13
+
-**Multi-source mode:** configure multiple Pinecone API keys / indexes in one MCP server via `PINECONE_SOURCES`, `--sources`, or a JSON config file (`PINECONE_CONFIG_FILE` / `--config-file`). New `list_sources` tool (when more than one source is configured). Optional `source` parameter on discovery and query tools; `list_namespaces` aggregates across sources and tags each namespace with `source`. See [CONFIGURATION.md](docs/CONFIGURATION.md#multi-source-mode), [TOOLS.md](docs/TOOLS.md#multi-source-mode), and deployment profiles in [CONFIGURATION.md](docs/CONFIGURATION.md#deployment-profiles).
Copy file name to clipboardExpand all lines: docs/CONFIGURATION.md
+61Lines changed: 61 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -87,6 +87,67 @@ Discovery responses may include `source_errors` when one project fails but other
87
87
88
88
Single-key deployments (`PINECONE_API_KEY` + `PINECONE_INDEX_NAME` only) are unchanged — no `source` field on responses and no `list_sources` tool.
89
89
90
+
### Deployment profiles
91
+
92
+
Multi-source mode supports two operational profiles. **Never** ship a merged internal config through the same channel used for external partners.
93
+
94
+
| Profile | Who | Config | Risk if mis-shared |
95
+
| ------- | --- | ------ | ------------------ |
96
+
|**External (public-only)**| External companies, public MCP distribution |`PINECONE_API_KEY` + `PINECONE_INDEX_NAME`, or `PINECONE_SOURCES` with **one** entry | Low — single public key only |
97
+
|**Internal (merged)**| Staff machines with access to private data |`PINECONE_SOURCES` or JSON config with **two+** entries |**High** — private API key and private namespace names exposed |
Prefer `PINECONE_CONFIG_FILE` with `${ENV_VAR}` indirection over inline API keys in `PINECONE_SOURCES`. See [SECURITY.md](./SECURITY.md).
133
+
134
+
### Architecture decision
135
+
136
+
**Chosen:** Option A — multi-source server with optional `source` parameter on tools (`SourceRegistry` + `PINECONE_SOURCES` / JSON config).
137
+
138
+
**Rejected:**
139
+
140
+
-**Option B (Cursor routing rules only):** Does not fix the UX problem when users forget which MCP entry to use; no code changes.
141
+
-**Option C (thin proxy MCP):** Extra package and latency; duplicates routing logic already in `ServerContext`.
142
+
143
+
**Rationale:** Pinecone SDK v8 supports multiple `Pinecone({ apiKey })` instances per process; MCP has no barrier to aggregating backends. Security is enforced by **deployment profiles** (public-only vs merged config), not per-query MCP authorization. All multi-source results include `source` for LLM provenance.
144
+
145
+
**Execution semantics:** Discovery tools aggregate all sources when `source` is omitted. Execution tools (`query`, `count`, etc.) call `resolveSource`: infer source when the namespace exists on exactly one project; return `VALIDATION` when ambiguous. They do **not** fan out one query to all sources. `guided_query` without `namespace` routes via the aggregated namespace list and sets `selected_source` in `decision_trace`.
146
+
147
+
**Audit logging:** When a tool resolves a specific source, stderr logs `toolname [source=name]` at INFO (execution tools and discovery tools that pass an explicit `source` filter). Aggregated discovery without `source` does not log per-source lines.
148
+
149
+
See also [TOOLS.md § Multi-source mode](./TOOLS.md#multi-source-mode).
Copy file name to clipboardExpand all lines: docs/SECURITY.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,7 @@
4
4
5
5
-**Never** commit real Pinecone API keys. Use environment variables (`PINECONE_API_KEY`, or per-source keys referenced from `PINECONE_SOURCES` / a JSON config file) or secret managers in CI.
6
6
- The CLI and `resolveConfig` read keys only from argv/env/overrides — logs must not echo raw keys. In multi-source mode, each source may use a different API key; all are redacted in logs and MCP responses.
7
+
- Use **separate deployment profiles** for external (public-only) vs internal (merged) MCP configs — see [CONFIGURATION.md § Deployment profiles](./CONFIGURATION.md#deployment-profiles).
Multi-source-only stable fields (`source` on namespace rows, `source_errors`, `recommended_source`, `selected_source`) are **omitted** in single-key deployments.
20
23
21
24
Promotion process: [deprecation-policy.md § Stable vs experimental](./deprecation-policy.md#stable-vs-experimental-mcp-response-fields).
22
25
23
26
## Core vs Alliance tool surface
24
27
25
28
| Setup | Tools | MCP instructions |
26
29
| ----- | ----- | ------------------ |
27
-
|`setupCoreServer` (package root) |**8:**`list_namespaces`, `namespace_router`, `count`, `query`, `keyword_search`, `query_documents`, `generate_urls`, `guided_query`|`CORE_SERVER_INSTRUCTIONS` — includes `guided_query`; no `suggest_query_params`|
28
-
|`setupAllianceServer` / published CLI |**9:** core tools plus `suggest_query_params`|`ALLIANCE_SERVER_INSTRUCTIONS` — includes suggest-flow quickstart |
30
+
|`setupCoreServer` (package root) |**8** (single-key) or **9** (multi-source adds `list_sources`):`list_namespaces`, `namespace_router`, `count`, `query`, `keyword_search`, `query_documents`, `generate_urls`, `guided_query`|`CORE_SERVER_INSTRUCTIONS` — includes `guided_query`; no `suggest_query_params`|
31
+
|`setupAllianceServer` / published CLI |**9** (single-key) or **10** (multi-source): core tools plus `suggest_query_params`|`ALLIANCE_SERVER_INSTRUCTIONS` — includes suggest-flow quickstart |
29
32
30
33
## Suggest-flow gate
31
34
@@ -37,6 +40,48 @@ When **`disableSuggestFlow`** is **`true`** (core default via `resolveConfig`),
37
40
38
41
**Core:** gate off by default; set `PINECONE_DISABLE_SUGGEST_FLOW=false` or `disableSuggestFlow: false` to enable the gate. **Alliance:** gate on by default; set `PINECONE_DISABLE_SUGGEST_FLOW=true` or CLI `--disable-suggest-flow` to bypass (not recommended for production).
39
42
43
+
## Multi-source mode
44
+
45
+
Activated when `PINECONE_SOURCES`, `--sources`, or a JSON config file (`PINECONE_CONFIG_FILE` / `--config-file`) is set. See [CONFIGURATION.md § Multi-source mode](./CONFIGURATION.md#multi-source-mode) and [Deployment profiles](./CONFIGURATION.md#deployment-profiles).
46
+
47
+
**Shared `source` parameter** (optional on most tools):
48
+
49
+
> Pinecone source name (from `list_sources`). Omit on discovery tools to search all sources. On query tools, omit only when the namespace uniquely identifies one source.
50
+
51
+
| Category | Tools | When `source` is omitted |
52
+
| -------- | ----- | ------------------------ |
53
+
|**Discovery**|`list_sources`, `list_namespaces`, `namespace_router`| Aggregate or list across **all** configured sources; rows include `source`|
54
+
|**Orchestrator**|`guided_query` (no `namespace`) | Route using aggregated namespace lists; `experimental.decision_trace.selected_source`|
55
+
|**Execution**|`suggest_query_params`, `query`, `count`, `query_documents`, `keyword_search`, `generate_urls`, `guided_query` (with `namespace`) |`resolveSource`: infer source when namespace is unique; `VALIDATION` (`field: source`) when ambiguous |
Or single-shot: `guided_query` (routes across sources when `namespace` is omitted).
64
+
65
+
**Suggest-flow in multi-source mode:** gate state uses compound keys `source:namespace`. Pass the same `source` + `namespace` pair for `suggest_query_params` and gated tools when the namespace exists on multiple sources.
66
+
67
+
---
68
+
69
+
## `list_sources` (multi-source only)
70
+
71
+
Registered only when more than one Pinecone source is configured.
@@ -201,10 +258,11 @@ Treat **`experimental.degraded: true`** as lower confidence even when `status` i
201
258
|`top_k`| int | no | For query paths |
202
259
|`preferred_tool`|`auto`\|`count`\|`fast`\|`detailed`\|`full`| no | Override automated tool choice |
203
260
|`enrich_urls`| boolean | no (default true) | Run URL generator when metadata lacks `url`|
261
+
|`source`| string | no | Pinecone source (multi-source; pin routing when namespace is ambiguous) |
204
262
205
263
**Success:**`{ status: 'success', experimental: { decision_trace }, result }` where `result` is either a count payload or a `QueryResponse`-shaped query payload.
When the inner query path runs, `result.experimental` includes the same degradation fields as `query` (see [Rerank and hybrid degradation](#rerank-and-hybrid-degradation)).
210
268
@@ -227,8 +285,9 @@ When the inner query path runs, `result.experimental` includes the same degradat
227
285
| ----- | ---- | -------- | ----------- |
228
286
|`namespace`| string | yes | Namespace |
229
287
|`records`| object[]| yes | Up to 500 records (metadata object or `{ metadata: {...} }`) |
288
+
|`source`| string | no | Pinecone source (multi-source) |
0 commit comments