vector-mcp 3.3.6__tar.gz → 3.3.8__tar.gz
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.
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/PKG-INFO +26 -26
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/README.md +18 -18
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/pyproject.toml +8 -8
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/conftest.py +1 -1
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_database_transport_security.py +2 -4
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_identity_scoped_resources.py +1 -1
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_mcp_server.py +26 -18
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_protocol_compliance.py +2 -2
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_secure_backends.py +7 -9
- vector_mcp-3.3.8/tests/test_session_audience.py +13 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_store_extras.py +14 -6
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_vector_api.py +5 -5
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_vectordbs_mock.py +1 -3
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/__init__.py +0 -4
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/backend_policy.py +1 -3
- vector_mcp-3.3.8/vector_mcp/connector_contracts.py +262 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/doctor.py +1 -3
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/mcp_config.json +2 -2
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/mcp_server.py +167 -141
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/ontology/certification.json +3 -3
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/ontology/mappings/source.yaml +1 -2
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/ontology/vector.ttl +4 -4
- vector_mcp-3.3.8/vector_mcp/prompts/vector-mcp-knowledge-librarian.json +46 -0
- vector_mcp-3.3.8/vector_mcp/prompts/vector-mcp-operator.json +50 -0
- vector_mcp-3.3.8/vector_mcp/prompts/vector-mcp-research-analyst.json +43 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/retriever/__init__.py +5 -5
- vector_mcp-3.3.6/vector_mcp/retriever/epistemic_graph_retriever.py → vector_mcp-3.3.8/vector_mcp/retriever/medulla_retriever.py +10 -10
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/session.py +8 -8
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/skills/vector-backend-operations/SKILL.md +14 -28
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/skills/vector-collection-management/SKILL.md +21 -29
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/skills/vector-hybrid-search/SKILL.md +19 -27
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/skills/vector-mcp-development/SKILL.md +4 -4
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/skills/vector-mcp-operations/SKILL.md +2 -2
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/skills/vector-mcp-operations/references/catalog.md +8 -10
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vector_api.py +2 -3
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vectordb/__init__.py +5 -5
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vectordb/base.py +6 -6
- vector_mcp-3.3.6/vector_mcp/vectordb/epistemic_graph.py → vector_mcp-3.3.8/vector_mcp/vectordb/medulla.py +8 -8
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp.egg-info/PKG-INFO +26 -26
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp.egg-info/SOURCES.txt +7 -5
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp.egg-info/requires.txt +6 -6
- vector_mcp-3.3.6/vector_mcp/action_split.py +0 -112
- vector_mcp-3.3.6/vector_mcp/prompts/main_agent.json +0 -18
- vector_mcp-3.3.6/vector_mcp/prompts/retrieval_specialist.json +0 -43
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/LICENSE +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/scripts/investigate_timeout.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/scripts/validate_a2a_agent.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/scripts/validate_agents.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/scripts/validate_all_dbs.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/scripts/verify_deps.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/setup.cfg +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/reproduce_chunking.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_all_backends.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_chromadb_data_dir.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_databases.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_default_content_surfaces.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_doctor.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_document_inputs.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_init_dynamics.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_optional_dependencies.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_optional_dependency_boundary.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_package.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_placeholder.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_retrievers.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_startup.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_uv_sources_contract.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/tests/test_vector_mcp.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/__main__.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/bundled_mcp.json +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/connector_sources.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/connectors/__init__.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/document_inputs.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/ontology/__init__.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/ontology/fixtures/records.json +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/ontology/migrations/manifest.json +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/ontology/shapes/connector.shacl.ttl +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/prompts/__init__.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/retriever/chromadb_retriever.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/retriever/couchbase_retriever.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/retriever/llamaindex_retriever.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/retriever/mongodb_retriever.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/retriever/postgres_retriever.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/retriever/qdrant_retriever.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/retriever/retriever.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/skills/__init__.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/skills/vector-mcp-operations/agents/openai.yaml +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vectordb/chromadb.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vectordb/couchbase.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vectordb/db_utils.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vectordb/mongodb.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vectordb/postgres.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp/vectordb/qdrant.py +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp.egg-info/dependency_links.txt +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp.egg-info/entry_points.txt +0 -0
- {vector_mcp-3.3.6 → vector_mcp-3.3.8}/vector_mcp.egg-info/top_level.txt +0 -0
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: vector-mcp
|
|
3
|
-
Version: 3.3.
|
|
4
|
-
Summary: Governed vector retrieval over native
|
|
3
|
+
Version: 3.3.8
|
|
4
|
+
Summary: Governed vector retrieval over native medulla and secure opt-in providers.
|
|
5
5
|
Author-email: Repository Maintainers <maintainers@knuckles.team>
|
|
6
6
|
License: MIT
|
|
7
7
|
Classifier: Development Status :: 5 - Production/Stable
|
|
@@ -12,7 +12,7 @@ Classifier: Programming Language :: Python :: 3
|
|
|
12
12
|
Requires-Python: >=3.12
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
License-File: LICENSE
|
|
15
|
-
Requires-Dist: scion-sdk[mcp]<0.
|
|
15
|
+
Requires-Dist: scion-sdk[mcp]<1.0.0,>=0.9.0
|
|
16
16
|
Requires-Dist: markdownify>=1.2.3
|
|
17
17
|
Requires-Dist: beautifulsoup4>=4.15.0
|
|
18
18
|
Requires-Dist: ebooklib>=0.20
|
|
@@ -23,15 +23,15 @@ Requires-Dist: pypdf>=6.14.2
|
|
|
23
23
|
Requires-Dist: llama-index-core>=0.14.23
|
|
24
24
|
Requires-Dist: llama-index-readers-file>=0.6.0
|
|
25
25
|
Provides-Extra: mcp
|
|
26
|
-
Requires-Dist: scion-sdk[mcp]<0.
|
|
26
|
+
Requires-Dist: scion-sdk[mcp]<1.0.0,>=0.9.0; extra == "mcp"
|
|
27
27
|
Provides-Extra: postgres
|
|
28
|
-
Requires-Dist: scion-sdk[vector]<0.
|
|
28
|
+
Requires-Dist: scion-sdk[mcp,vector]<1.0.0,>=0.9.0; extra == "postgres"
|
|
29
29
|
Provides-Extra: qdrant
|
|
30
|
-
Requires-Dist: scion-sdk[vector]<0.
|
|
30
|
+
Requires-Dist: scion-sdk[mcp,vector]<1.0.0,>=0.9.0; extra == "qdrant"
|
|
31
31
|
Provides-Extra: mongodb
|
|
32
|
-
Requires-Dist: scion-sdk[vector]<0.
|
|
32
|
+
Requires-Dist: scion-sdk[mcp,vector]<1.0.0,>=0.9.0; extra == "mongodb"
|
|
33
33
|
Provides-Extra: chromadb
|
|
34
|
-
Requires-Dist: scion-sdk[vector-chroma]<0.
|
|
34
|
+
Requires-Dist: scion-sdk[mcp,vector-chroma]<1.0.0,>=0.9.0; extra == "chromadb"
|
|
35
35
|
Provides-Extra: all
|
|
36
36
|
Requires-Dist: vector-mcp[chromadb,mcp,mongodb,postgres,qdrant]>=2.1.2; extra == "all"
|
|
37
37
|
Provides-Extra: test
|
|
@@ -44,13 +44,13 @@ Dynamic: license-file
|
|
|
44
44
|
# vector-mcp
|
|
45
45
|
|
|
46
46
|
Action-routed MCP and agent interfaces for governed vector collection management and retrieval.
|
|
47
|
-
The native default is
|
|
47
|
+
The native default is medulla. Secure opt-in providers cover PostgreSQL/pgvector,
|
|
48
48
|
Qdrant, and MongoDB Atlas.
|
|
49
49
|
|
|
50
50
|
<!-- GOVERNED-CAPABILITY:START -->
|
|
51
51
|
## Governed capability
|
|
52
52
|
|
|
53
|
-
- MCP tools: `
|
|
53
|
+
- MCP tools: `vector_create_collection`, `vector_add_documents`, `vector_delete_collection`, `vector_list_collections`, `vector_semantic_search`, `vector_lexical_search` and `vector_search`
|
|
54
54
|
- Skill provider: the consolidated `vector-mcp-operations` workflow
|
|
55
55
|
- Ontology provider: the packaged vector retrieval ontology
|
|
56
56
|
- Source connector provider: a read-only vector collection inventory preset
|
|
@@ -67,7 +67,7 @@ uvx --from 'vector-mcp[mcp]' vector-mcp
|
|
|
67
67
|
```
|
|
68
68
|
|
|
69
69
|
The runtime requires `scion-sdk>=0.2.0` and its self-contained full
|
|
70
|
-
|
|
70
|
+
medulla engine contract. A bare numeric-only or partial engine profile is not a
|
|
71
71
|
supported deployment.
|
|
72
72
|
|
|
73
73
|
For a selected storage provider:
|
|
@@ -105,8 +105,8 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
105
105
|
|
|
106
106
|
| MCP Tool | Toggle Env Var | Description |
|
|
107
107
|
|----------|----------------|-------------|
|
|
108
|
-
| `
|
|
109
|
-
| `vector_search` | `SEARCHTOOL` |
|
|
108
|
+
| `vector_create_collection`, `vector_add_documents`, `vector_delete_collection`, `vector_list_collections` | `COLLECTION_MANAGEMENTTOOL` | Collection lifecycle. |
|
|
109
|
+
| `vector_semantic_search`, `vector_lexical_search`, `vector_search` | `SEARCHTOOL` | Semantic, lexical and fused retrieval. |
|
|
110
110
|
|
|
111
111
|
_2 action-routed tool(s) · 0 verbose 1:1 tool(s). Each is enabled unless its `<DOMAIN>TOOL` toggle is set false; `MCP_TOOL_MODE` selects the surface (**`intent` default** — the six verb-tools, granular set loaded on demand · `condensed` action-routed · `verbose` 1:1 · `both`). Auto-generated — do not edit._
|
|
112
112
|
<!-- MCP-TOOLS-TABLE:END -->
|
|
@@ -156,7 +156,7 @@ When query strings or parameters are provided, an LLM-free **Knowledge Graph res
|
|
|
156
156
|
"env": {
|
|
157
157
|
"MCP_TOOL_MODE": "intent",
|
|
158
158
|
"COLLECTION_MANAGEMENTTOOL": "True",
|
|
159
|
-
"DATABASE_TYPE": "
|
|
159
|
+
"DATABASE_TYPE": "medulla",
|
|
160
160
|
"DB_PASSWORD_REF": "secret://runtime/db-password",
|
|
161
161
|
"DB_PORT": "5432",
|
|
162
162
|
"DB_USERNAME_REF": "secret://runtime/db-username",
|
|
@@ -168,7 +168,7 @@ When query strings or parameters are provided, an LLM-free **Knowledge Graph res
|
|
|
168
168
|
"QDRANT_API_KEY_REF": "secret://runtime/qdrant-api-key",
|
|
169
169
|
"QDRANT_REQUEST_TIMEOUT": "30",
|
|
170
170
|
"SEARCHTOOL": "True",
|
|
171
|
-
"VECTOR_DB_TYPE": "
|
|
171
|
+
"VECTOR_DB_TYPE": "medulla"
|
|
172
172
|
}
|
|
173
173
|
}
|
|
174
174
|
}
|
|
@@ -201,7 +201,7 @@ own runtime secret boundary.
|
|
|
201
201
|
"PORT": "8000",
|
|
202
202
|
"MCP_TOOL_MODE": "intent",
|
|
203
203
|
"COLLECTION_MANAGEMENTTOOL": "True",
|
|
204
|
-
"DATABASE_TYPE": "
|
|
204
|
+
"DATABASE_TYPE": "medulla",
|
|
205
205
|
"DB_PASSWORD_REF": "secret://runtime/db-password",
|
|
206
206
|
"DB_PORT": "5432",
|
|
207
207
|
"DB_USERNAME_REF": "secret://runtime/db-username",
|
|
@@ -213,7 +213,7 @@ own runtime secret boundary.
|
|
|
213
213
|
"QDRANT_API_KEY_REF": "secret://runtime/qdrant-api-key",
|
|
214
214
|
"QDRANT_REQUEST_TIMEOUT": "30",
|
|
215
215
|
"SEARCHTOOL": "True",
|
|
216
|
-
"VECTOR_DB_TYPE": "
|
|
216
|
+
"VECTOR_DB_TYPE": "medulla"
|
|
217
217
|
}
|
|
218
218
|
}
|
|
219
219
|
}
|
|
@@ -245,7 +245,7 @@ docker run -i --rm \
|
|
|
245
245
|
-e TRANSPORT=stdio \
|
|
246
246
|
-e MCP_TOOL_MODE=intent \
|
|
247
247
|
-e COLLECTION_MANAGEMENTTOOL=True \
|
|
248
|
-
-e DATABASE_TYPE=
|
|
248
|
+
-e DATABASE_TYPE=medulla \
|
|
249
249
|
-e DB_PASSWORD_REF \
|
|
250
250
|
-e DB_PORT=5432 \
|
|
251
251
|
-e DB_USERNAME_REF \
|
|
@@ -257,7 +257,7 @@ docker run -i --rm \
|
|
|
257
257
|
-e QDRANT_API_KEY_REF \
|
|
258
258
|
-e QDRANT_REQUEST_TIMEOUT=30 \
|
|
259
259
|
-e SEARCHTOOL=True \
|
|
260
|
-
-e VECTOR_DB_TYPE=
|
|
260
|
+
-e VECTOR_DB_TYPE=medulla \
|
|
261
261
|
registry.example.invalid/vector-mcp@sha256:<digest> vector-mcp
|
|
262
262
|
```
|
|
263
263
|
|
|
@@ -300,8 +300,8 @@ consumed from a **remote deployment**. The
|
|
|
300
300
|
| `ENABLE_OTEL` | — | |
|
|
301
301
|
| `EMBEDDING_TLS_PROFILE_REF` | `secret://runtime/embedding-tls-profile` | Configure AgentConfig EMBEDDING_MODELS and its referenced runtime credentials. |
|
|
302
302
|
| `DOCUMENT_DIRECTORY` | — | Required only for filesystem ingestion. Supply the operator-owned root at runtime. |
|
|
303
|
-
| `DATABASE_TYPE` | `
|
|
304
|
-
| `VECTOR_DB_TYPE` | `
|
|
303
|
+
| `DATABASE_TYPE` | `medulla` | Backend used when db_type is unspecified. Default is the native medulla engine (local, zero-infra, durable). Options: medulla, postgres, mongodb, qdrant. DATABASE_TYPE is the canonical variable; VECTOR_DB_TYPE is accepted as an alias for backward compatibility. |
|
|
304
|
+
| `VECTOR_DB_TYPE` | `medulla` | |
|
|
305
305
|
| `DB_HOST` | — | postgres/qdrant host |
|
|
306
306
|
| `DBNAME` | — | postgres/mongodb database name |
|
|
307
307
|
| `DB_PORT` | `5432` | |
|
|
@@ -351,7 +351,7 @@ _25 package + 20 inherited variable(s). Auto-generated from `.env.example` + the
|
|
|
351
351
|
|
|
352
352
|
Every variable the server reads, grouped by purpose. See [`.env.example`](.env.example) for the
|
|
353
353
|
canonical, copy-paste list — including the `DATABASE_TYPE` / `GRAPH_SERVICE_SOCKET` /
|
|
354
|
-
`GRAPH_SERVICE_AUTH_SECRET` connection settings for the native
|
|
354
|
+
`GRAPH_SERVICE_AUTH_SECRET` connection settings for the native medulla backend. Backend
|
|
355
355
|
endpoints, database locations, and credentials for opt-in providers (Postgres/Qdrant/Mongo/
|
|
356
356
|
Chroma/Couchbase) are never README-documented literal values or MCP tool arguments — they resolve
|
|
357
357
|
through AgentConfig and `secret://`/`env://`/`vault://` references at runtime.
|
|
@@ -465,7 +465,7 @@ Pick the extra that matches what the operator want to run:
|
|
|
465
465
|
# MCP server only (recommended for tool hosting — slim deps)
|
|
466
466
|
uv pip install "vector-mcp[mcp]"
|
|
467
467
|
|
|
468
|
-
# Full agent runtime (Pydantic AI +
|
|
468
|
+
# Full agent runtime (Pydantic AI + medulla engine)
|
|
469
469
|
uv pip install "vector-mcp[mcp]"
|
|
470
470
|
|
|
471
471
|
# Everything (development)
|
|
@@ -485,12 +485,12 @@ docker build -t knucklessg1/vector-mcp:mcp docker/
|
|
|
485
485
|
The render command creates the release-owned `docker/mcp.compose.yml`; it runs the image with
|
|
486
486
|
the configured host publication.
|
|
487
487
|
|
|
488
|
-
### Knowledge-graph database (`
|
|
488
|
+
### Knowledge-graph database (`medulla`)
|
|
489
489
|
|
|
490
|
-
Graph storage, vector search and queries are served by **
|
|
490
|
+
Graph storage, vector search and queries are served by **medulla**, run as its own
|
|
491
491
|
database container. Deployment recipes (single-node + Raft HA), connection config, and the
|
|
492
492
|
database architecture are in the
|
|
493
|
-
[
|
|
493
|
+
[medulla deployment guide](https://knuckles-team.github.io/medulla/deployment/).
|
|
494
494
|
|
|
495
495
|
## Repository Owners
|
|
496
496
|
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
# vector-mcp
|
|
2
2
|
|
|
3
3
|
Action-routed MCP and agent interfaces for governed vector collection management and retrieval.
|
|
4
|
-
The native default is
|
|
4
|
+
The native default is medulla. Secure opt-in providers cover PostgreSQL/pgvector,
|
|
5
5
|
Qdrant, and MongoDB Atlas.
|
|
6
6
|
|
|
7
7
|
<!-- GOVERNED-CAPABILITY:START -->
|
|
8
8
|
## Governed capability
|
|
9
9
|
|
|
10
|
-
- MCP tools: `
|
|
10
|
+
- MCP tools: `vector_create_collection`, `vector_add_documents`, `vector_delete_collection`, `vector_list_collections`, `vector_semantic_search`, `vector_lexical_search` and `vector_search`
|
|
11
11
|
- Skill provider: the consolidated `vector-mcp-operations` workflow
|
|
12
12
|
- Ontology provider: the packaged vector retrieval ontology
|
|
13
13
|
- Source connector provider: a read-only vector collection inventory preset
|
|
@@ -24,7 +24,7 @@ uvx --from 'vector-mcp[mcp]' vector-mcp
|
|
|
24
24
|
```
|
|
25
25
|
|
|
26
26
|
The runtime requires `scion-sdk>=0.2.0` and its self-contained full
|
|
27
|
-
|
|
27
|
+
medulla engine contract. A bare numeric-only or partial engine profile is not a
|
|
28
28
|
supported deployment.
|
|
29
29
|
|
|
30
30
|
For a selected storage provider:
|
|
@@ -62,8 +62,8 @@ _Auto-generated from the live MCP server — do not edit by hand._
|
|
|
62
62
|
|
|
63
63
|
| MCP Tool | Toggle Env Var | Description |
|
|
64
64
|
|----------|----------------|-------------|
|
|
65
|
-
| `
|
|
66
|
-
| `vector_search` | `SEARCHTOOL` |
|
|
65
|
+
| `vector_create_collection`, `vector_add_documents`, `vector_delete_collection`, `vector_list_collections` | `COLLECTION_MANAGEMENTTOOL` | Collection lifecycle. |
|
|
66
|
+
| `vector_semantic_search`, `vector_lexical_search`, `vector_search` | `SEARCHTOOL` | Semantic, lexical and fused retrieval. |
|
|
67
67
|
|
|
68
68
|
_2 action-routed tool(s) · 0 verbose 1:1 tool(s). Each is enabled unless its `<DOMAIN>TOOL` toggle is set false; `MCP_TOOL_MODE` selects the surface (**`intent` default** — the six verb-tools, granular set loaded on demand · `condensed` action-routed · `verbose` 1:1 · `both`). Auto-generated — do not edit._
|
|
69
69
|
<!-- MCP-TOOLS-TABLE:END -->
|
|
@@ -113,7 +113,7 @@ When query strings or parameters are provided, an LLM-free **Knowledge Graph res
|
|
|
113
113
|
"env": {
|
|
114
114
|
"MCP_TOOL_MODE": "intent",
|
|
115
115
|
"COLLECTION_MANAGEMENTTOOL": "True",
|
|
116
|
-
"DATABASE_TYPE": "
|
|
116
|
+
"DATABASE_TYPE": "medulla",
|
|
117
117
|
"DB_PASSWORD_REF": "secret://runtime/db-password",
|
|
118
118
|
"DB_PORT": "5432",
|
|
119
119
|
"DB_USERNAME_REF": "secret://runtime/db-username",
|
|
@@ -125,7 +125,7 @@ When query strings or parameters are provided, an LLM-free **Knowledge Graph res
|
|
|
125
125
|
"QDRANT_API_KEY_REF": "secret://runtime/qdrant-api-key",
|
|
126
126
|
"QDRANT_REQUEST_TIMEOUT": "30",
|
|
127
127
|
"SEARCHTOOL": "True",
|
|
128
|
-
"VECTOR_DB_TYPE": "
|
|
128
|
+
"VECTOR_DB_TYPE": "medulla"
|
|
129
129
|
}
|
|
130
130
|
}
|
|
131
131
|
}
|
|
@@ -158,7 +158,7 @@ own runtime secret boundary.
|
|
|
158
158
|
"PORT": "8000",
|
|
159
159
|
"MCP_TOOL_MODE": "intent",
|
|
160
160
|
"COLLECTION_MANAGEMENTTOOL": "True",
|
|
161
|
-
"DATABASE_TYPE": "
|
|
161
|
+
"DATABASE_TYPE": "medulla",
|
|
162
162
|
"DB_PASSWORD_REF": "secret://runtime/db-password",
|
|
163
163
|
"DB_PORT": "5432",
|
|
164
164
|
"DB_USERNAME_REF": "secret://runtime/db-username",
|
|
@@ -170,7 +170,7 @@ own runtime secret boundary.
|
|
|
170
170
|
"QDRANT_API_KEY_REF": "secret://runtime/qdrant-api-key",
|
|
171
171
|
"QDRANT_REQUEST_TIMEOUT": "30",
|
|
172
172
|
"SEARCHTOOL": "True",
|
|
173
|
-
"VECTOR_DB_TYPE": "
|
|
173
|
+
"VECTOR_DB_TYPE": "medulla"
|
|
174
174
|
}
|
|
175
175
|
}
|
|
176
176
|
}
|
|
@@ -202,7 +202,7 @@ docker run -i --rm \
|
|
|
202
202
|
-e TRANSPORT=stdio \
|
|
203
203
|
-e MCP_TOOL_MODE=intent \
|
|
204
204
|
-e COLLECTION_MANAGEMENTTOOL=True \
|
|
205
|
-
-e DATABASE_TYPE=
|
|
205
|
+
-e DATABASE_TYPE=medulla \
|
|
206
206
|
-e DB_PASSWORD_REF \
|
|
207
207
|
-e DB_PORT=5432 \
|
|
208
208
|
-e DB_USERNAME_REF \
|
|
@@ -214,7 +214,7 @@ docker run -i --rm \
|
|
|
214
214
|
-e QDRANT_API_KEY_REF \
|
|
215
215
|
-e QDRANT_REQUEST_TIMEOUT=30 \
|
|
216
216
|
-e SEARCHTOOL=True \
|
|
217
|
-
-e VECTOR_DB_TYPE=
|
|
217
|
+
-e VECTOR_DB_TYPE=medulla \
|
|
218
218
|
registry.example.invalid/vector-mcp@sha256:<digest> vector-mcp
|
|
219
219
|
```
|
|
220
220
|
|
|
@@ -257,8 +257,8 @@ consumed from a **remote deployment**. The
|
|
|
257
257
|
| `ENABLE_OTEL` | — | |
|
|
258
258
|
| `EMBEDDING_TLS_PROFILE_REF` | `secret://runtime/embedding-tls-profile` | Configure AgentConfig EMBEDDING_MODELS and its referenced runtime credentials. |
|
|
259
259
|
| `DOCUMENT_DIRECTORY` | — | Required only for filesystem ingestion. Supply the operator-owned root at runtime. |
|
|
260
|
-
| `DATABASE_TYPE` | `
|
|
261
|
-
| `VECTOR_DB_TYPE` | `
|
|
260
|
+
| `DATABASE_TYPE` | `medulla` | Backend used when db_type is unspecified. Default is the native medulla engine (local, zero-infra, durable). Options: medulla, postgres, mongodb, qdrant. DATABASE_TYPE is the canonical variable; VECTOR_DB_TYPE is accepted as an alias for backward compatibility. |
|
|
261
|
+
| `VECTOR_DB_TYPE` | `medulla` | |
|
|
262
262
|
| `DB_HOST` | — | postgres/qdrant host |
|
|
263
263
|
| `DBNAME` | — | postgres/mongodb database name |
|
|
264
264
|
| `DB_PORT` | `5432` | |
|
|
@@ -308,7 +308,7 @@ _25 package + 20 inherited variable(s). Auto-generated from `.env.example` + the
|
|
|
308
308
|
|
|
309
309
|
Every variable the server reads, grouped by purpose. See [`.env.example`](.env.example) for the
|
|
310
310
|
canonical, copy-paste list — including the `DATABASE_TYPE` / `GRAPH_SERVICE_SOCKET` /
|
|
311
|
-
`GRAPH_SERVICE_AUTH_SECRET` connection settings for the native
|
|
311
|
+
`GRAPH_SERVICE_AUTH_SECRET` connection settings for the native medulla backend. Backend
|
|
312
312
|
endpoints, database locations, and credentials for opt-in providers (Postgres/Qdrant/Mongo/
|
|
313
313
|
Chroma/Couchbase) are never README-documented literal values or MCP tool arguments — they resolve
|
|
314
314
|
through AgentConfig and `secret://`/`env://`/`vault://` references at runtime.
|
|
@@ -422,7 +422,7 @@ Pick the extra that matches what the operator want to run:
|
|
|
422
422
|
# MCP server only (recommended for tool hosting — slim deps)
|
|
423
423
|
uv pip install "vector-mcp[mcp]"
|
|
424
424
|
|
|
425
|
-
# Full agent runtime (Pydantic AI +
|
|
425
|
+
# Full agent runtime (Pydantic AI + medulla engine)
|
|
426
426
|
uv pip install "vector-mcp[mcp]"
|
|
427
427
|
|
|
428
428
|
# Everything (development)
|
|
@@ -442,12 +442,12 @@ docker build -t knucklessg1/vector-mcp:mcp docker/
|
|
|
442
442
|
The render command creates the release-owned `docker/mcp.compose.yml`; it runs the image with
|
|
443
443
|
the configured host publication.
|
|
444
444
|
|
|
445
|
-
### Knowledge-graph database (`
|
|
445
|
+
### Knowledge-graph database (`medulla`)
|
|
446
446
|
|
|
447
|
-
Graph storage, vector search and queries are served by **
|
|
447
|
+
Graph storage, vector search and queries are served by **medulla**, run as its own
|
|
448
448
|
database container. Deployment recipes (single-node + Raft HA), connection config, and the
|
|
449
449
|
database architecture are in the
|
|
450
|
-
[
|
|
450
|
+
[medulla deployment guide](https://knuckles-team.github.io/medulla/deployment/).
|
|
451
451
|
|
|
452
452
|
## Repository Owners
|
|
453
453
|
|
|
@@ -4,12 +4,12 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "vector-mcp"
|
|
7
|
-
version = "3.3.
|
|
8
|
-
description = "Governed vector retrieval over native
|
|
7
|
+
version = "3.3.8"
|
|
8
|
+
description = "Governed vector retrieval over native medulla and secure opt-in providers."
|
|
9
9
|
readme = "README.md"
|
|
10
10
|
classifiers = [ "Development Status :: 5 - Production/Stable", "License :: Public Domain", "Environment :: Console", "Operating System :: POSIX :: Linux", "Programming Language :: Python :: 3",]
|
|
11
11
|
requires-python = ">=3.12"
|
|
12
|
-
dependencies = [ "scion-sdk[mcp]>=0.
|
|
12
|
+
dependencies = [ "scion-sdk[mcp]>=0.9.0,<1.0.0", "markdownify>=1.2.3", "beautifulsoup4>=4.15.0", "ebooklib>=0.20", "html2text>=2025.4.15", "ipython>=9.15.0", "platformdirs>=4.11.0", "pypdf>=6.14.2", "llama-index-core>=0.14.23", "llama-index-readers-file>=0.6.0",]
|
|
13
13
|
[[project.authors]]
|
|
14
14
|
name = "Repository Maintainers"
|
|
15
15
|
email = "maintainers@knuckles.team"
|
|
@@ -18,11 +18,11 @@ email = "maintainers@knuckles.team"
|
|
|
18
18
|
text = "MIT"
|
|
19
19
|
|
|
20
20
|
[project.optional-dependencies]
|
|
21
|
-
mcp = [ "scion-sdk[mcp]>=0.
|
|
22
|
-
postgres = [ "scion-sdk[vector]>=0.
|
|
23
|
-
qdrant = [ "scion-sdk[vector]>=0.
|
|
24
|
-
mongodb = [ "scion-sdk[vector]>=0.
|
|
25
|
-
chromadb = [ "scion-sdk[vector-chroma]>=0.
|
|
21
|
+
mcp = [ "scion-sdk[mcp]>=0.9.0,<1.0.0",]
|
|
22
|
+
postgres = [ "scion-sdk[vector,mcp]>=0.9.0,<1.0.0",]
|
|
23
|
+
qdrant = [ "scion-sdk[vector,mcp]>=0.9.0,<1.0.0",]
|
|
24
|
+
mongodb = [ "scion-sdk[vector,mcp]>=0.9.0,<1.0.0",]
|
|
25
|
+
chromadb = [ "scion-sdk[vector-chroma,mcp]>=0.9.0,<1.0.0",]
|
|
26
26
|
all = [ "vector-mcp[mcp,postgres,qdrant,mongodb,chromadb]>=2.1.2",]
|
|
27
27
|
test = [
|
|
28
28
|
"pytest-xdist>=3.8.0", "pytest>=9.1.1", "pytest-asyncio>=1.4.0", "pytest-cov>=7.1.0",]
|
|
@@ -6,7 +6,7 @@ import pytest
|
|
|
6
6
|
@pytest.fixture
|
|
7
7
|
def mock_env(monkeypatch):
|
|
8
8
|
"""Select the native provider without adding endpoint configuration."""
|
|
9
|
-
monkeypatch.setenv("DATABASE_TYPE", "
|
|
9
|
+
monkeypatch.setenv("DATABASE_TYPE", "medulla")
|
|
10
10
|
|
|
11
11
|
|
|
12
12
|
@pytest.fixture(autouse=True)
|
|
@@ -18,15 +18,13 @@ def _tls():
|
|
|
18
18
|
)
|
|
19
19
|
|
|
20
20
|
|
|
21
|
-
@pytest.mark.parametrize("name", ["
|
|
21
|
+
@pytest.mark.parametrize("name", ["medulla", "postgres", "mongodb", "qdrant"])
|
|
22
22
|
def test_only_current_backend_names_are_available(name: str) -> None:
|
|
23
23
|
assert ensure_backend_available(name) == name
|
|
24
24
|
assert backend_status(name)["available"] is True
|
|
25
25
|
|
|
26
26
|
|
|
27
|
-
@pytest.mark.parametrize(
|
|
28
|
-
"removed", ["epistemic-graph", "eg", "chroma", "chromadb", "couchbase"]
|
|
29
|
-
)
|
|
27
|
+
@pytest.mark.parametrize("removed", ["eg", "chroma", "chromadb", "couchbase"])
|
|
30
28
|
def test_removed_or_legacy_backend_names_are_rejected(removed: str) -> None:
|
|
31
29
|
with pytest.raises(ValueError, match="vector_backend_unsupported"):
|
|
32
30
|
ensure_backend_available(removed)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"""Identity-scoped collection auto-load (CONCEPT:AU-OS.identity.identity-scoped-resource-autoload).
|
|
2
2
|
|
|
3
|
-
``
|
|
3
|
+
``vector_list_collections`` routes the
|
|
4
4
|
returned collection names through the shared scion-sdk entitlement
|
|
5
5
|
resolver so a caller's Okta/Keycloak groups scope which collections they
|
|
6
6
|
see. The resolver itself is tested in scion-sdk; here we mock the
|
|
@@ -62,7 +62,7 @@ async def test_vector_collection_management_tools(mock_client_methods):
|
|
|
62
62
|
res = await mcp.call_tool(
|
|
63
63
|
"vector_create_collection",
|
|
64
64
|
{
|
|
65
|
-
"db_type": "
|
|
65
|
+
"db_type": "medulla",
|
|
66
66
|
"collection_name": "test_collection",
|
|
67
67
|
"overwrite": True,
|
|
68
68
|
},
|
|
@@ -71,7 +71,7 @@ async def test_vector_collection_management_tools(mock_client_methods):
|
|
|
71
71
|
assert "status" in res.content[0].text
|
|
72
72
|
assert "created" in res.content[0].text
|
|
73
73
|
mock_client_methods.create_collection.assert_called_once_with(
|
|
74
|
-
db_type="
|
|
74
|
+
db_type="medulla", collection_name="test_collection", overwrite=True
|
|
75
75
|
)
|
|
76
76
|
|
|
77
77
|
# 2. Test add_documents
|
|
@@ -80,7 +80,7 @@ async def test_vector_collection_management_tools(mock_client_methods):
|
|
|
80
80
|
res = await mcp.call_tool(
|
|
81
81
|
"vector_add_documents",
|
|
82
82
|
{
|
|
83
|
-
"db_type": "
|
|
83
|
+
"db_type": "medulla",
|
|
84
84
|
"collection_name": "test_collection",
|
|
85
85
|
"document_contents": ["Hello world"],
|
|
86
86
|
},
|
|
@@ -88,7 +88,7 @@ async def test_vector_collection_management_tools(mock_client_methods):
|
|
|
88
88
|
assert "status" in res.content[0].text
|
|
89
89
|
assert "added" in res.content[0].text
|
|
90
90
|
mock_client_methods.add_documents.assert_called_once_with(
|
|
91
|
-
db_type="
|
|
91
|
+
db_type="medulla",
|
|
92
92
|
collection_name="test_collection",
|
|
93
93
|
document_contents=["Hello world"],
|
|
94
94
|
)
|
|
@@ -99,7 +99,7 @@ async def test_vector_collection_management_tools(mock_client_methods):
|
|
|
99
99
|
res = await mcp.call_tool(
|
|
100
100
|
"vector_delete_collection",
|
|
101
101
|
{
|
|
102
|
-
"db_type": "
|
|
102
|
+
"db_type": "medulla",
|
|
103
103
|
"collection_name": "test_collection",
|
|
104
104
|
"confirm": True,
|
|
105
105
|
},
|
|
@@ -107,7 +107,7 @@ async def test_vector_collection_management_tools(mock_client_methods):
|
|
|
107
107
|
assert "status" in res.content[0].text
|
|
108
108
|
assert "deleted" in res.content[0].text
|
|
109
109
|
mock_client_methods.delete_collection.assert_called_once_with(
|
|
110
|
-
db_type="
|
|
110
|
+
db_type="medulla", collection_name="test_collection", confirm=True
|
|
111
111
|
)
|
|
112
112
|
|
|
113
113
|
# 4. Test list_collections
|
|
@@ -118,13 +118,11 @@ async def test_vector_collection_management_tools(mock_client_methods):
|
|
|
118
118
|
res = await mcp.call_tool(
|
|
119
119
|
"vector_list_collections",
|
|
120
120
|
{
|
|
121
|
-
"db_type": "
|
|
121
|
+
"db_type": "medulla",
|
|
122
122
|
},
|
|
123
123
|
)
|
|
124
124
|
assert "col1" in res.content[0].text
|
|
125
|
-
mock_client_methods.list_collections.assert_called_once_with(
|
|
126
|
-
db_type="epistemic_graph"
|
|
127
|
-
)
|
|
125
|
+
mock_client_methods.list_collections.assert_called_once_with(db_type="medulla")
|
|
128
126
|
|
|
129
127
|
# 5. The action-routed tool is gone
|
|
130
128
|
with pytest.raises(Exception, match="Unknown tool"):
|
|
@@ -141,7 +139,7 @@ async def test_vector_search_tools(mock_client_methods):
|
|
|
141
139
|
res = await mcp.call_tool(
|
|
142
140
|
"vector_semantic_search",
|
|
143
141
|
{
|
|
144
|
-
"db_type": "
|
|
142
|
+
"db_type": "medulla",
|
|
145
143
|
"collection_name": "test_collection",
|
|
146
144
|
"question": "What is AI?",
|
|
147
145
|
"number_results": 5,
|
|
@@ -149,7 +147,7 @@ async def test_vector_search_tools(mock_client_methods):
|
|
|
149
147
|
)
|
|
150
148
|
assert "results" in res.content[0].text
|
|
151
149
|
mock_client_methods.semantic_search.assert_called_once_with(
|
|
152
|
-
db_type="
|
|
150
|
+
db_type="medulla",
|
|
153
151
|
collection_name="test_collection",
|
|
154
152
|
question="What is AI?",
|
|
155
153
|
number_results=5,
|
|
@@ -161,7 +159,7 @@ async def test_vector_search_tools(mock_client_methods):
|
|
|
161
159
|
res = await mcp.call_tool(
|
|
162
160
|
"vector_lexical_search",
|
|
163
161
|
{
|
|
164
|
-
"db_type": "
|
|
162
|
+
"db_type": "medulla",
|
|
165
163
|
"collection_name": "test_collection",
|
|
166
164
|
"question": "What is AI?",
|
|
167
165
|
"number_results": 3,
|
|
@@ -169,7 +167,7 @@ async def test_vector_search_tools(mock_client_methods):
|
|
|
169
167
|
)
|
|
170
168
|
assert "results" in res.content[0].text
|
|
171
169
|
mock_client_methods.lexical_search.assert_called_once_with(
|
|
172
|
-
db_type="
|
|
170
|
+
db_type="medulla",
|
|
173
171
|
collection_name="test_collection",
|
|
174
172
|
question="What is AI?",
|
|
175
173
|
number_results=3,
|
|
@@ -181,7 +179,7 @@ async def test_vector_search_tools(mock_client_methods):
|
|
|
181
179
|
res = await mcp.call_tool(
|
|
182
180
|
"vector_search",
|
|
183
181
|
{
|
|
184
|
-
"db_type": "
|
|
182
|
+
"db_type": "medulla",
|
|
185
183
|
"collection_name": "test_collection",
|
|
186
184
|
"question": "What is AI?",
|
|
187
185
|
"number_results": 2,
|
|
@@ -192,7 +190,7 @@ async def test_vector_search_tools(mock_client_methods):
|
|
|
192
190
|
)
|
|
193
191
|
assert "results" in res.content[0].text
|
|
194
192
|
mock_client_methods.search.assert_called_once_with(
|
|
195
|
-
db_type="
|
|
193
|
+
db_type="medulla",
|
|
196
194
|
collection_name="test_collection",
|
|
197
195
|
question="What is AI?",
|
|
198
196
|
number_results=2,
|
|
@@ -222,7 +220,15 @@ def test_mcp_server_cli_execution():
|
|
|
222
220
|
with (
|
|
223
221
|
patch(
|
|
224
222
|
"sys.argv",
|
|
225
|
-
[
|
|
223
|
+
[
|
|
224
|
+
"mcp_server",
|
|
225
|
+
"--transport",
|
|
226
|
+
transport,
|
|
227
|
+
"--host",
|
|
228
|
+
"127.0.0.1",
|
|
229
|
+
"--port",
|
|
230
|
+
"8000",
|
|
231
|
+
],
|
|
226
232
|
),
|
|
227
233
|
patch("fastmcp.FastMCP.run") as mock_run,
|
|
228
234
|
pytest.raises(SystemExit),
|
|
@@ -256,7 +262,9 @@ def test_mcp_server_cli_execution():
|
|
|
256
262
|
patch("fastmcp.FastMCP.run") as mock_run,
|
|
257
263
|
):
|
|
258
264
|
mcp_server()
|
|
259
|
-
mock_run.assert_called_once_with(
|
|
265
|
+
mock_run.assert_called_once_with(
|
|
266
|
+
transport=transport, host="127.0.0.1", port=8000
|
|
267
|
+
)
|
|
260
268
|
|
|
261
269
|
# Test invalid transport (which results in SystemExit 2 via argparse parsing)
|
|
262
270
|
with (
|
|
@@ -5,12 +5,12 @@ from vector_mcp.vectordb.base import VectorDBFactory
|
|
|
5
5
|
|
|
6
6
|
def test_factory_advertises_only_current_contract_backends() -> None:
|
|
7
7
|
assert VectorDBFactory.PREDEFINED_VECTOR_DB == [
|
|
8
|
-
"
|
|
8
|
+
"medulla",
|
|
9
9
|
"postgres",
|
|
10
10
|
"mongodb",
|
|
11
11
|
"qdrant",
|
|
12
12
|
]
|
|
13
|
-
assert VectorDBFactory.DEFAULT_VECTOR_DB == "
|
|
13
|
+
assert VectorDBFactory.DEFAULT_VECTOR_DB == "medulla"
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
def test_factory_rejects_removed_backend() -> None:
|
|
@@ -253,7 +253,7 @@ def test_postgres_existing_collection_rejects_embedding_dimension_drift() -> Non
|
|
|
253
253
|
|
|
254
254
|
|
|
255
255
|
def test_native_backend_delegates_without_transport_arguments(monkeypatch) -> None:
|
|
256
|
-
from vector_mcp.vectordb import
|
|
256
|
+
from vector_mcp.vectordb import medulla
|
|
257
257
|
|
|
258
258
|
control = MagicMock()
|
|
259
259
|
control.tenants.list.return_value = []
|
|
@@ -270,14 +270,12 @@ def test_native_backend_delegates_without_transport_arguments(monkeypatch) -> No
|
|
|
270
270
|
"policy_version": "current",
|
|
271
271
|
}
|
|
272
272
|
)
|
|
273
|
-
monkeypatch.setattr(
|
|
273
|
+
monkeypatch.setattr(medulla, "resolve_session", lambda: session)
|
|
274
274
|
monkeypatch.setattr(
|
|
275
|
-
|
|
275
|
+
medulla, "engine_connection", lambda: {"tcp_addr": "127.0.0.1:1"}
|
|
276
276
|
)
|
|
277
|
-
monkeypatch.setattr(
|
|
278
|
-
|
|
279
|
-
)
|
|
280
|
-
database = epistemic_graph.EpistemicGraphVectorDB(embed_model=_embedder())
|
|
277
|
+
monkeypatch.setattr(medulla, "SyncMedullaClient", SimpleNamespace(connect=connect))
|
|
278
|
+
database = medulla.MedullaVectorDB(embed_model=_embedder())
|
|
281
279
|
|
|
282
280
|
database.create_collection("knowledge")
|
|
283
281
|
|
|
@@ -289,14 +287,14 @@ def test_native_backend_delegates_without_transport_arguments(monkeypatch) -> No
|
|
|
289
287
|
|
|
290
288
|
|
|
291
289
|
def test_native_ingestion_batches_existence_and_embeddings() -> None:
|
|
292
|
-
from vector_mcp.vectordb import
|
|
290
|
+
from vector_mcp.vectordb import medulla
|
|
293
291
|
|
|
294
292
|
client = MagicMock()
|
|
295
293
|
client.nodes.has_batch.return_value = {"one": False, "two": False}
|
|
296
294
|
client.txn.begin.return_value = "transaction"
|
|
297
295
|
client.txn.commit.return_value = True
|
|
298
296
|
embedder = _batch_embedder()
|
|
299
|
-
database =
|
|
297
|
+
database = medulla.MedullaVectorDB(embed_model=embedder)
|
|
300
298
|
database._client_for = MagicMock(return_value=client)
|
|
301
299
|
|
|
302
300
|
database.insert_documents(
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"""The engine request context carries the deployment's configured audience."""
|
|
2
|
+
|
|
3
|
+
from vector_mcp.session import EngineSession
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
def test_default_audience_is_medulla() -> None:
|
|
7
|
+
ctx = EngineSession("a", "t", ("r",), ("graph:read",)).engine_verified_context()
|
|
8
|
+
assert ctx["audience"] == "medulla"
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
def test_configured_audience_reaches_the_context() -> None:
|
|
12
|
+
session = EngineSession("a", "t", (), ("graph:read",), audience="agent-services")
|
|
13
|
+
assert session.engine_verified_context()["audience"] == "agent-services"
|
|
@@ -6,6 +6,8 @@ import tomllib
|
|
|
6
6
|
from pathlib import Path
|
|
7
7
|
|
|
8
8
|
import pytest
|
|
9
|
+
from packaging.requirements import Requirement
|
|
10
|
+
from packaging.version import Version
|
|
9
11
|
|
|
10
12
|
PYPROJECT = Path(__file__).resolve().parents[1] / "pyproject.toml"
|
|
11
13
|
STORE_CLIENTS = (
|
|
@@ -22,13 +24,19 @@ def test_store_extras_come_from_the_sdk() -> None:
|
|
|
22
24
|
project = tomllib.loads(PYPROJECT.read_text(encoding="utf-8"))["project"]
|
|
23
25
|
extras = project["optional-dependencies"]
|
|
24
26
|
expected = {
|
|
25
|
-
"postgres": "
|
|
26
|
-
"qdrant": "
|
|
27
|
-
"mongodb": "
|
|
28
|
-
"chromadb": "
|
|
27
|
+
"postgres": "vector",
|
|
28
|
+
"qdrant": "vector",
|
|
29
|
+
"mongodb": "vector",
|
|
30
|
+
"chromadb": "vector-chroma",
|
|
29
31
|
}
|
|
30
|
-
for extra,
|
|
31
|
-
assert extras[extra] ==
|
|
32
|
+
for extra, sdk_extra in expected.items():
|
|
33
|
+
assert len(extras[extra]) == 1
|
|
34
|
+
sdk = Requirement(extras[extra][0])
|
|
35
|
+
assert sdk.name == "scion-sdk"
|
|
36
|
+
assert sdk_extra in sdk.extras
|
|
37
|
+
floor = max(Version(s.version) for s in sdk.specifier if s.operator == ">=")
|
|
38
|
+
assert floor >= Version("0.7.0")
|
|
39
|
+
assert not sdk.specifier.contains("0.8.0")
|
|
32
40
|
pinned = [*project["dependencies"], *(r for reqs in extras.values() for r in reqs)]
|
|
33
41
|
for requirement in pinned:
|
|
34
42
|
name = requirement.split("[", 1)[0].split(">", 1)[0].split("=", 1)[0]
|