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
37 lines • 1.61 kB
JavaScript
/**
* Resource Registry
*
* Centralized registry for all MCP resources.
* Provides factory function to build the list of resources for MCPServer.
*/
import { WorkflowPatternsDocResource } from './docs-workflow-patterns-resource.js';
import { BCSchemaPagesResource } from './schema-pages-resource.js';
import { BCSessionStateResource } from './session-current-resource.js';
import { BCWorkflowAllResource } from './workflow-all-resource.js';
/**
* Builds the list of resources to register with MCPServer.
*
* This function creates all available MCP resources with the provided context.
* Resources are stateless and can be safely shared across requests.
*
* @param ctx - Optional context with logger
* @returns Array of IMCPResource implementations
*/
export function buildResources(ctx = {}) {
const resources = [];
// Documentation resources
resources.push(new WorkflowPatternsDocResource());
// Schema resources
resources.push(new BCSchemaPagesResource(ctx.logger));
// Session introspection resources
resources.push(new BCSessionStateResource(ctx.logger));
// Workflow introspection resources
resources.push(new BCWorkflowAllResource(ctx.logger));
return resources;
}
// Re-export resource classes for direct usage if needed
export { WorkflowPatternsDocResource } from './docs-workflow-patterns-resource.js';
export { BCSchemaPagesResource } from './schema-pages-resource.js';
export { BCSessionStateResource } from './session-current-resource.js';
export { BCWorkflowAllResource } from './workflow-all-resource.js';
//# sourceMappingURL=index.js.map