/** * 🔌 THE MELETE MCP SERVER — Melete as agent-callable trust middleware (the "toll-booth of truth"). * * The 2026 battleground is not model intelligence — it is context, memory, and TRUST between AI agents. The * strategic move for Melete is not to be another optimizer app, but the INFRASTRUCTURE any AI agent (Claude, * GPT, Gemini, an autonomous coding agent) plugs into over the Model Context Protocol to get answers it can * VERIFY rather than take on faith. An agent that just ran experiments POSTs the numbers; Melete hands back a * signed, offline-verifiable certificate — de-bias this winner, is this recommendation supported, control the * false-discovery rate, propose the next setting. Plug-and-play, every result signed. * * This module is a transport-agnostic JSON-RPC 2.0 / MCP request handler over a tool registry. `bin/melete-mcp` * wires it to stdio so it drops straight into Claude Desktop / Cursor / any MCP client. The differentiator vs a * plain tool server: the RESULTS are Ed25519-signed certificates the calling agent re-verifies with the * embedded public key — trust without trusting the server. * * Honest by design (DIAKRISIS): this is a thin, dependency-free protocol shell over the SAME proven engine and * honesty stack — its value is reach (any agent, plug-and-play) + the signed results, not a new algorithm. */ import { type KeyObject } from "node:crypto"; export declare const MCP_PROTOCOL_VERSION = "2024-11-05"; export declare const MCP_SERVER_NAME = "melete"; export interface LedgerReceipt { seq: number; agent: string; tool: string; inputHash: string; resultHash: string; prevHash: string; hash: string; sig: string; } export interface MeleteLedger { record: (agent: string, tool: string, args: unknown, result: unknown) => LedgerReceipt; verifyChain: () => { ok: boolean; brokenAt: number; reason: string; }; usage: () => { total: number; byAgent: Record; byTool: Record; }; receipts: LedgerReceipt[]; publicKeyPem: string; } export declare function createLedger(keys?: { publicKey: KeyObject; privateKey: KeyObject; }): MeleteLedger; interface McpTool { name: string; description: string; inputSchema: Record; run: (args: Record) => unknown; } export declare function verifyByKind(kind: string, c: any): { ok: boolean; reason: string; }; export declare const MELETE_MCP_TOOLS: McpTool[]; export interface JsonRpcRequest { jsonrpc?: string; id?: string | number | null; method?: string; params?: any; } export interface JsonRpcResponse { jsonrpc: "2.0"; id: string | number | null; result?: unknown; error?: { code: number; message: string; }; } export interface McpContext { ledger?: MeleteLedger; agent?: string; } /** Handle one JSON-RPC 2.0 / MCP request. Pure + total: never throws — protocol errors come back as JSON-RPC errors. * Pass a ctx with a ledger to meter + audit every tool call (a signed receipt is attached to the response). */ export declare function handleMcpRequest(req: JsonRpcRequest, ctx?: McpContext): JsonRpcResponse; export declare function mcpGauntlet(): { score: 0 | 100; checks: Array<{ name: string; pass: boolean; detail: string; }>; }; export {}; //# sourceMappingURL=mcp.d.ts.map