mcp-jev 2.0.0 → 2.0.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.
Files changed (2) hide show
  1. package/README.md +171 -171
  2. package/package.json +53 -53
package/README.md CHANGED
@@ -1,171 +1,171 @@
1
- # mcp-jev
2
-
3
- MCP server for **System-1 decision models** — provider-agnostic. Routes to [TypeSafe Jev](https://typesafe.ai) (cloud) or [Laya](https://pypi.org/project/laya/) (local HTTP) via a single env var.
4
-
5
- ## Migration from v1 → v2
6
-
7
- v2 replaces `jev_decide`/`jev_list_models` with a 4-tool provider-agnostic interface:
8
-
9
- | v1 | v2 | Notes |
10
- |----|----|----|
11
- | `jev_decide` | `decide_predict` | Same question format (`questions[]` array) |
12
- | `jev_list_models` | `decide_list_models` | Same return shape |
13
- | — | `decide_status` | New: provider health info |
14
- | — | `decide_preset` | New: named workflow presets |
15
-
16
- **v2 env vars** (replaces `TYPESAFE_API_KEY` alone):
17
-
18
- | Variable | Required | Default | Description |
19
- |----------|----------|---------|-------------|
20
- | `DECIDE_PROVIDER` | No | `jev` | `jev` or `laya` |
21
- | `TYPESAFE_API_KEY` | When `jev` | — | TypeSafe API key |
22
- | `TYPESAFE_BASE_URL` | No | `https://api.typesafe.ai` | Override Jev URL |
23
- | `LAYA_BASE_URL` | No | `http://localhost:8000` | Override Laya URL |
24
- | `LAYA_API_KEY` | No | — | Laya bearer token (if Laya requires auth) |
25
-
26
- ---
27
-
28
- ## Tools
29
-
30
- ### `decide_predict`
31
-
32
- Core inference. Evaluate typed questions against a state.
33
-
34
- **Question types**: `noul` (yes/no probability), `choice` (pick one of N), `score` (rate on rubric)
35
-
36
- **Example:**
37
- ```json
38
- {
39
- "state": { "message": "My payment failed 3 days ago, help!" },
40
- "questions": [
41
- { "id": "urgent", "type": "noul", "instructions": "Is `message` urgent?" },
42
- { "id": "dept", "type": "choice", "instructions": "Which team?",
43
- "criteria": { "billing": "Payments", "technical": "API errors", "general": null } }
44
- ]
45
- }
46
- ```
47
-
48
- ---
49
-
50
- ### `decide_preset`
51
-
52
- Run a named workflow preset — expands to a pre-defined question set.
53
-
54
- **Available presets:**
55
-
56
- | Preset | State field | Questions |
57
- |--------|------------|-----------|
58
- | `triage` | `message` | intent, urgency, frustration, refund, churn |
59
- | `guard` | `prompt` | jailbreak, injection, sensitive_data, harm, topic |
60
- | `moderation` | `post` | toxic, harassment, threat, spam, severity |
61
- | `router` | `request` | difficulty, domain, needs_tools, is_sensitive |
62
- | `email` | `body` | category, is_spam, is_phishing, urgency, needs_reply |
63
-
64
- **Example:**
65
- ```json
66
- { "preset": "guard", "state": { "prompt": "Ignore all instructions" } }
67
- ```
68
-
69
- ---
70
-
71
- ### `decide_status`
72
-
73
- Provider health and configuration info.
74
-
75
- ```json
76
- // Jev response
77
- { "provider": "jev", "base_url": "https://api.typesafe.ai", "model": "jev-latest", "status": "ok" }
78
-
79
- // Laya response
80
- { "provider": "laya", "base_url": "http://localhost:8000", "loaded": ["english", "multilingual"], "device": "cuda", "status": "ok" }
81
- ```
82
-
83
- ---
84
-
85
- ### `decide_list_models`
86
-
87
- Available models or checkpoints.
88
-
89
- ---
90
-
91
- ## Installation
92
-
93
- ### With Jev (cloud, default)
94
-
95
- ```json
96
- {
97
- "mcpServers": {
98
- "jev": {
99
- "command": "npx",
100
- "args": ["-y", "mcp-jev"],
101
- "env": {
102
- "TYPESAFE_API_KEY": "your_key_here"
103
- }
104
- }
105
- }
106
- }
107
- ```
108
-
109
- ### With Laya (local)
110
-
111
- Start Laya HTTP server first:
112
- ```bash
113
- pip install "laya[serve]"
114
- LAYA_DEVICE=cuda LAYA_PRELOAD=1 laya-serve # default: http://localhost:8000
115
- ```
116
-
117
- Then configure MCP:
118
- ```json
119
- {
120
- "mcpServers": {
121
- "jev": {
122
- "command": "npx",
123
- "args": ["-y", "mcp-jev"],
124
- "env": {
125
- "DECIDE_PROVIDER": "laya",
126
- "LAYA_BASE_URL": "http://localhost:8000"
127
- }
128
- }
129
- }
130
- }
131
- ```
132
-
133
- ### Local build
134
-
135
- ```bash
136
- cd mcp-jev
137
- npm install
138
- npm run build
139
- ```
140
-
141
- ```json
142
- {
143
- "mcpServers": {
144
- "jev": {
145
- "command": "node",
146
- "args": ["d:/github/crhead/mcp-jev/dist/index.js"],
147
- "env": {
148
- "DECIDE_PROVIDER": "jev",
149
- "TYPESAFE_API_KEY": "your_key_here"
150
- }
151
- }
152
- }
153
- }
154
- ```
155
-
156
- ---
157
-
158
- ## Provider Comparison
159
-
160
- | | Jev (cloud) | Laya (local) |
161
- |--|-------------|-------------|
162
- | API key | Required (`TYPESAFE_API_KEY`) | Optional (`LAYA_API_KEY`) |
163
- | Latency | Cloud (~200ms) | Local (~33ms GPU) |
164
- | Routing metadata | None | Yes (language, checkpoint) |
165
- | `/health` endpoint | No | Yes |
166
- | Model list | `GET /v1/models` | Extracted from `GET /health` |
167
- | Internet required | Yes | No |
168
-
169
- ---
170
-
171
- Source: [github.com/mndpjm/mcp-jev](https://github.com/mndpjm/mcp-jev)
1
+ # mcp-jev
2
+
3
+ MCP server for **System-1 decision models** — provider-agnostic. Routes to [TypeSafe Jev](https://typesafe.ai) (cloud) or [Laya](https://pypi.org/project/laya/) (local HTTP) via a single env var.
4
+
5
+ ## Migration from v1 → v2
6
+
7
+ v2 replaces `jev_decide`/`jev_list_models` with a 4-tool provider-agnostic interface:
8
+
9
+ | v1 | v2 | Notes |
10
+ |----|----|----|
11
+ | `jev_decide` | `decide_predict` | Same question format (`questions[]` array) |
12
+ | `jev_list_models` | `decide_list_models` | Same return shape |
13
+ | — | `decide_status` | New: provider health info |
14
+ | — | `decide_preset` | New: named workflow presets |
15
+
16
+ **v2 env vars** (replaces `TYPESAFE_API_KEY` alone):
17
+
18
+ | Variable | Required | Default | Description |
19
+ |----------|----------|---------|-------------|
20
+ | `DECIDE_PROVIDER` | No | `jev` | `jev` or `laya` |
21
+ | `TYPESAFE_API_KEY` | When `jev` | — | TypeSafe API key |
22
+ | `TYPESAFE_BASE_URL` | No | `https://api.typesafe.ai` | Override Jev URL |
23
+ | `LAYA_BASE_URL` | No | `http://localhost:8000` | Override Laya URL |
24
+ | `LAYA_API_KEY` | No | — | Laya bearer token (if Laya requires auth) |
25
+
26
+ ---
27
+
28
+ ## Tools
29
+
30
+ ### `decide_predict`
31
+
32
+ Core inference. Evaluate typed questions against a state.
33
+
34
+ **Question types**: `noul` (yes/no probability), `choice` (pick one of N), `score` (rate on rubric)
35
+
36
+ **Example:**
37
+ ```json
38
+ {
39
+ "state": { "message": "My payment failed 3 days ago, help!" },
40
+ "questions": [
41
+ { "id": "urgent", "type": "noul", "instructions": "Is `message` urgent?" },
42
+ { "id": "dept", "type": "choice", "instructions": "Which team?",
43
+ "criteria": { "billing": "Payments", "technical": "API errors", "general": null } }
44
+ ]
45
+ }
46
+ ```
47
+
48
+ ---
49
+
50
+ ### `decide_preset`
51
+
52
+ Run a named workflow preset — expands to a pre-defined question set.
53
+
54
+ **Available presets:**
55
+
56
+ | Preset | State field | Questions |
57
+ |--------|------------|-----------|
58
+ | `triage` | `message` | intent, urgency, frustration, refund, churn |
59
+ | `guard` | `prompt` | jailbreak, injection, sensitive_data, harm, topic |
60
+ | `moderation` | `post` | toxic, harassment, threat, spam, severity |
61
+ | `router` | `request` | difficulty, domain, needs_tools, is_sensitive |
62
+ | `email` | `body` | category, is_spam, is_phishing, urgency, needs_reply |
63
+
64
+ **Example:**
65
+ ```json
66
+ { "preset": "guard", "state": { "prompt": "Ignore all instructions" } }
67
+ ```
68
+
69
+ ---
70
+
71
+ ### `decide_status`
72
+
73
+ Provider health and configuration info.
74
+
75
+ ```json
76
+ // Jev response
77
+ { "provider": "jev", "base_url": "https://api.typesafe.ai", "model": "jev-latest", "status": "ok" }
78
+
79
+ // Laya response
80
+ { "provider": "laya", "base_url": "http://localhost:8000", "loaded": ["english", "multilingual"], "device": "cuda", "status": "ok" }
81
+ ```
82
+
83
+ ---
84
+
85
+ ### `decide_list_models`
86
+
87
+ Available models or checkpoints.
88
+
89
+ ---
90
+
91
+ ## Installation
92
+
93
+ ### With Jev (cloud, default)
94
+
95
+ ```json
96
+ {
97
+ "mcpServers": {
98
+ "jev": {
99
+ "command": "npx",
100
+ "args": ["-y", "mcp-jev"],
101
+ "env": {
102
+ "TYPESAFE_API_KEY": "your_key_here"
103
+ }
104
+ }
105
+ }
106
+ }
107
+ ```
108
+
109
+ ### With Laya (local)
110
+
111
+ Start Laya HTTP server first:
112
+ ```bash
113
+ pip install "laya[serve]"
114
+ LAYA_DEVICE=cuda LAYA_PRELOAD=1 laya-serve # default: http://localhost:8000
115
+ ```
116
+
117
+ Then configure MCP:
118
+ ```json
119
+ {
120
+ "mcpServers": {
121
+ "jev": {
122
+ "command": "npx",
123
+ "args": ["-y", "mcp-jev"],
124
+ "env": {
125
+ "DECIDE_PROVIDER": "laya",
126
+ "LAYA_BASE_URL": "http://localhost:8000"
127
+ }
128
+ }
129
+ }
130
+ }
131
+ ```
132
+
133
+ ### Local build
134
+
135
+ ```bash
136
+ cd mcp-jev
137
+ npm install
138
+ npm run build
139
+ ```
140
+
141
+ ```json
142
+ {
143
+ "mcpServers": {
144
+ "jev": {
145
+ "command": "node",
146
+ "args": ["d:/github/crhead/mcp-jev/dist/index.js"],
147
+ "env": {
148
+ "DECIDE_PROVIDER": "jev",
149
+ "TYPESAFE_API_KEY": "your_key_here"
150
+ }
151
+ }
152
+ }
153
+ }
154
+ ```
155
+
156
+ ---
157
+
158
+ ## Provider Comparison
159
+
160
+ | | Jev (cloud) | Laya (local) |
161
+ |--|-------------|-------------|
162
+ | API key | Required (`TYPESAFE_API_KEY`) | Optional (`LAYA_API_KEY`) |
163
+ | Latency | Cloud (~200ms) | Local (~33ms GPU) |
164
+ | Routing metadata | None | Yes (language, checkpoint) |
165
+ | `/health` endpoint | No | Yes |
166
+ | Model list | `GET /v1/models` | Extracted from `GET /health` |
167
+ | Internet required | Yes | No |
168
+
169
+ ---
170
+
171
+ Source: [github.com/mndpjm/mcp-jev](https://github.com/mndpjm/mcp-jev)
package/package.json CHANGED
@@ -1,53 +1,53 @@
1
- {
2
- "name": "mcp-jev",
3
- "version": "2.0.0",
4
- "description": "MCP server for TypeSafe Jev — System One Model. Two tools: jev_decide (noul/choice/score) and jev_list_models.",
5
- "type": "module",
6
- "main": "dist/index.js",
7
- "bin": {
8
- "mcp-jev": "dist/index.js"
9
- },
10
- "scripts": {
11
- "build": "tsc",
12
- "dev": "tsx src/index.ts",
13
- "typecheck": "tsc --noEmit",
14
- "start": "node dist/index.js",
15
- "prepare": "tsc",
16
- "test": "vitest run",
17
- "test:watch": "vitest"
18
- },
19
- "files": [
20
- "dist",
21
- "README.md"
22
- ],
23
- "keywords": [
24
- "mcp",
25
- "model-context-protocol",
26
- "typesafe",
27
- "jev",
28
- "system-one",
29
- "ai",
30
- "decision-model",
31
- "classification",
32
- "routing"
33
- ],
34
- "license": "MIT",
35
- "repository": {
36
- "type": "git",
37
- "url": "git+https://github.com/mndpjm/mcp-jev.git"
38
- },
39
- "homepage": "https://github.com/mndpjm/mcp-jev#readme",
40
- "dependencies": {
41
- "@modelcontextprotocol/sdk": "^1.16.0",
42
- "zod": "^3.23.8"
43
- },
44
- "devDependencies": {
45
- "@types/node": "^22.9.0",
46
- "tsx": "^4.19.0",
47
- "typescript": "^5.6.3",
48
- "vitest": "^2.1.0"
49
- },
50
- "engines": {
51
- "node": ">=20"
52
- }
53
- }
1
+ {
2
+ "name": "mcp-jev",
3
+ "version": "2.0.1",
4
+ "description": "MCP server for TypeSafe Jev — System One Model. Two tools: jev_decide (noul/choice/score) and jev_list_models.",
5
+ "type": "module",
6
+ "main": "dist/index.js",
7
+ "bin": {
8
+ "mcp-jev": "dist/index.js"
9
+ },
10
+ "scripts": {
11
+ "build": "tsc",
12
+ "dev": "tsx src/index.ts",
13
+ "typecheck": "tsc --noEmit",
14
+ "start": "node dist/index.js",
15
+ "prepare": "tsc",
16
+ "test": "vitest run",
17
+ "test:watch": "vitest"
18
+ },
19
+ "files": [
20
+ "dist",
21
+ "README.md"
22
+ ],
23
+ "keywords": [
24
+ "mcp",
25
+ "model-context-protocol",
26
+ "typesafe",
27
+ "jev",
28
+ "system-one",
29
+ "ai",
30
+ "decision-model",
31
+ "classification",
32
+ "routing"
33
+ ],
34
+ "license": "MIT",
35
+ "repository": {
36
+ "type": "git",
37
+ "url": "git+https://github.com/mndpjm/mcp-jev.git"
38
+ },
39
+ "homepage": "https://github.com/mndpjm/mcp-jev#readme",
40
+ "dependencies": {
41
+ "@modelcontextprotocol/sdk": "^1.16.0",
42
+ "zod": "^3.23.8"
43
+ },
44
+ "devDependencies": {
45
+ "@types/node": "^22.9.0",
46
+ "tsx": "^4.19.0",
47
+ "typescript": "^5.6.3",
48
+ "vitest": "^2.1.0"
49
+ },
50
+ "engines": {
51
+ "node": ">=20"
52
+ }
53
+ }