UNPKG

bc-webclient-mcp

Version:

Model Context Protocol (MCP) server for Microsoft Dynamics 365 Business Central via WebUI protocol. Enables AI assistants to interact with BC through the web client protocol, supporting Card, List, and Document pages with full line item support and server

63 lines 1.65 kB
import type { UserSettings, MasterPage, BCConfig } from '../../types.js'; export type AuthHeaders = { Authorization: string; }; export declare class BCClient { private ws; private pendingRequests; private messageQueue; private connected; private authenticated; private config; private authHeaders; constructor(config: BCConfig); /** * Set authentication headers (OAuth Bearer token or Basic Auth) */ setAuthHeaders(headers: AuthHeaders): void; /** * Set OAuth Bearer token for authentication */ setAccessToken(token: string): void; /** * Set NavUserPassword Basic Auth credentials */ setBasicAuth(username: string, password: string): void; /** * Connect to Business Central WebSocket endpoint */ connect(): Promise<void>; /** * Build the WebSocket URL for BC */ private buildWebSocketUrl; /** * Handle incoming WebSocket messages */ private handleMessage; /** * Send JSON-RPC request */ private sendRequest; /** * Open connection to BC (IClientApi.OpenConnection) */ openConnection(): Promise<UserSettings>; /** * Open company (IClientApi.OpenCompany) */ openCompany(companyName?: string): Promise<void>; /** * Get master page metadata (IClientMetadataApi.GetMasterPage) */ getMasterPage(pageId: number): Promise<MasterPage>; /** * Close connection */ disconnect(): Promise<void>; /** * Check if connected and authenticated */ isReady(): boolean; } //# sourceMappingURL=BCWebSocketClient.d.ts.map