tokrepo-mcp-server 2.2.0 → 2.4.0
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 +5 -2
- package/bin/server.js +37 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -35,18 +35,19 @@ gemini settings mcp add tokrepo -- npx -y tokrepo-mcp-server
|
|
|
35
35
|
|
|
36
36
|
Once connected, your AI assistant can:
|
|
37
37
|
|
|
38
|
-
- **Search** 200+ curated AI assets by keyword or category
|
|
38
|
+
- **Search** 200+ curated AI assets by keyword or category with Codex-first `agent_fit` ranking
|
|
39
39
|
- **Browse** trending assets, filter by type (MCP, Skill, Prompt, Agent, Script)
|
|
40
40
|
- **Get details** — full documentation, install instructions, and metadata
|
|
41
41
|
- **Plan before install** — get install plan v2 with policy decisions, rollback, and verification
|
|
42
42
|
- **Safe Codex install** — dry-run by default; risky assets must be staged or explicitly approved
|
|
43
43
|
- **Lifecycle control** — list installed assets, uninstall managed files, and roll back install sessions
|
|
44
|
+
- **Agent eval** — run TokRepo's agent-native search/plan/install/rollback contract checks
|
|
44
45
|
|
|
45
46
|
## Available Tools
|
|
46
47
|
|
|
47
48
|
| Tool | Description |
|
|
48
49
|
|------|-------------|
|
|
49
|
-
| `tokrepo_search` | Search assets by keyword
|
|
50
|
+
| `tokrepo_search` | Search assets by keyword/tag with `agent_fit` ranking |
|
|
50
51
|
| `tokrepo_detail` | Get full asset details by UUID |
|
|
51
52
|
| `tokrepo_install_plan` | Get agent-native install plan v2 |
|
|
52
53
|
| `tokrepo_codex_install` | Dry-run, stage, or install a Codex skill safely |
|
|
@@ -54,6 +55,7 @@ Once connected, your AI assistant can:
|
|
|
54
55
|
| `tokrepo_installed` | List TokRepo-managed Codex installs |
|
|
55
56
|
| `tokrepo_uninstall` | Dry-run or remove a managed Codex install |
|
|
56
57
|
| `tokrepo_rollback` | Dry-run or roll back a prior Codex install session |
|
|
58
|
+
| `tokrepo_eval_agent` | Run agent-native CLI contract and lifecycle evals |
|
|
57
59
|
| `tokrepo_install` | Get raw installable content |
|
|
58
60
|
| `tokrepo_trending` | Browse popular/latest assets |
|
|
59
61
|
|
|
@@ -70,6 +72,7 @@ You: "Install that cursor rules asset"
|
|
|
70
72
|
AI: [calls tokrepo_install_plan] → Reviews policy and actions
|
|
71
73
|
AI: [calls tokrepo_codex_install with dry_run=false, confirm=true] → Writes only after explicit confirmation
|
|
72
74
|
AI: [calls tokrepo_rollback with dry_run=true] → Shows exactly what would be removed before rollback
|
|
75
|
+
AI: [calls tokrepo_eval_agent] → Verifies TokRepo's agent-facing flow end to end
|
|
73
76
|
```
|
|
74
77
|
|
|
75
78
|
## Why TokRepo?
|
package/bin/server.js
CHANGED
|
@@ -19,7 +19,7 @@ const API_BASE = process.env.TOKREPO_API || 'https://api.tokrepo.com';
|
|
|
19
19
|
const TOKREPO_URL = 'https://tokrepo.com';
|
|
20
20
|
const TOKREPO_TOKEN = process.env.TOKREPO_TOKEN || '';
|
|
21
21
|
const TOKREPO_CLI = process.env.TOKREPO_CLI || '';
|
|
22
|
-
const SERVER_VERSION = '2.
|
|
22
|
+
const SERVER_VERSION = '2.4.0';
|
|
23
23
|
|
|
24
24
|
// ─── MCP Protocol (JSON-RPC over stdio) ───
|
|
25
25
|
|
|
@@ -55,8 +55,9 @@ const TOOLS = [
|
|
|
55
55
|
},
|
|
56
56
|
target: {
|
|
57
57
|
type: 'string',
|
|
58
|
-
description: '
|
|
58
|
+
description: 'Agent target filter. Defaults to codex so results include agent_fit ranking for installable Codex assets.',
|
|
59
59
|
enum: ['codex'],
|
|
60
|
+
default: 'codex',
|
|
60
61
|
},
|
|
61
62
|
kind: {
|
|
62
63
|
type: 'string',
|
|
@@ -245,6 +246,23 @@ const TOOLS = [
|
|
|
245
246
|
},
|
|
246
247
|
},
|
|
247
248
|
},
|
|
249
|
+
{
|
|
250
|
+
name: 'tokrepo_eval_agent',
|
|
251
|
+
description: 'Run TokRepo agent-native evals through the CLI. Verifies filtered search, install-plan contracts, metadata quality reporting, Codex install verification, manifest state, and rollback using temporary local state.',
|
|
252
|
+
inputSchema: {
|
|
253
|
+
type: 'object',
|
|
254
|
+
properties: {
|
|
255
|
+
uuid: {
|
|
256
|
+
type: 'string',
|
|
257
|
+
description: 'Optional sample asset UUID for install-plan and lifecycle tests.',
|
|
258
|
+
},
|
|
259
|
+
keyword: {
|
|
260
|
+
type: 'string',
|
|
261
|
+
description: 'Optional search keyword for filtered search eval. Default video.',
|
|
262
|
+
},
|
|
263
|
+
},
|
|
264
|
+
},
|
|
265
|
+
},
|
|
248
266
|
{
|
|
249
267
|
name: 'tokrepo_trending',
|
|
250
268
|
description: 'Get trending/popular AI assets on TokRepo. Use when user asks for recommended or popular AI tools.',
|
|
@@ -519,7 +537,7 @@ function jsonText(title, data) {
|
|
|
519
537
|
// ─── Tool Handlers ───
|
|
520
538
|
|
|
521
539
|
async function handleSearch(args) {
|
|
522
|
-
const { query, tag, limit = 10, target = '', kind = '', policy = '' } = args;
|
|
540
|
+
const { query, tag, limit = 10, target = 'codex', kind = '', policy = '' } = args;
|
|
523
541
|
if (target || kind || policy) {
|
|
524
542
|
const cliArgs = ['search', query, '--json', '--page-size', String(Math.min(limit, 20))];
|
|
525
543
|
if (target) cliArgs.push('--target', target);
|
|
@@ -803,6 +821,21 @@ async function handleRollback(args) {
|
|
|
803
821
|
return { content: [{ type: 'text', text: jsonText(dry_run === false ? 'TokRepo Codex rollback result' : 'TokRepo Codex rollback dry-run', data) }] };
|
|
804
822
|
}
|
|
805
823
|
|
|
824
|
+
async function handleEvalAgent(args) {
|
|
825
|
+
const { uuid = '', keyword = '' } = args || {};
|
|
826
|
+
const cliArgs = ['eval-agent', '--json'];
|
|
827
|
+
if (uuid) cliArgs.push('--uuid', uuid);
|
|
828
|
+
if (keyword) cliArgs.push('--keyword', keyword);
|
|
829
|
+
const { stdout, stderr } = await runTokrepoCli(cliArgs);
|
|
830
|
+
let data;
|
|
831
|
+
try {
|
|
832
|
+
data = JSON.parse(stdout);
|
|
833
|
+
} catch {
|
|
834
|
+
data = { stdout, stderr };
|
|
835
|
+
}
|
|
836
|
+
return { content: [{ type: 'text', text: jsonText('TokRepo agent eval result', data) }] };
|
|
837
|
+
}
|
|
838
|
+
|
|
806
839
|
async function handleTrending(args) {
|
|
807
840
|
const { sort = 'popular', limit = 10 } = args;
|
|
808
841
|
const params = new URLSearchParams({
|
|
@@ -957,6 +990,7 @@ async function handleRequest(msg) {
|
|
|
957
990
|
case 'tokrepo_installed': result = await handleInstalled(args || {}); break;
|
|
958
991
|
case 'tokrepo_uninstall': result = await handleUninstall(args || {}); break;
|
|
959
992
|
case 'tokrepo_rollback': result = await handleRollback(args || {}); break;
|
|
993
|
+
case 'tokrepo_eval_agent': result = await handleEvalAgent(args || {}); break;
|
|
960
994
|
case 'tokrepo_trending': result = await handleTrending(args || {}); break;
|
|
961
995
|
case 'tokrepo_push': result = await handlePush(args || {}); break;
|
|
962
996
|
case 'tokrepo_status': result = await handleStatus(args || {}); break;
|
package/package.json
CHANGED