MCP Integration Reference
Kannaka Command Center exposes a Model Context Protocol (MCP) server so external AI clients (ChatGPT, Claude, Cursor, Codex) can inspect the canonical NATS subject space and sample live telemetry as the signed-in operator.
Paste a provisioned client_id and client_secret to run the full agent → JWT → JWKS → MCP handshake. Every step reports what failed and how to fix it, so you can distinguish a wrong secret from a JWKS mismatch from an audience mismatch.
Credentials are used only in this browser to make the same HTTPS calls an external agent would make. They are never sent to Kannaka's own servers except as the standard OAuth Basic header on the token request.
Add the server URL in your client's connectors panel:
https://nats.ninja-portal.com/mcpYou'll be redirected to Kannaka to sign in and approve access. Tools then run as your operator identity — capture_messagessubscribes using your kannaka_internal NATS session.
Return the Kannaka NATS subject allowlist (consciousness, presence, memory, radio, OODA, etc.) used by this command center. Read-only, idempotent.
{} // no arguments{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": { "name": "list_subjects", "arguments": {} }
}{
"content": [
{ "type": "text", "text": "[\n \"KANNAKA.consciousness\",\n \"KANNAKA.hemi.L\",\n \"KANNAKA.hemi.R\",\n \"QUEEN.phase.observe\",\n \"KANNAKA.events.memory.>\"\n]" }
],
"structuredContent": {
"subjects": [
"KANNAKA.consciousness",
"KANNAKA.hemi.L",
"KANNAKA.hemi.R",
"QUEEN.phase.observe",
"KANNAKA.events.memory.>"
]
}
}Return the OAuth-authenticated operator's Supabase user id, email, and OAuth client id as seen by this MCP server. Useful to confirm the connected session.
{} // no arguments{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": { "name": "whoami", "arguments": {} }
}{
"content": [
{ "type": "text", "text": "{\n \"userId\": \"3f0c…\",\n \"email\": \"operator@kannaka.dev\",\n \"clientId\": \"claude-desktop\"\n}" }
],
"structuredContent": {
"userId": "3f0c8b12-…",
"email": "operator@kannaka.dev",
"clientId": "claude-desktop"
}
}Open a short-lived NATS connection using the operator's kannaka_internal credentials, subscribe to a subject pattern (NATS wildcards * and > supported), collect messages for a bounded time window, and return them.
{
"subject": string // e.g. "KANNAKA.consciousness" or "QUEEN.phase.*"
"durationMs": integer // 100 – 5000, default 2000
"maxMessages": integer // 1 – 200, default 50
}{
"jsonrpc": "2.0",
"id": 3,
"method": "tools/call",
"params": {
"name": "capture_messages",
"arguments": {
"subject": "KANNAKA.hemi.>",
"durationMs": 2000,
"maxMessages": 20
}
}
}{
"content": [
{ "type": "text", "text": "{ \"subject\": \"KANNAKA.hemi.>\", \"count\": 3, … }" }
],
"structuredContent": {
"subject": "KANNAKA.hemi.>",
"durationMs": 2000,
"count": 3,
"messages": [
{
"subject": "KANNAKA.hemi.L",
"ts": 1780000000123,
"size": 42,
"payload": { "coherence": 0.81, "arousal": 0.44 }
},
{
"subject": "KANNAKA.hemi.R",
"ts": 1780000000456,
"size": 40,
"payload": { "coherence": 0.79, "arousal": 0.47 }
},
{
"subject": "KANNAKA.hemi.L",
"ts": 1780000001100,
"size": 42,
"payload": { "coherence": 0.83, "arousal": 0.45 }
}
]
}
}