@kognitivedev/mcp
v0.2.11
Published
MCP client and server with AI SDK tool conversion
Maintainers
Readme
@kognitivedev/mcp
MCP client and server with AI SDK tool conversion and stdio transport.
Installation
bun add @kognitivedev/mcp ai zodMCPClient
import { MCPClient } from "@kognitivedev/mcp";
const client = new MCPClient({ transport: { type: "http", url: "http://localhost:8080/mcp" } });
await client.connect();
const tools = client.toAISDKTools(); // Use in streamTextMCPServer
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) });
const response = await server.handleRequest(jsonRpcRequest);StdioTransport
Communicate with MCP servers via child process stdin/stdout for CLI tools.
