---
id: object/codeunit/8350
type: object
title: Codeunit 8350 "MCP Config"
summary: Codeunit 8350 "MCP Config" in System Application (System.MCP). 31 public procedures. Introduced in BC27, still in BC30, changed in BC28-29.
tier: official
language: en
tags:
  - codeunit
  - system application
versions:
  introduced: "27"
  last_changed: "29"
  deprecated: null
review:
  state: derived
  by: null
  at: null
  flags: []
generated:
  at: "2026-10-11T00:31:51.816Z"
  pipeline: 0.2.0
  prompts: {}
  input_hash: 71aea9af146cc2f6e49a80e83198acaef3df4bba8d90ad1b149e3e5ac6d05d10
evidence:
  - kind: code
    url: https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/MCP/src/Configuration/Codeunits/MCPConfig.Codeunit.al
    title: src/System Application/App/MCP/src/Configuration/Codeunits/MCPConfig.Codeunit.al (releases/29.x)
    date: null
    commit: ea08af5ef2d6a9b5c5af4a029288abbe2c883220
    t: null
    quote: null
links:
  learn: []
  objects: []
  features: []
  topics: []
  localizations: []
  videos: []
  posts: []
  guidelines: []
  changes:
    - change/bcapps/12207
    - change/bcapps/10008
    - change/bcapps/8085
object_type: codeunit
object_id: 8350
name: MCP Config
namespace: System.MCP
app: System Application
extends: null
first_version: "27"
last_version: "30"
present_in:
  - "27"
  - "28"
  - "29"
  - "30"
changed_in:
  - "28"
  - "29"
source_major: "29"
obsolete: null
countries: []
ms_search_form_ids: []
counts:
  fields: 0
  procedures: 31
  events: 0
  subscribers: 0
relations:
  out: 0
  referenced_by: 0
  pages: 0
  extended_by: 0
  event_subscribers: 0
  calls: 1
  called_by: 1
  implements: 0
---

# Codeunit 8350 "MCP Config"

> Codeunit 8350 "MCP Config" in System Application (System.MCP). 31 public procedures. Introduced in BC27, still in BC30, changed in BC28-29.

