Skip to content

Conversation

@onbuyuka
Copy link
Contributor

@onbuyuka onbuyuka commented Jan 29, 2026

Summary

Adds the ability to export and import MCP server configurations as JSON files, enabling users to easily share configurations across different Business Central environments.

Changes

New Features

  • Export Configuration: Export an MCP configuration (including all tools and permissions) to a JSON file
  • Import Configuration: Import an MCP configuration from a JSON file, with automatic name conflict detection

UI Changes

  • Added Export and Import actions to the "Advanced" action group on the MCP Config List page
  • Both actions are promoted for easy access
  • Changed the "Connection String" action icon from Export to Link to avoid visual confusion with the new Export action
  • Enhanced the Copy Config dialog to display an instruction message when a name conflict is detected during import

Implementation Details

  • Export creates a JSON file named MCPConfig_<name>_<date>.json containing:
    • Configuration settings (name, description, enableDynamicToolMode, discoverReadOnlyObjects, allowProdChanges)
    • All associated tools with their permissions
  • Import always creates configurations as inactive (validation happens on activation)
  • When importing a config with a name that already exists, displays a dialog prompting for a new name
  • Added public API methods ExportConfiguration and ImportConfiguration to the MCP Config codeunit for extensibility

Files Modified

  • MCPConfig.Codeunit.al - Added public API for export/import
  • MCPConfigImplementation.Codeunit.al - Added export/import implementation logic
  • MCPConfigList.Page.al - Added Export/Import actions
  • MCPConfigCard.Page.al - Changed Connection String icon
  • MCPCopyConfig.Page.al - Added instruction message field and setter methods
  • MCPConfigTest.Codeunit.al - Added unit tests for export/import

Tests

  • TestExportConfiguration - Verifies JSON export contains correct configuration data and tools
  • TestImportConfiguration - Verifies import creates config with correct settings and tools

Fixes AB#619975

@onbuyuka onbuyuka requested a review from a team as a code owner January 29, 2026 20:11
@github-actions github-actions bot added this to the Version 28.0 milestone Jan 29, 2026
@onbuyuka onbuyuka enabled auto-merge (squash) January 29, 2026 20:36
@onbuyuka onbuyuka requested a review from a team as a code owner January 29, 2026 23:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants