ragatanga-mcp-sdk
Version:
SDK for integrating with the Ragatanga Management Control Plane (MCP) with Next.js 15, React 19, WebSocket and Arrow IPC support
72 lines (67 loc) • 2.25 kB
TypeScript
import { M as MCPOptions } from './types-CmbeEBKR.js';
/**
* Browser-safe client for Ragatanga MCP SDK
*
* This client is designed to be used in browser environments like Next.js client components.
* It avoids using Node.js specific features and dependencies that cause issues in the browser.
*/
declare class BrowserMCPError extends Error {
status?: number;
code?: string;
constructor(message: string, options?: {
status?: number;
code?: string;
});
}
/**
* Browser-safe MCP client implementation
*/
declare class BrowserMCPClient {
private baseUrl;
private tenantId?;
private apiKey?;
private token?;
private defaultOptions;
private defaultTimeout;
/**
* Creates a new browser-safe MCP client
* @param options - Client options
*/
constructor(options?: MCPOptions);
/**
* Make a request to the MCP API
*/
request<T = any>(path: string, options?: {
method?: string;
body?: any;
headers?: Record<string, string>;
timeout?: number;
}): Promise<T>;
/**
* Make a GET request
*/
get<T = any>(path: string, options?: Omit<Parameters<BrowserMCPClient['request']>[1], 'method'>): Promise<T>;
/**
* Make a POST request
*/
post<T = any>(path: string, body: any, options?: Omit<Parameters<BrowserMCPClient['request']>[1], 'method' | 'body'>): Promise<T>;
/**
* Make a PUT request
*/
put<T = any>(path: string, body: any, options?: Omit<Parameters<BrowserMCPClient['request']>[1], 'method' | 'body'>): Promise<T>;
/**
* Make a DELETE request
*/
delete<T = any>(path: string, options?: Omit<Parameters<BrowserMCPClient['request']>[1], 'method'>): Promise<T>;
}
/**
* Create a browser-safe MCP client
*/
declare function createBrowserClient(options: MCPOptions): BrowserMCPClient;
/**
* Browser-safe entry point for Ragatanga MCP SDK
*
* This file exports a browser-compatible version of the SDK that doesn't include
* Node.js specific dependencies that cause issues in the browser environment.
*/
export { BrowserMCPClient, BrowserMCPError, MCPOptions, createBrowserClient, createBrowserClient as createClient, createBrowserClient as default };