@kognitivedev/mcp
v0.2.28
Published
Provider-agnostic MCP client and server with runtime tool conversion
Maintainers
Readme
@kognitivedev/mcp
Provider-agnostic MCP client and server with runtime tool conversion and stdio transport.
Installation
bun add @kognitivedev/mcp zodMCPClient
import { MCPClient } from "@kognitivedev/mcp";
const client = new MCPClient({
transport: { type: "http", url: "http://localhost:8080/mcp" },
});
await client.connect();
const tools = client.toTools();toTools() returns neutral Kognitive runtime tools. Pass them directly to agents or bridge them through an adapter package.
MCPServer
import { MCPServer } from "@kognitivedev/mcp";
const server = new MCPServer({ name: "my-server", version: "1.0" });
server.registerTool({
name: "search",
execute: async (args) => searchDb(args.query),
});StdioTransport
Communicate with local MCP servers over child-process stdin/stdout.
