ctxjev-mcp 0.1.0 → 0.1.1
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.
- package/README.md +76 -6
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,7 +1,26 @@
|
|
|
1
|
+
<div align="center">
|
|
2
|
+
|
|
1
3
|
# ctxjev-mcp
|
|
2
4
|
|
|
3
|
-
|
|
4
|
-
|
|
5
|
+
**Jev-based context scoring, as MCP tools — for Claude Code, Codex, and any other MCP host.**
|
|
6
|
+
|
|
7
|
+
[](https://www.npmjs.com/package/ctxjev-mcp)
|
|
8
|
+
[](LICENSE)
|
|
9
|
+
[](package.json)
|
|
10
|
+
|
|
11
|
+
[Setup](#setup) · [Tools](#tools) · [Example response](#example-response) · [Related packages](#related-packages)
|
|
12
|
+
|
|
13
|
+
</div>
|
|
14
|
+
|
|
15
|
+
---
|
|
16
|
+
|
|
17
|
+
`ctxjev-mcp` speaks plain stdio MCP — the same binary works with every host below, only the
|
|
18
|
+
config shape differs.
|
|
19
|
+
|
|
20
|
+
## Setup
|
|
21
|
+
|
|
22
|
+
Get a key at [console.typesafe.ai/settings/keys](https://console.typesafe.ai/settings/keys) (no
|
|
23
|
+
waitlist) first.
|
|
5
24
|
|
|
6
25
|
**Claude Code:**
|
|
7
26
|
|
|
@@ -9,16 +28,67 @@ MCP server exposing [Jev](https://typesafe.ai)-based context scoring/pruning (`s
|
|
|
9
28
|
claude mcp add ctxjev --env TYPESAFE_API_KEY=... -- npx ctxjev-mcp
|
|
10
29
|
```
|
|
11
30
|
|
|
12
|
-
**Codex CLI
|
|
31
|
+
**Codex CLI** (verified against `codex-cli` v0.155.1):
|
|
13
32
|
|
|
14
33
|
```bash
|
|
15
34
|
codex mcp add ctxjev --env TYPESAFE_API_KEY=... -- npx ctxjev-mcp
|
|
16
35
|
```
|
|
17
36
|
|
|
18
|
-
|
|
19
|
-
|
|
37
|
+
**GitHub Copilot** (VS Code, agent mode) — `.vscode/mcp.json` (note the top-level key is
|
|
38
|
+
`servers`, not Claude Code's `mcpServers`):
|
|
39
|
+
|
|
40
|
+
```json
|
|
41
|
+
{
|
|
42
|
+
"servers": {
|
|
43
|
+
"ctxjev": {
|
|
44
|
+
"type": "stdio",
|
|
45
|
+
"command": "npx",
|
|
46
|
+
"args": ["ctxjev-mcp"],
|
|
47
|
+
"env": { "TYPESAFE_API_KEY": "..." }
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
## Tools
|
|
54
|
+
|
|
55
|
+
- **`score_relevance`** — `{ goal, entries, recencyWeight? }` → a relevance/recency/combined score
|
|
56
|
+
per entry plus Jev token usage, no decision made.
|
|
57
|
+
- **`prune_history`** — the same input plus `{ dropBelow?, summarizeBelow? }` → a decision
|
|
58
|
+
(`keep`/`drop`/`summarize`) per entry, a savings report, and Jev token usage.
|
|
59
|
+
|
|
60
|
+
`entries` is `{ id, role: 'user'|'assistant'|'tool', toolName?, content, timestamp }[]`.
|
|
61
|
+
|
|
62
|
+
## Example response
|
|
63
|
+
|
|
64
|
+
Calling `prune_history` with two entries — one obviously relevant to the goal, one not:
|
|
65
|
+
|
|
66
|
+
```json
|
|
67
|
+
{
|
|
68
|
+
"decisions": [
|
|
69
|
+
{ "entryId": "a", "relevance": 0.96, "recency": 0, "combinedScore": 0.864, "action": "keep" },
|
|
70
|
+
{ "entryId": "b", "relevance": 0.04, "recency": 1, "combinedScore": 0.136, "action": "drop" }
|
|
71
|
+
],
|
|
72
|
+
"savings": {
|
|
73
|
+
"totalEntries": 2, "keptEntries": 1, "droppedEntries": 1, "summarizedEntries": 0,
|
|
74
|
+
"totalTokens": 13, "savedTokens": 5
|
|
75
|
+
},
|
|
76
|
+
"usage": { "inputTokens": 406, "outputTokens": 36 }
|
|
77
|
+
}
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
*(real response body, captured against the live API.)*
|
|
81
|
+
|
|
82
|
+
## Related packages
|
|
83
|
+
|
|
84
|
+
| Package | What it is |
|
|
85
|
+
| --- | --- |
|
|
86
|
+
| [`ctxjev-core`](https://www.npmjs.com/package/ctxjev-core) | The engine this server wraps. |
|
|
87
|
+
| [`ctxjev-cli`](https://www.npmjs.com/package/ctxjev-cli) | The same scoring, as a terminal command. |
|
|
88
|
+
|
|
89
|
+
Full docs, design notes, and per-host setup live in the main repo:
|
|
20
90
|
**[github.com/x96x64/ctxjev](https://github.com/x96x64/ctxjev)**.
|
|
21
91
|
|
|
22
92
|
## License
|
|
23
93
|
|
|
24
|
-
MIT
|
|
94
|
+
[MIT](LICENSE)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "ctxjev-mcp",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.1",
|
|
4
4
|
"description": "MCP server exposing ctxjev's Jev-based context scoring/pruning as tools for any MCP-capable agent host.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
22
22
|
"zod": "^4.6.5",
|
|
23
|
-
"ctxjev-core": "0.1.
|
|
23
|
+
"ctxjev-core": "0.1.1"
|
|
24
24
|
},
|
|
25
25
|
"devDependencies": {
|
|
26
26
|
"@types/node": "^22",
|