System Application · System.MCP · BC27-30 · [source at ea08af5e](https://github.com/microsoft/BCApps/blob/ea08af5ef2d6a9b5c5af4a029288abbe2c883220/src/System%20Application/App/MCP/src/Configuration/Codeunits/MCPConfig.Codeunit.al) · facts from BC29

## Properties

| Property | Value |
|---|---|
| Access | Public |

## Procedures

- `GetConfigurationIdByName(Name: Text[100]): Guid`: Retrieves the SystemId (GUID) of a configuration by its name.
- `CreateConfiguration(Name: Text[100]; Description: Text[250]): Guid`: Creates a new MCP configuration with the specified name and description.
- `ActivateConfiguration(ConfigId: Guid; Active: Boolean)`: Activates the specified MCP configuration.
- `AllowCreateUpdateDeleteTools(ConfigId: Guid; Allow: Boolean)`: Allows create, update and delete tools for the specified MCP configuration. Disallowing this will make the tools read-only.
- `DeleteConfiguration(ConfigId: Guid)`: Deletes the specified MCP configuration.
- `CopyConfiguration(SourceConfigId: Guid; NewName: Text[100]; NewDescription: Text[250]): Guid`: Copies an existing configuration to a new configuration, including its tools and permissions.
- `SetAsDefaultConfiguration(ConfigId: Guid)`: Sets the specified MCP configuration as the default configuration. When no configuration is specified by a connection, the default configuration will be used. Only active configurations can be set as default.
- `ClearDefaultConfiguration()`: Clears the current default configuration designation and restores the system default.
- `EnableDynamicToolMode(ConfigId: Guid; Enable: Boolean)`: Enables dynamic tool mode for the specified configuration.
- `EnableDiscoverReadOnlyObjects(ConfigId: Guid; Enable: Boolean)`: Enables discovery of accessible read-only objects for the specified configuration.
- `EnableDataQueryTools(ConfigId: Guid; Enable: Boolean)`: Enables or disables the Data Query Tools feature for the specified configuration.
- `EnableAPITools(ConfigId: Guid; Enable: Boolean)`: Enables or disables the API Tools feature for the specified configuration.
- `FindWarningsForConfiguration(ConfigId: Guid; var MCPConfigWarning: Record "MCP Config Warning"): Boolean`: Finds warnings for the specified MCP configuration, such as missing objects or missing parent objects.
- `ApplyRecommendedAction(var MCPConfigWarning: Record "MCP Config Warning")`: Applies the recommended action for the specified warning.
- `CreateAPITool(ConfigId: Guid; APIPageId: Integer): Guid`: Creates a new API tool for the specified configuration and API page.
- `CreateAPITool(ConfigId: Guid; APIPageId: Integer; ValidateAPIPublisher: Boolean): Guid`: Creates a new API tool for the specified configuration and API page.
- `CreateQueryAPITool(ConfigId: Guid; QueryId: Integer): Guid`: Creates a new API tool for the specified configuration and query.
- `CreateCodeunitAPITool(ConfigId: Guid; CodeunitId: Integer): Guid`: Creates a new API tool for the specified configuration and codeunit.
- `GetAPIToolId(ConfigId: Guid; ObjectId: Integer; ObjectType: Option Page,Query,Codeunit): Guid`: Retrieves the SystemId (GUID) of a tool by its configuration ID, object ID and object type.
- `GetAPIToolId(ConfigId: Guid; APIPageId: Integer): Guid` (obsolete 29.0: Use GetAPIToolId with ObjectType parameter instead.): Retrieves the SystemId (GUID) of a tool by its configuration ID and API page.
- `DeleteTool(ToolSystemId: Guid)`: Deletes the specified tool from the configuration.
- `AllowRead(ToolSystemId: Guid; Allow: Boolean)`: Sets the read permission for the specified tool.
- `AllowCreate(ToolSystemId: Guid; Allow: Boolean)`: Sets the create permission for the specified tool.
- `AllowModify(ToolSystemId: Guid; Allow: Boolean)`: Sets the modify permission for the specified tool.
- `AllowDelete(ToolSystemId: Guid; Allow: Boolean)`: Sets the delete permission for the specified tool.
- `AllowActions(ToolSystemId: Guid; Allow: Boolean)`: Sets the actions permission for the specified tool. For API pages this controls bound actions; for codeunit tools this controls whether the codeunit action can be invoked.
- `AllowBoundActions(ToolSystemId: Guid; Allow: Boolean)` (obsolete 29.0: Renamed to AllowActions.): Sets the bound actions permission for the specified tool.
- `CreateEntraApplication(Name: Text[100]; Description: Text[250]; ClientId: Guid)`: Creates a new MCP Entra Application with the specified name, description, and client ID.
- `DeleteEntraApplication(Name: Text[100])`: Deletes the specified MCP Entra Application.
- `ExportConfiguration(ConfigId: Guid; var OutStream: OutStream)`: Exports the specified MCP configuration and its tools to a JSON stream.
- `ImportConfiguration(var InStream: InStream; NewName: Text[100]; NewDescription: Text[250]): Guid`: Imports an MCP configuration and its tools from a JSON stream.

## Calls

From the extracted call graph of BC29 (graphify-al on the snapshot checkout): calls whose target is known from a declared type or an `Object::"Name"` argument. Interface dispatch and calls through events are not counted, so the list is not complete.

- [Codeunit 8351 "MCP Config Implementation"](../codeunit/8351.md) (28 calls: `ActivateConfiguration → ActivateConfiguration`, `AllowActions → AllowActions`, `AllowCreate → AllowCreate`, …)

## Called by

- [Page 8352 "MCP Config Tool List"](../page/8352.md) (3 calls: `AddAPIObjects → CreateAPITool`, `AddAPIObjects → CreateCodeunitAPITool`, `AddAPIObjects → CreateQueryAPITool`)

## Recent changes

- 2026-10-07 [#12207 [MCP] Prepare Data Query Tools for billing](../../changes/bcapps/12207.md) (main, BC30, feature)
- 2026-08-20 [#10008 [MCP] Add codeunit APIs as MCP tools in MCP configuration](../../changes/bcapps/10008.md) (main, BC30, feature)
- 2026-07-27 [#8085 [MCP] Server Features in MCP configuration: API Tools, Dynamic Tool Mode, Data Query Tools (Preview)](../../changes/bcapps/8085.md) (main, BC30, feature)

## Across versions

- Present in: BC27-30
- Changed (declaration) in: BC28-29

## Deprecations

- procedure AllowBoundActions: Pending 29.0 (#if not CLEAN29), "Renamed to AllowActions."
- procedure GetAPIToolId: Pending 29.0 (#if not CLEAN29), "Use GetAPIToolId with ObjectType parameter instead."

Source: AL metadata extracted from the code (names, ids, signatures, properties); no code bodies (D10).

## Ask your agent

Procedure bodies are not stored here (D10). The call sections above are our own, per object, from the BC29 call graph. For a procedure body or the calls of one procedure, ask bc-code-atlas (external, by Stefan Maron, MIT; default corpus w1-28), which the bc-observatory plugin connects: `bcatlas_resolve_node(object_type: "codeunit", object_name: "MCP Config")`, then `bcatlas_get_procedure_body` or `bcatlas_get_neighbors` on the returned id.
