Skip to content

MCP SDK Overview

Copy page

@divinci-ai/mcp is a client for the Model Context Protocol. It connects MCP-compatible AI assistants — Claude Desktop, Cursor, or your own agent — to Divinci’s tools and resources over an SSE transport, with optional Auth0 sign-in and x402 pay-per-call.

  • Tool discovery and invocation
  • Resource and prompt access
  • Auto-reconnecting SSE transport
  • Auth0 (PKCE) authentication
  • x402 payments for premium tools
Terminal window
npm install @divinci-ai/mcp

Tool and resource operations hang off the client; tool calls specifically live on the tools accessor.

import { McpClient } from "@divinci-ai/mcp";
const mcp = new McpClient({
serverUrl: "https://mcp.divinci.app",
});
await mcp.connect();
// Discover and call tools via the `tools` accessor
const tools = await mcp.tools.listTools();
const result = await mcp.tools.callTool("search_knowledge", { query: "refunds" });
OptionTypeDefaultDescription
serverUrlstringRequired. MCP server URL.
clientNamestringdivinci-mcp-clientIdentifies your client to the server.
clientVersionstring0.1.0Your client version.
timeoutnumber30000Request timeout (ms).
autoReconnectbooleantrueReconnect dropped SSE connections.
maxReconnectAttemptsnumber5Reconnect attempts before giving up.
authMcpAuthOptionsAuth0 config (Authentication).
paymentMcpPaymentOptionsx402 wallet + autopay (Payments).
debugbooleanfalseVerbose logging.