cortexdb-mcp 0.2.1__tar.gz → 0.3.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.
@@ -0,0 +1,71 @@
1
+ # Rust
2
+ /target
3
+ **/*.rs.bk
4
+
5
+ # Environment / secrets
6
+ .env
7
+ .env.local
8
+ .env*.local
9
+ *.pem
10
+ *.key
11
+ .npmrc
12
+
13
+ # SQLite database
14
+ *.sqlite
15
+ *.sqlite-wal
16
+ *.sqlite-shm
17
+
18
+ # OS
19
+ .DS_Store
20
+ Thumbs.db
21
+ desktop.ini
22
+
23
+ # IDE
24
+ .idea/
25
+ .vscode/
26
+ *.swp
27
+ *.swo
28
+
29
+ # Data directories
30
+ cortexdb_data*/
31
+ /data/
32
+ # Per-bench tenant stores (RocksDB + Tantivy + HNSW state; regeneratable per run)
33
+ /data_*/
34
+ # Experimental per-branch stores (not tracked on this branch but left gitignored
35
+ # so checkout from other branches doesn't surface them in git status)
36
+ /event_memory_store/
37
+ /llm_cache/
38
+
39
+ # Benchmark inputs and per-run outputs (kept local, regenerated each run)
40
+ benchmarks/longmemeval/data/
41
+ benchmarks/longmemeval/server_results/
42
+ benchmarks/longmemeval/fast_results/
43
+ benchmarks/longmemeval/micro_results/
44
+ benchmarks/longmemeval/server_logs/
45
+ benchmarks/longmemeval/*.log
46
+ benchmarks/locomo/locomo_results*.json
47
+ benchmarks/locomo/server_results/
48
+ benchmarks/locomo/*.log
49
+ /answer_out.json
50
+
51
+ # Local Claude Code state
52
+ .claude/
53
+ .tmp/
54
+
55
+ # Python
56
+ __pycache__/
57
+ *.pyc
58
+ .venv/
59
+ venv/
60
+
61
+ # Node
62
+ node_modules/
63
+ dist/
64
+ .next/
65
+
66
+ # Egg info
67
+ *.egg-info/
68
+
69
+ # Scratch/debug text files at root
70
+ /*.txt
71
+ /*.log
@@ -1,12 +1,12 @@
1
- FROM python:3.12-slim
2
-
3
- WORKDIR /app
4
-
5
- COPY pyproject.toml README.md ./
6
- COPY cortexdb_mcp/ cortexdb_mcp/
7
-
8
- RUN pip install --no-cache-dir .
9
-
10
- ENV CORTEXDB_URL=https://api.cortexdb.ai
11
-
12
- CMD ["cortexdb-mcp"]
1
+ FROM python:3.12-slim
2
+
3
+ WORKDIR /app
4
+
5
+ COPY pyproject.toml README.md ./
6
+ COPY cortexdb_mcp/ cortexdb_mcp/
7
+
8
+ RUN pip install --no-cache-dir .
9
+
10
+ ENV CORTEXDB_URL=https://api.cortexdb.ai
11
+
12
+ CMD ["cortexdb-mcp"]
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: cortexdb-mcp
3
- Version: 0.2.1
3
+ Version: 0.3.0
4
4
  Summary: MCP Server for CortexDB — expose memory operations to AI agents
5
5
  License-Expression: MIT
6
6
  Requires-Python: >=3.10
@@ -15,31 +15,33 @@ Description-Content-Type: text/markdown
15
15
 
16
16
  MCP (Model Context Protocol) server that gives AI tools persistent long-term memory via CortexDB. Works with Claude Desktop, Cursor, Windsurf, VS Code Copilot, and any MCP-compatible client.
17
17
 
18
+ > **0.3.0 rewrites the server against the v1 CortexDB API.** Default surface is now `https://api-v1.cortexdb.ai`. The server **auto-signs-up anonymously** on first launch — no API key required.
19
+
18
20
  ## Quick Start
19
21
 
20
22
  ```bash
21
- # Install
22
- pip install -e .
23
+ # Install (the PyPI name is `cortexdb-mcp`)
24
+ pip install cortexdb-mcp
23
25
 
24
- # Or with uvx (no install needed)
25
- uvx --from . cortexdb-mcp
26
+ # Then run with zero config:
27
+ cortexdb-mcp
26
28
  ```
27
29
 
28
- Set your environment variables:
29
-
30
- ```bash
31
- export CORTEXDB_URL="https://api.cortexdb.ai"
32
- export CORTEXDB_API_KEY="cx_live_your_key_here"
33
- ```
30
+ That's it. On first launch the server hits `POST /v1/auth/signup`, mints a free-tier PASETO token + scope for itself, and caches them under `~/.config/cortexdb-mcp/state.json` (Linux/macOS) or `%APPDATA%\cortexdb-mcp\state.json` (Windows). Re-launches reuse the cached identity until the token expires (7 days).
34
31
 
35
- Run:
32
+ To target a custom deployment or pre-existing identity, set any of:
36
33
 
37
34
  ```bash
38
- cortexdb-mcp
35
+ export CORTEXDB_URL="https://api-v1.cortexdb.ai" # base URL
36
+ export CORTEXDB_API_KEY="v4.public..." # PASETO bearer token
37
+ export CORTEXDB_ACTOR="user:alice" # ActorId, sent as X-Cortex-Actor
38
+ export CORTEXDB_SCOPE="org:acme/user:alice" # default scope path
39
39
  ```
40
40
 
41
41
  ## IDE Setup
42
42
 
43
+ Most clients just need a single line — the auto-signup handles the rest.
44
+
43
45
  ### Claude Desktop
44
46
 
45
47
  Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) or `%APPDATA%\Claude\claude_desktop_config.json` (Windows):
@@ -48,11 +50,7 @@ Edit `~/Library/Application Support/Claude/claude_desktop_config.json` (macOS) o
48
50
  {
49
51
  "mcpServers": {
50
52
  "cortexdb": {
51
- "command": "cortexdb-mcp",
52
- "env": {
53
- "CORTEXDB_URL": "https://api.cortexdb.ai",
54
- "CORTEXDB_API_KEY": "cx_live_your_key_here"
55
- }
53
+ "command": "cortexdb-mcp"
56
54
  }
57
55
  }
58
56
  }
@@ -66,11 +64,7 @@ Edit `~/.claude/mcp.json`:
66
64
  {
67
65
  "mcpServers": {
68
66
  "cortexdb": {
69
- "command": "cortexdb-mcp",
70
- "env": {
71
- "CORTEXDB_URL": "https://api.cortexdb.ai",
72
- "CORTEXDB_API_KEY": "cx_live_your_key_here"
73
- }
67
+ "command": "cortexdb-mcp"
74
68
  }
75
69
  }
76
70
  }
@@ -84,11 +78,7 @@ Edit `~/.cursor/mcp.json`:
84
78
  {
85
79
  "mcpServers": {
86
80
  "cortexdb": {
87
- "command": "cortexdb-mcp",
88
- "env": {
89
- "CORTEXDB_URL": "https://api.cortexdb.ai",
90
- "CORTEXDB_API_KEY": "cx_live_your_key_here"
91
- }
81
+ "command": "cortexdb-mcp"
92
82
  }
93
83
  }
94
84
  }
@@ -104,11 +94,7 @@ Edit `~/.codeium/windsurf/mcp_config.json`:
104
94
  {
105
95
  "mcpServers": {
106
96
  "cortexdb": {
107
- "command": "cortexdb-mcp",
108
- "env": {
109
- "CORTEXDB_URL": "https://api.cortexdb.ai",
110
- "CORTEXDB_API_KEY": "cx_live_your_key_here"
111
- }
97
+ "command": "cortexdb-mcp"
112
98
  }
113
99
  }
114
100
  }
@@ -122,11 +108,21 @@ Add to `.vscode/mcp.json` in your project or `~/.vscode/mcp.json` globally:
122
108
  {
123
109
  "servers": {
124
110
  "cortexdb": {
125
- "command": "cortexdb-mcp",
126
- "env": {
127
- "CORTEXDB_URL": "https://api.cortexdb.ai",
128
- "CORTEXDB_API_KEY": "cx_live_your_key_here"
129
- }
111
+ "command": "cortexdb-mcp"
112
+ }
113
+ }
114
+ }
115
+ ```
116
+
117
+ ### Windows tip
118
+
119
+ On Windows, MCP clients sometimes need the absolute path:
120
+
121
+ ```json
122
+ {
123
+ "mcpServers": {
124
+ "cortexdb": {
125
+ "command": "C:\\Python310\\Scripts\\cortexdb-mcp.exe"
130
126
  }
131
127
  }
132
128
  }
@@ -136,43 +132,43 @@ Add to `.vscode/mcp.json` in your project or `~/.vscode/mcp.json` globally:
136
132
 
137
133
  ### Memory Operations
138
134
 
139
- | Tool | Description |
140
- |------|-------------|
141
- | `memory_store` | Store a new memory with optional source, type, tags, TTL |
142
- | `memory_search` | Search memories using natural language (hybrid retrieval) |
143
- | `memory_forget` | Delete memories with audit trail (GDPR-compliant) |
144
- | `get_context` | Deep contextual retrieval combining search + graph |
145
- | `advanced_search` | Search with structured filters (source, type, time range) |
146
-
147
- ### Episode Management
148
-
149
- | Tool | Description |
150
- |------|-------------|
151
- | `memory_list` | List episodes with pagination and type filter |
152
- | `memory_get` | Get a specific episode by ID |
153
- | `memory_update` | Update episode content or metadata |
154
- | `memory_delete` | Delete a specific episode by ID |
155
- | `memory_bulk_delete` | Bulk delete with query matching and dry-run support |
156
-
157
- ### Knowledge Graph
158
-
159
- | Tool | Description |
160
- |------|-------------|
161
- | `entity_list` | List entities (people, services, projects, concepts) |
162
- | `entity_get` | Get entity details including relationships and recent episodes |
163
- | `entity_edges` | Get all relationships for an entity |
164
- | `entity_link` | Create a relationship between two entities |
135
+ | Tool | Maps to | Description |
136
+ |------|---------|-------------|
137
+ | `memory_store` | `POST /v1/experience` | Store a new memory. Source/tags/type become labels. |
138
+ | `memory_search` | `POST /v1/recall` | Search memories using natural language. |
139
+ | `memory_forget` | `POST /v1/forget` | Delete memories. With `query`, narrows by subject. |
140
+ | `get_context` | `POST /v1/recall` (holistic) | Deep context with facts + beliefs. |
141
+ | `advanced_search` | `POST /v1/recall` + temporal | Search with structured filters (time / source / type). |
142
+
143
+ ### Event CRUD
144
+
145
+ | Tool | Maps to | Description |
146
+ |------|---------|-------------|
147
+ | `memory_list` | `GET /v1/events` | List events in scope, paginated. |
148
+ | `memory_get` | `GET /v1/events/{id}` | Fetch a single event (used for citations). |
149
+ | `memory_delete` | `POST /v1/forget` (memory_ids) | Delete one event by id. |
150
+ | `memory_bulk_delete` | `POST /v1/forget` or `/v1/erasures/preview` | Bulk delete with dry-run support. |
151
+
152
+ ### Knowledge Graph (facts-backed in v1)
153
+
154
+ | Tool | Maps to | Description |
155
+ |------|---------|-------------|
156
+ | `entity_list` | `GET /v1/facts` | List fact subjects, ranked by count. |
157
+ | `entity_get` | `GET /v1/facts?subject=…` | Fact lineage for a subject. |
158
+ | `entity_edges` | `GET /v1/facts?subject=…` | Predicate/object pairs for an entity. |
159
+ | `entity_link` | `POST /v1/experience` | Store a sentence the extractor will turn into a fact. |
165
160
 
166
161
  ### Admin & Observability
167
162
 
168
- | Tool | Description |
169
- |------|-------------|
170
- | `health_check` | Check CortexDB server health |
171
- | `get_usage` | View usage stats and tier limits |
172
- | `get_insights` | Generate proactive insights (incident spikes, gaps, risks) |
173
- | `get_ontology` | View entity types and relationship types |
174
- | `export_data` | Export memories as JSON |
175
- | `import_data` | Import memories from JSON |
163
+ | Tool | Maps to | Description |
164
+ |------|---------|-------------|
165
+ | `health_check` | `GET /v1/auth/whoami` | Verify the bearer + reach the deployment policy. |
166
+ | `get_usage` | `GET /v1/auth/whoami` + headers | Tier, rate limit, token expiry. |
167
+ | `get_insights` | (in-process) | Proactive insights derived from stored episodes. |
168
+
169
+ ### Removed from 0.3.0
170
+
171
+ `memory_update`, `export_data`, `import_data`, `get_ontology` — v1 has no direct equivalents. Updates: store a new event; bulk import: see `/v1/import` directly with the v1 envelope shape; ontology: not part of the v1 surface.
176
172
 
177
173
  ## Resources
178
174