@yobekasbah/mcp-server 3.0.1 → 3.0.3
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 +12 -12
- package/package.json +1 -1
- package/src/index.js +13 -13
package/README.md
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
# @
|
|
1
|
+
# @yobekasbah/mcp-server
|
|
2
2
|
|
|
3
3
|
**The trust layer for agentic AI** — drop into Claude Desktop, Claude Code, Cursor, Cline, or any MCP-compatible host. Govern, sign, and verify every action your agent takes. Every decision gets a verdict + an Ed25519-signed receipt that's verifiable offline, forever.
|
|
4
4
|
|
|
5
|
-
[https://
|
|
5
|
+
[https://kasbah-api.fly.dev](https://kasbah-api.fly.dev) · [Get a free API key](https://kasbah-api.fly.dev/v1/auth/signup) · [Receipt Spec v2](https://github.com/Al-Adnane/Kasbah-Core/blob/main/docs/RECEIPT-SPEC.md)
|
|
6
6
|
|
|
7
7
|
---
|
|
8
8
|
|
|
9
9
|
## Install
|
|
10
10
|
|
|
11
11
|
```bash
|
|
12
|
-
npx -y @
|
|
12
|
+
npx -y @yobekasbah/mcp-server
|
|
13
13
|
```
|
|
14
14
|
|
|
15
15
|
That's it. No global install needed.
|
|
@@ -17,7 +17,7 @@ That's it. No global install needed.
|
|
|
17
17
|
## 1. Get a free API key
|
|
18
18
|
|
|
19
19
|
```
|
|
20
|
-
https://
|
|
20
|
+
https://kasbah-api.fly.dev/v1/auth/signup
|
|
21
21
|
```
|
|
22
22
|
|
|
23
23
|
You get a key (`ksk_…`), a workspace, and a generous free tier. The key is required for the governance tools (`kasbah_attest`, `kasbah_check_compliance`, `kasbah_trace_intent`, `kasbah_cost_guard`).
|
|
@@ -31,9 +31,9 @@ Add to `~/.claude/mcp.json` (or `mcp.json` for Cursor / Cline / your host):
|
|
|
31
31
|
"mcpServers": {
|
|
32
32
|
"kasbah": {
|
|
33
33
|
"command": "npx",
|
|
34
|
-
"args": ["-y", "@
|
|
34
|
+
"args": ["-y", "@yobekasbah/mcp-server"],
|
|
35
35
|
"env": {
|
|
36
|
-
"KASBAH_API": "https://api.
|
|
36
|
+
"KASBAH_API": "https://kasbah-api.fly.dev",
|
|
37
37
|
"KASBAH_API_KEY": "ksk_your_key_here",
|
|
38
38
|
"KASBAH_AGENT": "my-agent"
|
|
39
39
|
}
|
|
@@ -145,10 +145,10 @@ const g = await mcp.call('kasbah_cost_guard', { agent: 'orchestrator', tool: 'we
|
|
|
145
145
|
|
|
146
146
|
| Var | Default | What it controls |
|
|
147
147
|
|---|---|---|
|
|
148
|
-
| `KASBAH_API` | `http://127.0.0.1:8788` | Engine endpoint (use `https://api.
|
|
149
|
-
| `KASBAH_API_KEY` | _(none)_ | **Required** for governance tools. Free key at [
|
|
148
|
+
| `KASBAH_API` | `http://127.0.0.1:8788` | Engine endpoint (use `https://kasbah-api.fly.dev` for hosted) |
|
|
149
|
+
| `KASBAH_API_KEY` | _(none)_ | **Required** for governance tools. Free key at [get a free key](https://kasbah-api.fly.dev/v1/auth/signup) |
|
|
150
150
|
| `KASBAH_AGENT` | `mcp-agent` | Identifier in audit receipts |
|
|
151
|
-
| `KASBAH_VERIFY_BASE` | `https://
|
|
151
|
+
| `KASBAH_VERIFY_BASE` | `https://kasbah-api.fly.dev/demo/verify` | Public verifier URL stamped into receipts |
|
|
152
152
|
| `KASBAH_NO_TELEMETRY` | _(unset)_ | Set to `1` to opt out of the anonymous boot-count ping to `/_pulse`. We collect zero prompts, payloads, or PII — only that the MCP started. |
|
|
153
153
|
|
|
154
154
|
## Got feedback? Found a bug?
|
|
@@ -162,7 +162,7 @@ Every `kasbah_status` response includes a one-click feedback `mailto:` so you ca
|
|
|
162
162
|
```bash
|
|
163
163
|
node -e "
|
|
164
164
|
const { spawn } = require('child_process');
|
|
165
|
-
const p = spawn('npx', ['@
|
|
165
|
+
const p = spawn('npx', ['@yobekasbah/mcp-server'], { stdio: ['pipe', 'pipe', 'inherit'] });
|
|
166
166
|
p.stdin.write(JSON.stringify({ jsonrpc:'2.0', id:1, method:'initialize', params:{} }) + '\n');
|
|
167
167
|
p.stdout.on('data', d => { console.log(d.toString()); p.kill(); });
|
|
168
168
|
"
|
|
@@ -175,7 +175,7 @@ p.stdout.on('data', d => { console.log(d.toString()); p.kill(); });
|
|
|
175
175
|
Every receipt this server returns is **Ed25519-signed by the engine** following [Receipt Spec v2](https://github.com/Al-Adnane/Kasbah-Core/blob/main/docs/RECEIPT-SPEC.md). Anyone with the engine's public key can verify it offline:
|
|
176
176
|
|
|
177
177
|
```bash
|
|
178
|
-
curl https://
|
|
178
|
+
curl https://kasbah-api.fly.dev/.well-known/kasbah-keys.json
|
|
179
179
|
# → { "keys": [{ "kid": "029e59…", "alg": "EdDSA", "crv": "Ed25519", "x": "…" }] }
|
|
180
180
|
```
|
|
181
181
|
|
|
@@ -207,7 +207,7 @@ The governance tools call the Kasbah engine at the configured `KASBAH_API` URL.
|
|
|
207
207
|
If the engine is unreachable, `kasbah_attest` still signs the action but marks it
|
|
208
208
|
`governed: false` (fail-open on availability, never on a real DENY). The other
|
|
209
209
|
governance tools surface a clear error. For production, use the hosted endpoint
|
|
210
|
-
`https://api.
|
|
210
|
+
`https://kasbah-api.fly.dev` or run the engine on a high-availability host.
|
|
211
211
|
|
|
212
212
|
## License
|
|
213
213
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yobekasbah/mcp-server",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.3",
|
|
4
4
|
"mcpName": "io.github.Al-Adnane/kasbah-mcp",
|
|
5
5
|
"description": "Kasbah MCP Server — cryptographic trust layer for agentic AI. Govern, sign, and verify every agent action from Claude Code, Cursor, or any MCP host.",
|
|
6
6
|
"main": "src/index.js",
|
package/src/index.js
CHANGED
|
@@ -34,15 +34,15 @@
|
|
|
34
34
|
*
|
|
35
35
|
* "kasbah": {
|
|
36
36
|
* "command": "npx",
|
|
37
|
-
* "args": ["-y", "@
|
|
37
|
+
* "args": ["-y", "@yobekasbah/mcp-server"],
|
|
38
38
|
* "env": {
|
|
39
|
-
* "KASBAH_API": "https://api.
|
|
40
|
-
* "KASBAH_API_KEY": "ksk_…your key from
|
|
39
|
+
* "KASBAH_API": "https://kasbah-api.fly.dev",
|
|
40
|
+
* "KASBAH_API_KEY": "ksk_…your key from kasbah-api.fly.dev/v1/auth/signup…",
|
|
41
41
|
* "KASBAH_AGENT": "my-agent"
|
|
42
42
|
* }
|
|
43
43
|
* }
|
|
44
44
|
*
|
|
45
|
-
* Get a free key at https://
|
|
45
|
+
* Get a free key at https://kasbah-api.fly.dev/v1/auth/signup. For local dev point
|
|
46
46
|
* KASBAH_API at http://127.0.0.1:8788.
|
|
47
47
|
*
|
|
48
48
|
* Protocol: JSON-RPC 2.0 over stdio (MCP spec 2024-11-05).
|
|
@@ -56,7 +56,7 @@ const { URL } = require('url');
|
|
|
56
56
|
const KASBAH_API = (process.env.KASBAH_API || process.env.KASBAH_API_URL || 'http://127.0.0.1:8788').replace(/\/+$/, '');
|
|
57
57
|
const AGENT = process.env.KASBAH_AGENT || process.env.KASBAH_PASSPORT_ID || 'mcp-agent';
|
|
58
58
|
const API_KEY = process.env.KASBAH_API_KEY || null;
|
|
59
|
-
const VERIFY_BASE = (process.env.KASBAH_VERIFY_BASE || 'https://
|
|
59
|
+
const VERIFY_BASE = (process.env.KASBAH_VERIFY_BASE || 'https://kasbah-api.fly.dev/demo/verify').replace(/\/+$/, '');
|
|
60
60
|
|
|
61
61
|
const MCP_VERSION = '2024-11-05';
|
|
62
62
|
const SERVER_INFO = { name: 'kasbah', version: '3.0.0' };
|
|
@@ -351,7 +351,7 @@ async function handleAttest(args) {
|
|
|
351
351
|
} else if (g.status === 401) {
|
|
352
352
|
return textResult({
|
|
353
353
|
error: 'unauthorized',
|
|
354
|
-
hint: 'Set KASBAH_API_KEY in your MCP config. Get a free key at https://
|
|
354
|
+
hint: 'Set KASBAH_API_KEY in your MCP config. Get a free key at https://kasbah-api.fly.dev/v1/auth/signup'
|
|
355
355
|
});
|
|
356
356
|
}
|
|
357
357
|
} catch (_) { /* offline → sign anyway, marked unverified by engine */ }
|
|
@@ -388,7 +388,7 @@ async function handleVerify(args) {
|
|
|
388
388
|
merkleVerified: res.body?.merkleVerified,
|
|
389
389
|
decoded: res.body?.decoded || null,
|
|
390
390
|
verifyOffline: `${VERIFY_BASE}/?r=${encodeURIComponent(receipt)}&p=${encodeURIComponent(payload)}`,
|
|
391
|
-
spec: res.body?.spec || 'https://
|
|
391
|
+
spec: res.body?.spec || 'https://github.com/Al-Adnane/Kasbah-Core/blob/main/docs/RECEIPT-SPEC-v3.md'
|
|
392
392
|
});
|
|
393
393
|
}
|
|
394
394
|
|
|
@@ -398,7 +398,7 @@ async function handleCheckCompliance(args) {
|
|
|
398
398
|
const res = await httpJson('POST', KASBAH_API + '/v1/algorithms/policy-engine/run', {
|
|
399
399
|
verb, target: target || '', content: content || '', packs: packs || 'HIPAA,GDPR,SOC2,BIOMETRIC_GUARD'
|
|
400
400
|
});
|
|
401
|
-
if (res.status === 401) return textResult({ error: 'unauthorized', hint: 'Set KASBAH_API_KEY. Free key: https://
|
|
401
|
+
if (res.status === 401) return textResult({ error: 'unauthorized', hint: 'Set KASBAH_API_KEY. Free key: https://kasbah-api.fly.dev/v1/auth/signup' });
|
|
402
402
|
const r = res.body?.result || res.body || {};
|
|
403
403
|
return textResult({
|
|
404
404
|
decision: r.verdict || 'UNKNOWN',
|
|
@@ -416,7 +416,7 @@ async function handleTraceIntent(args) {
|
|
|
416
416
|
const { steps } = args || {};
|
|
417
417
|
if (!steps) throw new Error('steps is required (one "VERB target" per line)');
|
|
418
418
|
const res = await httpJson('POST', KASBAH_API + '/v1/algorithms/intent-trajectory/run', { steps });
|
|
419
|
-
if (res.status === 401) return textResult({ error: 'unauthorized', hint: 'Set KASBAH_API_KEY. Free key: https://
|
|
419
|
+
if (res.status === 401) return textResult({ error: 'unauthorized', hint: 'Set KASBAH_API_KEY. Free key: https://kasbah-api.fly.dev/v1/auth/signup' });
|
|
420
420
|
const r = res.body?.result || res.body || {};
|
|
421
421
|
return textResult({
|
|
422
422
|
verdict: r.verdict || 'UNKNOWN',
|
|
@@ -436,7 +436,7 @@ async function handleCostGuard(args) {
|
|
|
436
436
|
const res = await httpJson('POST', KASBAH_API + '/v1/algorithms/cost-watch/run', {
|
|
437
437
|
agent, tool, calls: calls ?? 1, tokens: tokens ?? 1200
|
|
438
438
|
});
|
|
439
|
-
if (res.status === 401) return textResult({ error: 'unauthorized', hint: 'Set KASBAH_API_KEY. Free key: https://
|
|
439
|
+
if (res.status === 401) return textResult({ error: 'unauthorized', hint: 'Set KASBAH_API_KEY. Free key: https://kasbah-api.fly.dev/v1/auth/signup' });
|
|
440
440
|
const r = res.body?.result || res.body || {};
|
|
441
441
|
const decision = r.detail?.decision || {};
|
|
442
442
|
return textResult({
|
|
@@ -491,7 +491,7 @@ async function handleStatus() {
|
|
|
491
491
|
latest_receipt: lastReceipt,
|
|
492
492
|
verify_latest_offline_url: lastReceipt && lastReceiptPayload
|
|
493
493
|
? `${VERIFY_BASE}/?r=${encodeURIComponent(lastReceipt)}&p=${encodeURIComponent(lastReceiptPayload)}` : null,
|
|
494
|
-
spec: 'https://
|
|
494
|
+
spec: 'https://github.com/Al-Adnane/Kasbah-Core/blob/main/docs/RECEIPT-SPEC-v3.md'
|
|
495
495
|
},
|
|
496
496
|
dashboards: {
|
|
497
497
|
live_stream: KASBAH_API.replace(/:8788$/, ':3001') + '/dashboard',
|
|
@@ -517,7 +517,7 @@ async function handleExportAudit(args) {
|
|
|
517
517
|
agent: AGENT,
|
|
518
518
|
engine: KASBAH_API,
|
|
519
519
|
signing_public_key: pubKey,
|
|
520
|
-
receipt_spec: 'https://
|
|
520
|
+
receipt_spec: 'https://github.com/Al-Adnane/Kasbah-Core/blob/main/docs/RECEIPT-SPEC-v3.md',
|
|
521
521
|
standalone_verifier: `${VERIFY_BASE}/`,
|
|
522
522
|
entry_count: entries.length,
|
|
523
523
|
filter: { limit, verdict: verdict || null },
|
|
@@ -642,7 +642,7 @@ process.stdin.on('data', async (chunk) => {
|
|
|
642
642
|
});
|
|
643
643
|
|
|
644
644
|
process.stderr.write(`[kasbah-mcp] up · api=${KASBAH_API} · agent=${AGENT} · key=${API_KEY ? 'set' : 'MISSING'} · v${SERVER_INFO.version}\n`);
|
|
645
|
-
if (!API_KEY) process.stderr.write('[kasbah-mcp] no KASBAH_API_KEY — govern/compliance/intent/cost tools need one. Free key: https://
|
|
645
|
+
if (!API_KEY) process.stderr.write('[kasbah-mcp] no KASBAH_API_KEY — govern/compliance/intent/cost tools need one. Free key: https://kasbah-api.fly.dev/v1/auth/signup\n');
|
|
646
646
|
|
|
647
647
|
// Anonymous boot ping — count only, no prompts/payloads/PII. Opt out: KASBAH_NO_TELEMETRY=1.
|
|
648
648
|
if (!process.env.KASBAH_NO_TELEMETRY) {
|