qdrant-memory-mcp 0.1.0__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.
Files changed (31) hide show
  1. qdrant_memory_mcp-0.1.0/LICENSE +21 -0
  2. qdrant_memory_mcp-0.1.0/MANIFEST.in +6 -0
  3. qdrant_memory_mcp-0.1.0/PKG-INFO +173 -0
  4. qdrant_memory_mcp-0.1.0/README.md +153 -0
  5. qdrant_memory_mcp-0.1.0/README.zh-CN.md +117 -0
  6. qdrant_memory_mcp-0.1.0/docs/architecture.md +19 -0
  7. qdrant_memory_mcp-0.1.0/docs/ci.md +27 -0
  8. qdrant_memory_mcp-0.1.0/docs/publishing.md +56 -0
  9. qdrant_memory_mcp-0.1.0/docs/superpowers/plans/2026-10-13-distribution.md +15 -0
  10. qdrant_memory_mcp-0.1.0/pyproject.toml +39 -0
  11. qdrant_memory_mcp-0.1.0/qdrant_memory_mcp.egg-info/PKG-INFO +173 -0
  12. qdrant_memory_mcp-0.1.0/qdrant_memory_mcp.egg-info/SOURCES.txt +29 -0
  13. qdrant_memory_mcp-0.1.0/qdrant_memory_mcp.egg-info/dependency_links.txt +1 -0
  14. qdrant_memory_mcp-0.1.0/qdrant_memory_mcp.egg-info/entry_points.txt +2 -0
  15. qdrant_memory_mcp-0.1.0/qdrant_memory_mcp.egg-info/requires.txt +1 -0
  16. qdrant_memory_mcp-0.1.0/qdrant_memory_mcp.egg-info/top_level.txt +1 -0
  17. qdrant_memory_mcp-0.1.0/runtime-source.json +6 -0
  18. qdrant_memory_mcp-0.1.0/schemas/LICENSE +147 -0
  19. qdrant_memory_mcp-0.1.0/schemas/README.md +7 -0
  20. qdrant_memory_mcp-0.1.0/schemas/server.schema.json +574 -0
  21. qdrant_memory_mcp-0.1.0/scripts/prepare_runtime.py +37 -0
  22. qdrant_memory_mcp-0.1.0/scripts/pypi_release.py +75 -0
  23. qdrant_memory_mcp-0.1.0/scripts/registry_publish.py +44 -0
  24. qdrant_memory_mcp-0.1.0/scripts/verify_metadata.py +50 -0
  25. qdrant_memory_mcp-0.1.0/server.json +35 -0
  26. qdrant_memory_mcp-0.1.0/setup.cfg +4 -0
  27. qdrant_memory_mcp-0.1.0/tests/test_default_profile.py +32 -0
  28. qdrant_memory_mcp-0.1.0/tests/test_distribution.py +56 -0
  29. qdrant_memory_mcp-0.1.0/tests/test_protocol.py +214 -0
  30. qdrant_memory_mcp-0.1.0/tests/test_release_guards.py +82 -0
  31. qdrant_memory_mcp-0.1.0/tests/test_runtime_source.py +29 -0
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Kang Liu
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,6 @@
1
+ include server.json runtime-source.json README.zh-CN.md
2
+ recursive-include schemas *.json
3
+ include schemas/LICENSE schemas/README.md
4
+ recursive-include scripts *.py
5
+ recursive-include tests *.py
6
+ recursive-include docs *.md
@@ -0,0 +1,173 @@
1
+ Metadata-Version: 2.4
2
+ Name: qdrant-memory-mcp
3
+ Version: 0.1.0
4
+ Summary: Metadata-only stdio MCP distribution of the Qdrant Memory Runtime
5
+ License-Expression: MIT
6
+ Project-URL: Homepage, https://github.com/cnkang/qdrant-memory-mcp
7
+ Project-URL: Repository, https://github.com/cnkang/qdrant-memory-mcp
8
+ Project-URL: Issues, https://github.com/cnkang/qdrant-memory-mcp/issues
9
+ Project-URL: Changelog, https://github.com/cnkang/qdrant-memory-mcp/blob/main/CHANGELOG.md
10
+ Project-URL: Runtime, https://github.com/cnkang/hermes-plugin-qdrant-memory
11
+ Project-URL: Skill, https://github.com/cnkang/skills/tree/main/qdrant-memory
12
+ Keywords: mcp,memory,qdrant,agents
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Operating System :: OS Independent
15
+ Requires-Python: >=3.11
16
+ Description-Content-Type: text/markdown
17
+ License-File: LICENSE
18
+ Requires-Dist: hermes-plugin-qdrant-memory[mcp]==0.2.0
19
+ Dynamic: license-file
20
+
21
+ # Qdrant Memory MCP
22
+
23
+ <!-- mcp-name: io.github.cnkang/qdrant-memory -->
24
+
25
+ [简体中文](README.zh-CN.md)
26
+
27
+ Persistent, scoped memory for AI agents through four explicit **stdio MCP** tools.
28
+ This repository distributes the existing [Python Runtime](https://github.com/cnkang/hermes-plugin-qdrant-memory).
29
+ Its metadata-only wheel contains no Python business implementation. The console
30
+ script points directly to `qdrant_memory.standalone:main` and depends on
31
+ `hermes-plugin-qdrant-memory[mcp]==0.2.0`.
32
+
33
+ **Versions:** MCP distribution 0.1.0 depends on Runtime 0.2.0. Release artifacts
34
+ are available through the [distribution PyPI page](https://pypi.org/project/qdrant-memory-mcp/)
35
+ and [Runtime PyPI page](https://pypi.org/project/hermes-plugin-qdrant-memory/).
36
+ See [release checklist](docs/publishing.md) for the publishing sequence.
37
+
38
+ Runtime, [optional Agent Skill](https://github.com/cnkang/skills/tree/main/qdrant-memory)
39
+ and MCP distribution versions are independent. The Skill is usage guidance,
40
+ not a runtime dependency. Hermes retains its native MemoryProvider, automatic
41
+ extraction and prefetch. Ordinary MCP performs only explicitly requested memory
42
+ operations; it does not automatically extract every conversation turn.
43
+
44
+ ## Install and initialize
45
+
46
+ Requires Python 3.11+ and either [uv](https://docs.astral.sh/uv/) or a Python
47
+ virtual environment. You must configure storage and an embedding service.
48
+ For the example below, run Ollama and install `qwen3-embedding:4b` yourself.
49
+
50
+ Create an operator-owned profile directory and save `qdrant-memory.json` inside:
51
+
52
+ ```json
53
+ {
54
+ "schema_version": 1,
55
+ "scope": {"user_id": "my-user", "agent_id": "my-agent"},
56
+ "qdrant": {"mode": "embedded", "collection": "qdrant_memory"},
57
+ "embedding": {
58
+ "mode": "plugin", "provider": "ollama", "model": "qwen3-embedding:4b",
59
+ "base_url": "http://127.0.0.1:11434", "dimensions": 2560, "distance": "Cosine"
60
+ }
61
+ }
62
+ ```
63
+
64
+ Initialize, then launch (replace `/path/to/profile` with your absolute path):
65
+
66
+ ```bash
67
+ uvx --from qdrant-memory-mcp==0.1.0 qdrant-memory-mcp --home /path/to/profile init
68
+ uvx --from qdrant-memory-mcp==0.1.0 qdrant-memory-mcp --home /path/to/profile mcp
69
+ ```
70
+
71
+ The command without `--home` uses `~/.qdrant-memory`, independent of Hermes.
72
+ Configure and initialize that directory before letting a Registry client launch
73
+ `uvx qdrant-memory-mcp==0.1.0 mcp`. The executable name matches the package name;
74
+ the Registry's positional `mcp` selects protocol mode. Its optional named
75
+ `--home` precedes `mcp` when a client supplies a custom profile.
76
+
77
+ Alternatively:
78
+
79
+ ```bash
80
+ python3 -m venv .venv
81
+ .venv/bin/python -m pip install qdrant-memory-mcp==0.1.0
82
+ .venv/bin/qdrant-memory-mcp --home /path/to/profile init
83
+ .venv/bin/qdrant-memory-mcp --home /path/to/profile mcp
84
+ ```
85
+
86
+ On Windows use `.venv\Scripts\python.exe` and
87
+ `.venv\Scripts\qdrant-memory-mcp.exe`.
88
+
89
+ Qdrant embedded, self-hosted server and Cloud, plus Ollama and OpenAI-compatible
90
+ embeddings, are configured in the Runtime's [configuration reference](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/configuration.md).
91
+ Keep credentials in operator environment variables (`QDRANT_API_KEY`,
92
+ `EMBEDDING_API_KEY`, or configured names); never commit their values.
93
+ Initialization against an existing collection requires explicit operator choice;
94
+ do not use a production destination for a first test.
95
+
96
+ ## Connect a client
97
+
98
+ Codex `config.toml` example:
99
+
100
+ ```toml
101
+ [mcp_servers.qdrant_memory]
102
+ command = "uvx"
103
+ args = ["--from", "qdrant-memory-mcp==0.1.0", "qdrant-memory-mcp", "--home", "/path/to/profile", "mcp"]
104
+ ```
105
+
106
+ OpenCode `opencode.json` example:
107
+
108
+ ```json
109
+ {
110
+ "$schema": "https://opencode.ai/config.json",
111
+ "mcp": {
112
+ "qdrant_memory": {
113
+ "type": "local",
114
+ "command": ["uvx", "--from", "qdrant-memory-mcp==0.1.0", "qdrant-memory-mcp", "--home", "/path/to/profile", "mcp"],
115
+ "enabled": true
116
+ }
117
+ }
118
+ }
119
+ ```
120
+
121
+ Pi needs a separately installed MCP client/extension. In that extension, use
122
+ `command: uvx` and the same argument list. No built-in Pi MCP support or universal
123
+ extension config format is claimed. These are configuration examples; this
124
+ distribution's acceptance tests use the official Python MCP SDK, not live agent
125
+ applications. See the Runtime's [client evidence and limits](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/mcp.md).
126
+
127
+ ## Tools and boundaries
128
+
129
+ | Tool | Input | Result |
130
+ |---|---|---|
131
+ | `qdrant_memory_search` | `query`, optional `category` | Scoped memories with IDs, scores and provenance |
132
+ | `qdrant_memory_add` | `text` | Durable memory ID |
133
+ | `qdrant_memory_update` | exact `id`, replacement `text` | Scoped replacement |
134
+ | `qdrant_memory_delete` | exact `id` | Scoped deletion |
135
+
136
+ Scope is fixed by the operator's profile (`user_id`, `agent_id`). Model inputs
137
+ and MCP client identity cannot override it; knowing an ID does not grant access.
138
+ Migration, export, reset and bulk deletion remain trusted operator CLI commands;
139
+ see [standalone maintenance](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/standalone.md).
140
+ No resources or prompts are advertised. This is a local subprocess, with no
141
+ public HTTP/SSE listener or remote authentication service. Stdout is reserved
142
+ for protocol messages, with sanitized diagnostics on stderr.
143
+
144
+ Data flows from client → Runtime → embedding provider → Qdrant and the local
145
+ SQLite ledger. With local Ollama and embedded Qdrant, memory processing stays
146
+ local; cloud embedding receives memory/query text, and cloud Qdrant receives
147
+ vectors and stored payloads. The client/model may also receive recalled text.
148
+ The operator must authorize retention and access and protect the profile files.
149
+
150
+ One writer lease coordinates a profile/destination. Do not overlap MCP, CLI
151
+ or Hermes processes writing to it. Separate profiles or machines do not provide
152
+ a distributed lock. This package does not support uncoordinated multiprocess
153
+ writes, auto-extraction, an HTTP transport, or implicit credential discovery
154
+ from Hermes. It preserves the Runtime's ledger, IDs and recovery semantics.
155
+
156
+ ## Verification and development
157
+
158
+ CI builds wheel/sdist, checks metadata and ownership marker, and runs installed
159
+ protocol tests with temporary profiles, embedded Qdrant and a deterministic
160
+ loopback embedding fixture on Linux/macOS/Windows, Python 3.11 and 3.14.
161
+ No test connects to personal Qdrant, Hermes profiles or memory data. These tests
162
+ cover initialize, discovery, four tools, persistence, recovery, scope isolation,
163
+ error redaction and protocol stdout. Provider/cloud compatibility evidence
164
+ belongs to the [Runtime](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/validation.md).
165
+
166
+ CI prefers the immutable Runtime PyPI release. Before Runtime 0.2.0 reaches PyPI,
167
+ CI builds a wheel from an immutable candidate
168
+ commit recorded in `runtime-source.json`. This is only a preparation fixture:
169
+ published dependency metadata always uses the exact PyPI version. Release
170
+ workflow acceptance requires installation from PyPI and never uses that fallback.
171
+
172
+ See [CI and dependency maintenance](docs/ci.md), [publishing](docs/publishing.md), [architecture](docs/architecture.md), and
173
+ the optional [Skill](https://github.com/cnkang/skills/tree/main/qdrant-memory).
@@ -0,0 +1,153 @@
1
+ # Qdrant Memory MCP
2
+
3
+ <!-- mcp-name: io.github.cnkang/qdrant-memory -->
4
+
5
+ [简体中文](README.zh-CN.md)
6
+
7
+ Persistent, scoped memory for AI agents through four explicit **stdio MCP** tools.
8
+ This repository distributes the existing [Python Runtime](https://github.com/cnkang/hermes-plugin-qdrant-memory).
9
+ Its metadata-only wheel contains no Python business implementation. The console
10
+ script points directly to `qdrant_memory.standalone:main` and depends on
11
+ `hermes-plugin-qdrant-memory[mcp]==0.2.0`.
12
+
13
+ **Versions:** MCP distribution 0.1.0 depends on Runtime 0.2.0. Release artifacts
14
+ are available through the [distribution PyPI page](https://pypi.org/project/qdrant-memory-mcp/)
15
+ and [Runtime PyPI page](https://pypi.org/project/hermes-plugin-qdrant-memory/).
16
+ See [release checklist](docs/publishing.md) for the publishing sequence.
17
+
18
+ Runtime, [optional Agent Skill](https://github.com/cnkang/skills/tree/main/qdrant-memory)
19
+ and MCP distribution versions are independent. The Skill is usage guidance,
20
+ not a runtime dependency. Hermes retains its native MemoryProvider, automatic
21
+ extraction and prefetch. Ordinary MCP performs only explicitly requested memory
22
+ operations; it does not automatically extract every conversation turn.
23
+
24
+ ## Install and initialize
25
+
26
+ Requires Python 3.11+ and either [uv](https://docs.astral.sh/uv/) or a Python
27
+ virtual environment. You must configure storage and an embedding service.
28
+ For the example below, run Ollama and install `qwen3-embedding:4b` yourself.
29
+
30
+ Create an operator-owned profile directory and save `qdrant-memory.json` inside:
31
+
32
+ ```json
33
+ {
34
+ "schema_version": 1,
35
+ "scope": {"user_id": "my-user", "agent_id": "my-agent"},
36
+ "qdrant": {"mode": "embedded", "collection": "qdrant_memory"},
37
+ "embedding": {
38
+ "mode": "plugin", "provider": "ollama", "model": "qwen3-embedding:4b",
39
+ "base_url": "http://127.0.0.1:11434", "dimensions": 2560, "distance": "Cosine"
40
+ }
41
+ }
42
+ ```
43
+
44
+ Initialize, then launch (replace `/path/to/profile` with your absolute path):
45
+
46
+ ```bash
47
+ uvx --from qdrant-memory-mcp==0.1.0 qdrant-memory-mcp --home /path/to/profile init
48
+ uvx --from qdrant-memory-mcp==0.1.0 qdrant-memory-mcp --home /path/to/profile mcp
49
+ ```
50
+
51
+ The command without `--home` uses `~/.qdrant-memory`, independent of Hermes.
52
+ Configure and initialize that directory before letting a Registry client launch
53
+ `uvx qdrant-memory-mcp==0.1.0 mcp`. The executable name matches the package name;
54
+ the Registry's positional `mcp` selects protocol mode. Its optional named
55
+ `--home` precedes `mcp` when a client supplies a custom profile.
56
+
57
+ Alternatively:
58
+
59
+ ```bash
60
+ python3 -m venv .venv
61
+ .venv/bin/python -m pip install qdrant-memory-mcp==0.1.0
62
+ .venv/bin/qdrant-memory-mcp --home /path/to/profile init
63
+ .venv/bin/qdrant-memory-mcp --home /path/to/profile mcp
64
+ ```
65
+
66
+ On Windows use `.venv\Scripts\python.exe` and
67
+ `.venv\Scripts\qdrant-memory-mcp.exe`.
68
+
69
+ Qdrant embedded, self-hosted server and Cloud, plus Ollama and OpenAI-compatible
70
+ embeddings, are configured in the Runtime's [configuration reference](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/configuration.md).
71
+ Keep credentials in operator environment variables (`QDRANT_API_KEY`,
72
+ `EMBEDDING_API_KEY`, or configured names); never commit their values.
73
+ Initialization against an existing collection requires explicit operator choice;
74
+ do not use a production destination for a first test.
75
+
76
+ ## Connect a client
77
+
78
+ Codex `config.toml` example:
79
+
80
+ ```toml
81
+ [mcp_servers.qdrant_memory]
82
+ command = "uvx"
83
+ args = ["--from", "qdrant-memory-mcp==0.1.0", "qdrant-memory-mcp", "--home", "/path/to/profile", "mcp"]
84
+ ```
85
+
86
+ OpenCode `opencode.json` example:
87
+
88
+ ```json
89
+ {
90
+ "$schema": "https://opencode.ai/config.json",
91
+ "mcp": {
92
+ "qdrant_memory": {
93
+ "type": "local",
94
+ "command": ["uvx", "--from", "qdrant-memory-mcp==0.1.0", "qdrant-memory-mcp", "--home", "/path/to/profile", "mcp"],
95
+ "enabled": true
96
+ }
97
+ }
98
+ }
99
+ ```
100
+
101
+ Pi needs a separately installed MCP client/extension. In that extension, use
102
+ `command: uvx` and the same argument list. No built-in Pi MCP support or universal
103
+ extension config format is claimed. These are configuration examples; this
104
+ distribution's acceptance tests use the official Python MCP SDK, not live agent
105
+ applications. See the Runtime's [client evidence and limits](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/mcp.md).
106
+
107
+ ## Tools and boundaries
108
+
109
+ | Tool | Input | Result |
110
+ |---|---|---|
111
+ | `qdrant_memory_search` | `query`, optional `category` | Scoped memories with IDs, scores and provenance |
112
+ | `qdrant_memory_add` | `text` | Durable memory ID |
113
+ | `qdrant_memory_update` | exact `id`, replacement `text` | Scoped replacement |
114
+ | `qdrant_memory_delete` | exact `id` | Scoped deletion |
115
+
116
+ Scope is fixed by the operator's profile (`user_id`, `agent_id`). Model inputs
117
+ and MCP client identity cannot override it; knowing an ID does not grant access.
118
+ Migration, export, reset and bulk deletion remain trusted operator CLI commands;
119
+ see [standalone maintenance](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/standalone.md).
120
+ No resources or prompts are advertised. This is a local subprocess, with no
121
+ public HTTP/SSE listener or remote authentication service. Stdout is reserved
122
+ for protocol messages, with sanitized diagnostics on stderr.
123
+
124
+ Data flows from client → Runtime → embedding provider → Qdrant and the local
125
+ SQLite ledger. With local Ollama and embedded Qdrant, memory processing stays
126
+ local; cloud embedding receives memory/query text, and cloud Qdrant receives
127
+ vectors and stored payloads. The client/model may also receive recalled text.
128
+ The operator must authorize retention and access and protect the profile files.
129
+
130
+ One writer lease coordinates a profile/destination. Do not overlap MCP, CLI
131
+ or Hermes processes writing to it. Separate profiles or machines do not provide
132
+ a distributed lock. This package does not support uncoordinated multiprocess
133
+ writes, auto-extraction, an HTTP transport, or implicit credential discovery
134
+ from Hermes. It preserves the Runtime's ledger, IDs and recovery semantics.
135
+
136
+ ## Verification and development
137
+
138
+ CI builds wheel/sdist, checks metadata and ownership marker, and runs installed
139
+ protocol tests with temporary profiles, embedded Qdrant and a deterministic
140
+ loopback embedding fixture on Linux/macOS/Windows, Python 3.11 and 3.14.
141
+ No test connects to personal Qdrant, Hermes profiles or memory data. These tests
142
+ cover initialize, discovery, four tools, persistence, recovery, scope isolation,
143
+ error redaction and protocol stdout. Provider/cloud compatibility evidence
144
+ belongs to the [Runtime](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/validation.md).
145
+
146
+ CI prefers the immutable Runtime PyPI release. Before Runtime 0.2.0 reaches PyPI,
147
+ CI builds a wheel from an immutable candidate
148
+ commit recorded in `runtime-source.json`. This is only a preparation fixture:
149
+ published dependency metadata always uses the exact PyPI version. Release
150
+ workflow acceptance requires installation from PyPI and never uses that fallback.
151
+
152
+ See [CI and dependency maintenance](docs/ci.md), [publishing](docs/publishing.md), [architecture](docs/architecture.md), and
153
+ the optional [Skill](https://github.com/cnkang/skills/tree/main/qdrant-memory).
@@ -0,0 +1,117 @@
1
+ # Qdrant Memory MCP
2
+
3
+ 这是 Qdrant Memory 的独立 PyPI 包装与 MCP Registry 分发仓库。
4
+ 所有业务逻辑来自唯一的 [Python Runtime](https://github.com/cnkang/hermes-plugin-qdrant-memory),
5
+ 本仓库不复制 Runtime 或 [Agent Skill](https://github.com/cnkang/skills/tree/main/qdrant-memory)。
6
+ `qdrant-memory-mcp` 直接引用 `qdrant_memory.standalone:main`,固定依赖
7
+ `hermes-plugin-qdrant-memory[mcp]==0.2.0`,不需要安装 Hermes。
8
+
9
+ **版本:** 分发 0.1.0 固定依赖 Runtime 0.2.0,发行产物见
10
+ [分发 PyPI 页面](https://pypi.org/project/qdrant-memory-mcp/) 和
11
+ [Runtime PyPI 页面](https://pypi.org/project/hermes-plugin-qdrant-memory/)。三个仓库的版本独立管理。
12
+ Skill 仅提供可选指导,不是运行依赖。Hermes 的自动提取和 prefetch 仍属于
13
+ 原生集成;普通 MCP 仅执行明确请求的记忆操作,不自动提取每轮对话。
14
+
15
+ ## 安装与配置
16
+
17
+ 需要 Python 3.11+。用户必须自行配置 Qdrant 与 Embedding。
18
+ 在可信 profile 目录内创建 `qdrant-memory.json`:
19
+
20
+ ```json
21
+ {
22
+ "schema_version": 1,
23
+ "scope": {"user_id": "my-user", "agent_id": "my-agent"},
24
+ "qdrant": {"mode": "embedded", "collection": "qdrant_memory"},
25
+ "embedding": {
26
+ "mode": "plugin", "provider": "ollama", "model": "qwen3-embedding:4b",
27
+ "base_url": "http://127.0.0.1:11434", "dimensions": 2560, "distance": "Cosine"
28
+ }
29
+ }
30
+ ```
31
+
32
+ 示例要求自己启动 Ollama 并安装对应模型。将路径替换为自己的绝对路径:
33
+
34
+ ```bash
35
+ uvx --from qdrant-memory-mcp==0.1.0 qdrant-memory-mcp --home /path/to/profile init
36
+ uvx --from qdrant-memory-mcp==0.1.0 qdrant-memory-mcp --home /path/to/profile mcp
37
+ ```
38
+
39
+ 省略 `--home` 时使用 `~/.qdrant-memory`,与 Hermes profile 独立。
40
+ Registry 默认运行 `uvx qdrant-memory-mcp==0.1.0 mcp`,应先配置、初始化默认目录。
41
+ 客户端可通过 `mcp` 前面的可选 `--home` 参数选择自定义 profile。
42
+
43
+ 也可以使用虚拟环境:
44
+
45
+ ```bash
46
+ python3 -m venv .venv
47
+ .venv/bin/python -m pip install qdrant-memory-mcp==0.1.0
48
+ .venv/bin/qdrant-memory-mcp --home /path/to/profile init
49
+ .venv/bin/qdrant-memory-mcp --home /path/to/profile mcp
50
+ ```
51
+
52
+ Windows 使用 `.venv\Scripts\python.exe` 和 `.venv\Scripts\qdrant-memory-mcp.exe`。
53
+ Qdrant Embedded、Server、Cloud 和 OpenAI-compatible Embedding 的配置见
54
+ [原始配置文档](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/configuration.md)。
55
+ 凭据由可信进程环境提供(如 `QDRANT_API_KEY`、`EMBEDDING_API_KEY`),不要提交密钥。
56
+ 首次测试请使用独立的临时存储,现有 collection 的复用必须由操作者明确选择。
57
+
58
+ ## 客户端示例
59
+
60
+ Codex `config.toml`:
61
+
62
+ ```toml
63
+ [mcp_servers.qdrant_memory]
64
+ command = "uvx"
65
+ args = ["--from", "qdrant-memory-mcp==0.1.0", "qdrant-memory-mcp", "--home", "/path/to/profile", "mcp"]
66
+ ```
67
+
68
+ OpenCode `opencode.json`:
69
+
70
+ ```json
71
+ {
72
+ "$schema": "https://opencode.ai/config.json",
73
+ "mcp": {
74
+ "qdrant_memory": {
75
+ "type": "local",
76
+ "command": ["uvx", "--from", "qdrant-memory-mcp==0.1.0", "qdrant-memory-mcp", "--home", "/path/to/profile", "mcp"],
77
+ "enabled": true
78
+ }
79
+ }
80
+ }
81
+ ```
82
+
83
+ Pi 需要另外安装 MCP 客户端扩展;将上述 command/args 填入该扩展支持的配置。
84
+ 本仓库不声称 Pi 内置 MCP,也不声称通用扩展配置格式。
85
+ 这些是配置示例;分发测试使用官方 Python MCP SDK,不把未实测的 Agent 应用列为已验证。
86
+
87
+ ## 工具、安全与限制
88
+
89
+ | 工具 | 输入 | 用途 |
90
+ |---|---|---|
91
+ | `qdrant_memory_search` | `query`,可选 `category` | 作用域内检索,返回 ID、分数、来源 |
92
+ | `qdrant_memory_add` | `text` | 持久化显式记忆 |
93
+ | `qdrant_memory_update` | 精确 `id`、替换 `text` | 经过授权检查后更新 |
94
+ | `qdrant_memory_delete` | 精确 `id` | 经过授权检查后删除 |
95
+
96
+ profile 固定 user/agent scope;模型参数、客户端身份不能覆盖它,知道 ID 不等于获得权限。
97
+ 迁移、导出、重置、批量删除仍是可信操作者 CLI 命令,见
98
+ [维护文档](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/standalone.md)。
99
+
100
+ MCP 使用本地 **stdio**,不提供公网 HTTP/SSE 服务、远程认证、resources 或 prompts。
101
+ stdout 只承载协议,错误经过脱敏。不支持无协调的多进程写入;一个 MCP 进程会
102
+ 持有 profile/destination 的 writer lease。不同 profile 或机器不共享分布式锁。
103
+
104
+ 数据流为客户端 → Runtime → Embedding → Qdrant 与本地 SQLite Ledger。
105
+ 本地模型与本地 Qdrant 可实现本地数据处理;云 Embedding 会接收记忆/查询文本,
106
+ 云 Qdrant 会接收向量和 payload,客户端或模型也会接收召回文本。
107
+ 操作者需要管理保留策略、权限与 profile 文件。
108
+
109
+ CI 对 Linux/macOS/Windows、Python 3.11/3.14 的 wheel/sdist 安装运行真实协议测试,
110
+ 覆盖初始化、工具发现、四项操作、重启持久化与恢复、scope 拒绝、错误脱敏、stdout。
111
+ 使用临时目录、Embedded Qdrant、确定性本地 HTTP Embedding fixture,
112
+ 不访问私人 Qdrant、Hermes profile 或个人记忆。云服务兼容性参见 Runtime 的验证证据。
113
+
114
+ CI 优先使用正式 PyPI Runtime。Runtime 尚未上 PyPI 时,准备阶段 CI 使用 `runtime-source.json` 固定的候选 commit
115
+ 构建本地 wheel;正式包元数据始终依赖固定 PyPI 版本,发布流程禁止这种回退。
116
+ 详见 [英文说明](README.md)、[发布清单](docs/publishing.md) 与
117
+ [Runtime 验证](https://github.com/cnkang/hermes-plugin-qdrant-memory/blob/main/docs/validation.md)。
@@ -0,0 +1,19 @@
1
+ # Distribution boundary
2
+
3
+ `pyproject.toml` declares no packages or Python modules. Its console script
4
+ references `qdrant_memory.standalone:main`, supplied by the exact upstream
5
+ dependency `hermes-plugin-qdrant-memory[mcp]==0.2.0`. A wheel contains only
6
+ dist-info metadata and the license. There is no shim or business implementation.
7
+
8
+ Runtime source: https://github.com/cnkang/hermes-plugin-qdrant-memory
9
+
10
+ Skill source: https://github.com/cnkang/skills/tree/main/qdrant-memory
11
+
12
+ Version lines are independent: Runtime 0.2.0, Skill's own metadata version,
13
+ distribution 0.1.0. Runtime source and schema snapshots used for preparation
14
+ are immutable; publication requires the Runtime version to exist on PyPI.
15
+
16
+ The only Python files in this repository are release/verification scripts and
17
+ tests. They never implement Qdrant, embedding, ledger or MCP server behavior.
18
+ The fixture responds to embedding HTTP requests exclusively in tests. Its
19
+ temporary profiles never reference personal data or production services.
@@ -0,0 +1,27 @@
1
+ # GitHub checks and dependency maintenance
2
+
3
+ - Distribution CI builds metadata-only artifacts and verifies installed MCP
4
+ protocol behavior on Linux, macOS and Windows (Python 3.11/3.14).
5
+ - Repository quality runs Ruff on release scripts/tests and actionlint on every
6
+ workflow, including shell steps. actionlint's archive is SHA256 verified.
7
+ - CodeQL analyzes Python and GitHub Actions with `security-extended` queries
8
+ on PRs, main pushes and every Monday. The paired init/analyze actions use the
9
+ same immutable commit.
10
+ - Dependency review blocks PRs that introduce high or critical dependency
11
+ vulnerabilities. It uses read-only access and does not post PR comments.
12
+ - Dependabot checks pip manifests and GitHub Actions each Monday at 09:00
13
+ Asia/Singapore, grouping updates by ecosystem. Updates remain reviewed PRs;
14
+ there is no automatic merge or publication.
15
+
16
+ Actions use immutable commit pins. Dependabot updates both occurrences of the
17
+ CodeQL action together. Repository Dependabot security updates, secret scanning
18
+ and push protection are enabled; no additional service token is required.
19
+
20
+ The unpublished Runtime candidate remains the exact `0.2.0` dependency. Once
21
+ Runtime is on PyPI, its updates must also adjust compatibility expectations and
22
+ the preparation fixture deliberately; a dependency-only PR cannot bypass the
23
+ distribution's metadata/protocol checks. This repository scans distribution
24
+ scripts and workflows; Runtime business-code scanning belongs to its upstream.
25
+
26
+ Publishing remains tag-only behind the existing protected environments and
27
+ first-publication confirmation. Adding checks does not trigger a release.
@@ -0,0 +1,56 @@
1
+ # First publication checklist
2
+
3
+ No publishing tag or workflow dispatch is executed before the operator gives
4
+ explicit confirmation for the first Runtime/PyPI/Registry public publication.
5
+
6
+ 1. Merge the Runtime release PR after all checks pass. Create Runtime tag v0.2.0
7
+ on the merged commit, only after publication confirmation.
8
+ 2. Configure PyPI pending Trusted Publishers (PyPI account step):
9
+ - `hermes-plugin-qdrant-memory`: owner `cnkang`, repository
10
+ `hermes-plugin-qdrant-memory`, workflow `publish.yml`, environment `pypi`.
11
+ - `qdrant-memory-mcp`: owner `cnkang`, repository `qdrant-memory-mcp`,
12
+ workflow `publish.yml`, environment `pypi`.
13
+ 3. Approve protected GitHub environments when prompted. A version tag must point
14
+ to a main-branch commit and match package metadata. Releases cannot overwrite
15
+ an existing version. First publish Runtime 0.2.0 and verify its PyPI artifacts.
16
+ 4. Run distribution acceptance in public dependency mode. Build/test wheel and
17
+ sdist from a new environment using only the exact Runtime PyPI release.
18
+ 5. Create distribution tag v0.1.0 after confirmation. Its workflow builds and
19
+ tests before protected PyPI publication, verifies public metadata, validates
20
+ with the official publisher, then uses `github-oidc` for Registry publication.
21
+ 6. Verify PyPI ownership marker and the public Registry entry
22
+ `io.github.cnkang/qdrant-memory` version 0.1.0. Remove candidate wording in
23
+ documentation only when publication is confirmed by public endpoints.
24
+
25
+ The distribution workflow has a tag-only manual `registry_only` retry mode.
26
+ It downloads and verifies already-published PyPI artifacts and tests them,
27
+ then reruns Registry validation/publication; no PyPI upload occurs. Normal retries
28
+ also reuse a verified existing PyPI version. A mismatching package dependency,
29
+ entrypoint, ownership marker or Registry payload fails closed.
30
+
31
+ GitHub environments have already been configured with required reviewer
32
+ `cnkang` and tag-only `v*` deployment policies: Runtime `pypi`; distribution
33
+ `pypi` and `mcp-registry`. These approvals are never bypassed automatically.
34
+ The remaining external account step is registering both PyPI pending Trusted
35
+ Publishers at https://pypi.org/manage/account/publishing/.
36
+
37
+ Official references checked on 2026-10-13:
38
+
39
+ - [Publishing quickstart](https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/quickstart.mdx)
40
+ - [Package types](https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/package-types.mdx)
41
+ - [server.json](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/server-json/generic-server-json.md)
42
+ - [Official requirements](https://github.com/modelcontextprotocol/registry/blob/main/docs/reference/server-json/official-registry-requirements.md)
43
+ - [GitHub Actions/OIDC](https://github.com/modelcontextprotocol/registry/blob/main/docs/modelcontextprotocol-io/github-actions.mdx)
44
+
45
+ The current schema is 2025-12-11. PyPI ownership verification checks the package
46
+ description for `mcp-name: io.github.cnkang/qdrant-memory`. The CLI name matches
47
+ the PyPI identifier so uvx can run it directly; `mcp` remains a required positional
48
+ package argument and optional `--home` precedes it. Profile configuration carries
49
+ model/dimensions/scope, so environment declarations alone cannot initialize a
50
+ server. Secrets have no defaults or committed values.
51
+
52
+ Official publisher release v1.8.1 lists `validate` in help but reports
53
+ `Unknown command: validate`. Build the official CLI at fixed source commit
54
+ `11b7b0e274d518b6f449c5ee3518a6151d9848b9` instead. Do not accept the old
55
+ binary's misleading zero exit status as validation. The official validator uses
56
+ the Registry validation endpoint; local vendored schema validation complements it.
@@ -0,0 +1,15 @@
1
+ # Qdrant Memory MCP Distribution Implementation Plan
2
+
3
+ **Goal:** Build, verify and push a metadata-only MCP distribution, then obtain the required first-publication confirmation.
4
+
5
+ **Architecture:** The console script references the upstream standalone entrypoint directly. Pin Runtime 0.2.0; prepare its release in a separate upstream PR because PyPI currently has no runtime release. Skills remain in cnkang/skills.
6
+
7
+ **Tech Stack:** setuptools, Python 3.11+, official MCP Python SDK, embedded Qdrant, GitHub Actions OIDC, official MCP publisher.
8
+
9
+ - [ ] Upstream: update pyproject.toml, version.py and both plugin manifests to 0.2.0; add release notes and gated Trusted Publishing. Run all tests and fresh-wheel standalone acceptance. Push codex/pypi-runtime-release and open PR.
10
+ - [ ] Distribution: add pyproject.toml with packages=[] and hermes-plugin-qdrant-memory[mcp]==0.2.0; add server.json using current 2025-12-11 schema and mcp positional argument. Verify wheel contains metadata only and README ownership marker survives build.
11
+ - [ ] Protocol acceptance: use a temporary profile, loopback deterministic HTTP embedding fixture and SDK stdio client. Exercise initialize, tools/list, all CRUD operations, restart, user/agent scope rejection, sanitized errors and stdout framing.
12
+ - [ ] CI: test installed wheel and sdist on Linux/macOS/Windows. Before Runtime PyPI release, bootstrap its exact reviewed commit into a local wheel; never place a Git dependency in published metadata. Release jobs must resolve Runtime from PyPI only.
13
+ - [ ] Release: tag-only publication through protected pypi and mcp-registry environments. Verify existing PyPI version metadata and artifact hashes before skipping uploads; allow Registry-only retry without repeating upload. Pin official publisher source if release binary lacks validate.
14
+ - [ ] Docs: English/Chinese usage, configuration, client examples, privacy and limitations; link upstream Runtime and Skill. Mark public installation pending until release.
15
+ - [ ] Delivery: create public repository, push code, wait for exact-SHA CI, save execution report and a concrete publication checklist. Do not push a publishing tag or dispatch publishing before explicit confirmation.
@@ -0,0 +1,39 @@
1
+ [build-system]
2
+ requires = ["setuptools>=77,<85"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "qdrant-memory-mcp"
7
+ version = "0.1.0"
8
+ description = "Metadata-only stdio MCP distribution of the Qdrant Memory Runtime"
9
+ readme = "README.md"
10
+ license = "MIT"
11
+ license-files = ["LICENSE"]
12
+ requires-python = ">=3.11"
13
+ dependencies = ["hermes-plugin-qdrant-memory[mcp]==0.2.0"]
14
+ keywords = ["mcp", "memory", "qdrant", "agents"]
15
+ classifiers = ["Programming Language :: Python :: 3", "Operating System :: OS Independent"]
16
+
17
+ [project.scripts]
18
+ qdrant-memory-mcp = "qdrant_memory.standalone:main"
19
+
20
+ [project.urls]
21
+ Homepage = "https://github.com/cnkang/qdrant-memory-mcp"
22
+ Repository = "https://github.com/cnkang/qdrant-memory-mcp"
23
+ Issues = "https://github.com/cnkang/qdrant-memory-mcp/issues"
24
+ Changelog = "https://github.com/cnkang/qdrant-memory-mcp/blob/main/CHANGELOG.md"
25
+ Runtime = "https://github.com/cnkang/hermes-plugin-qdrant-memory"
26
+ Skill = "https://github.com/cnkang/skills/tree/main/qdrant-memory"
27
+
28
+ [tool.setuptools]
29
+ packages = []
30
+ py-modules = []
31
+
32
+ [tool.pytest.ini_options]
33
+ testpaths = ["tests"]
34
+
35
+ [tool.ruff]
36
+ target-version = "py311"
37
+
38
+ [tool.ruff.lint]
39
+ select = ["E4", "E7", "E9", "F"]