@leumas/mcp-kit
Turn any Leumas adapter/tool into an MCP server — the contract helpers + adapter→server compiler.
@leumas/mcp-kit
Turn any Leumas adapter/tool into an MCP server any coding agent can call. The SDK half of MCP generation — the runtime that loads + serves these lives in shared/engines/mcp.
Absorbs (DRY-consolidated from): opensource/mcp-server-library/sdk/*.
Usage
import { defineServer, defineTool, adapterToServer } from '@leumas/mcp-kit';
// hand-authored:
const math = defineServer({ name: 'math', tools: [
defineTool({ name: 'add', inputs: [{ key: 'a', type: 'number' }, { key: 'b', type: 'number' }], run: ({ a, b }) => a + b }),
]});
// or compile an existing adapter system:
const physics = adapterToServer(physicsAdapter); // every adapter fn becomes an MCP tool
server.manifest() is what the engine's GET /mcp returns; server.call(tool, args) runs one.
What it exports
3 exports: 0 components, 0 hooks, 3 helpers. Import from @leumas/mcp-kit.
adapterToServerdefineServerdefineTool