Skip to content
MCP server
Registry

Dynamics 365 Business Central Admin MCP Server

Administer Business Central environments, apps, PTEs, updates and exports via the Admin Center API.

Dynamics 365 Business Central Admin scores 70 (Good), licensed MIT and written in C#. It installs as a local process. It declares 40 tools. Filed under Uncategorized. GitHub shows 13 stars. Package registries report about 167 downloads a week. Install configs are generated for 10 clients. Being listed in the registry is not the same as being vendor-official.

by demilianiMITC#13 stars
Trust score
70Good
Trust score 70 of 100, Good

Good trust

70 of 100 from six public signals. Nobody can buy a point.

  • Listed in the official MCP registry.
  • OSI-style license: mit.
How we score trust
Scorecard

License, quality and maintenance

How grades work
Trust breakdown

Where the 70 comes from

22 + 20 + 4 + 10 + 4 + 10 = 70. Each factor is capped, so no single signal can carry a listing.

Registry22 / 30

Active in the official MCP registry, plus a known vendor namespace.

Registry: 22 of 30 points.
Maintenance20 / 20

How recently the repository saw a commit or release.

Maintenance: 20 of 20 points.
Popularity4 / 20

GitHub stars and weekly downloads, on a log scale.

Popularity: 4 of 20 points.
License10 / 10

A clear, OSI-style open-source license.

License: 10 of 10 points.
Security4 / 10

Not archived, a secure install path, a pinned version.

Security: 4 of 10 points.
Docs10 / 10

A real summary, a README with depth, listed tools.

Docs: 10 of 10 points.

Install

Pick your client, copy the config, paste it in.

Needs Cursor or VS Code installed on this device. The button opens the app and asks you to confirm before it adds the server.

~/Library/Application Support/Claude/claude_desktop_config.json
{  "mcpServers": {    "demiliani-d365bcadminmcp": {      "command": "npx",      "args": [        "-y",        "@demiliani/d365bc-admin-mcp@2.0.1"      ],      "env": {        "D365BC_MCP_LOG_LEVEL": "Information",        "D365BC_MCP_PERSIST_TOKEN_CACHE": "true"      }    }  }}

Environment variables

NameRequiredNotes
D365BC_MCP_LOG_LEVELOptionalLog level written to stderr
D365BC_MCP_PERSIST_TOKEN_CACHEOptionalKeep the Microsoft sign-in in the encrypted OS token cache across restarts

Tools40Tool docs quality grade C

All capabilities

About

Dynamics 365 Business Central Admin MCP Server (YAMPI)

A Model Context Protocol (MCP) server that enables AI assistants like Claude Desktop, GitHub Copilot, and Cursor to manage Dynamics 365 Business Central environments through natural language commands.

๐ŸŒŸ Features

  • ๐Ÿ” Interactive Authentication - Secure Microsoft Entra ID authentication with browser-based login
  • ๐Ÿ“ฆ 52 Administrative Tools - Complete environment, app, session, PTE upload, and extension management
  • โšก Smart Token Caching - Automatic token refresh to minimize authentication prompts
  • ๐ŸŒ Multi-Tenant Support - Manage multiple Business Central tenants seamlessly
  • ๐Ÿ’ฌ Natural Language Interface - Control BC through conversational AI commands
  • ๐Ÿ”’ Secure by Design - No credentials stored, uses Azure authentication standards
  • ๐Ÿ›ฐ๏ธ Admin Center API v2.29 - Built on the latest Business Central Administration Center API

๐Ÿ“ฆ Installation

Via npm (Recommended)

npm install -g @demiliani/d365bc-admin-mcp

To upgrade, run the same command with @latest. Close your AI assistant first (or stop the MCP server): on Windows a running server keeps its executable locked.

The server is also listed in the MCP Registry as io.github.demiliani/d365bc-admin-mcp, so clients that browse the registry (such as VS Code) can find and install it directly.

Prerequisites

  • Node.js 18+ - Download
  • Windows, Linux (glibc) or macOS, on x64 or ARM64 - npm installs only the self-contained server for your platform (about 15 MB, no .NET install needed); elsewhere, build from source
  • Dynamics 365 Business Central - Admin access to your tenant
  • Microsoft Entra ID - Azure account with BC admin privileges

โš™๏ธ Configuration

After installation, configure your AI assistant to use the MCP server.

Claude Desktop

Location:

  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • Linux: ~/.config/Claude/claude_desktop_config.json

Configuration:

{
  "mcpServers": {
    "d365bc-admin": {
      "command": "d365bc-admin-mcp"
    }
  }
}

Steps:

  1. Open the configuration file (create it if it doesn't exist)
  2. Add the above configuration
  3. Save the file
  4. Restart Claude Desktop
  5. You should see the MCP server connected in the chat window

GitHub Copilot (VS Code)

Install in VS Code Install in VS Code Insiders

The buttons add the server to your VS Code user configuration and run it through npx, so the global npm install is optional.

To configure it by hand, run MCP: Open User Configuration from the Command Palette (or create .vscode/mcp.json in a workspace) and add:

{
  "servers": {
    "d365bc-admin": {
      "type": "stdio",
      "command": "d365bc-admin-mcp"
    }
  }
}

Then start the server from the Start link shown above it in mcp.json (or MCP: List Servers) and use it from Copilot Chat in Agent mode.

Cursor

Location: ~/.cursor/mcp.json (all projects) or .cursor/mcp.json in a project

Configuration:

{
  "mcpServers": {
    "d365bc-admin": {
      "command": "d365bc-admin-mcp"
    }
  }
}

Save the file; the server appears under Cursor Settings โ†’ MCP, where it can be enabled and restarted.

๐Ÿ” Authentication

The server first tries the credentials already available on the machine (Azure CLI, Visual Studio, environment variables, managed identity). Otherwise, on first use, a browser window opens for Microsoft Entra ID authentication: sign in with your Business Central administrator account.

The sign-in is kept across restarts: refresh tokens are stored in the operating system's encrypted token cache (Windows DPAPI, macOS Keychain, Linux keyring) and the account is remembered in %LOCALAPPDATA%/D365BCAdminMCP (~/Library/Application Support/D365BCAdminMCP on macOS, ~/.local/share/D365BCAdminMCP on Linux), so the browser opens again only when the refresh token expires. Where no encrypted store is available (e.g. Linux without a keyring), the login is kept in memory only. Set D365BC_MCP_PERSIST_TOKEN_CACHE=false to disable persistence; clear_cached_token signs out of a tenant.

If the browser window does not launch automatically, run the MCP tool force_interactive_auth (e.g., ask your assistant: "Force interactive login for tenant 00000000-0000-0000-0000-000000000000"). It skips Azure CLI / Visual Studio credentials and the saved sign-in, opens the Microsoft login dialog for the specified tenant and lets you choose a different account (useful when the machine is signed in with a user that has no access to that tenant).

No additional setup required - the MCP server handles authentication automatically!

๐Ÿ’ก Usage Examples

Once configured, use natural language commands in your AI assistant:

Environment Management

"Show me all my Business Central environments"
"What's the status of my Production environment?"
"Create a new sandbox environment called 'Dev-Test' in the US"
"Copy Production environment to a new sandbox called 'Testing'"
"Delete the 'Old-Test' sandbox environment"
"Rename the 'Testing' sandbox to 'UAT'"
"Which points in time can I restore Production to? Restore it to yesterday 08:00 UTC as a sandbox called 'Prod-Restore'"
"Show the running environment operations and how many environments I can still create"
"Delete the Production environment"   (you are asked to type 'Production' to confirm)
"Export the Production database to my storage account; how many exports are left this month?"
"Restrict Sandbox access to the 'BC Testers' security group"

Application Management

"List all installed apps in Production"
"Show available updates for my apps"
"Install app with ID <app-id> in my Production environment"
"Update the Sales Module app to version 2.0"
"Uninstall the old Marketing app from Sandbox"

Session Management

"Show active user sessions in Production"
"Terminate session abc123 in my Sandbox environment"

Update Windows

"Get the update window settings for Production"
"Set update window for Production to 10 PM - 6 AM UTC"

Storage & Monitoring

"Show storage usage for all environments"
"What's the storage usage for Production?"

Extension Deployment & PTE Uploads

"Install c:\\Packages\\MyPTE.app on Production (Fabrikam) during the update window"
"Install all .app files from c:\\Packages into Sandbox now, in dependency order, installing any missing AppSource apps"
"Show the scheduled PTE installs for Production and cancel the one for MyPTE 2.0.0.0"
"Check the extension deployment status for Fabrikam in Production"

๐Ÿ› ๏ธ Available Tools (52 Total)

The MCP server exposes 52 administrative tools organized by category:

๐Ÿ”‘ Authentication & Tenant Management (3 tools)

ToolDescription
get_microsoft_entra_id_tokenSign in to a tenant and cache the token used by the other tools (returns status and expiry, never the token)
force_interactive_authForce browser-based login and refresh the cached token for a tenant
get_tenant_id_from_tenant_nameRetrieve tenant ID from tenant name

๐ŸŒ Environment Management (16 tools)

ToolDescription
get_environment_informationsList all BC environments in a tenant
create_new_environmentCreate a new BC environment (optionally on a specific ring and application version)
copy_environmentCopy an existing environment to create a new one
delete_environmentDelete a Business Central environment
recover_environmentRecover a recently deleted environment
rename_environmentRename an environment (its URL changes, so integrations must be updated)
restore_environmentRestore an environment to a point in time as a new environment
get_available_restore_periodsList the time ranges an environment can be restored to
get_environment_operationsList environment operations (create, copy, rename, restore, ...) for the tenant or one environment
get_environment_quotasGet the environment and storage quotas of the tenant
get_environment_update_windowGet update window settings for an environment
set_environment_update_windowConfigure update window for an environment
set_environment_application_insights_connection_stringSet Application Insights connection string
get_usage_storage_for_environmentGet storage usage for a specific environment
get_usage_storage_for_all_environmentsGet storage usage for all environments
get_environment_companiesList companies in an environment

๐Ÿ“ฆ Application Management (6 tools)

ToolDescription
get_installed_appsList apps installed in an environment
get_available_app_updatesCheck for available app updates
install_appInstall a Marketplace (AppSource) app in a Business Central environment
update_appUpdate an app to a specific version
uninstall_appRemove an app from an environment
get_app_operationsGet status of app install/update/uninstall operations

๐Ÿ”„ Environment Updates (2 tools)

ToolDescription
get_environment_updatesCheck for available BC version updates
set_environment_updateSchedule or run an environment update

๐Ÿ‘ฅ Session Management (2 tools)

ToolDescription
get_active_sessionsList active user sessions in an environment
kill_active_sessionsTerminate a specific active session

๐Ÿ”” Notification Management (3 tools)

ToolDescription
get_environment_notification_recipientList notification recipients
create_environment_notification_recipientAdd a new notification recipient
delete_environment_notification_recipientRemove a notification recipient

๐Ÿ” Environment Access (5 tools)

ToolDescription
get_environment_security_groupGet the Microsoft Entra security group that restricts access to an environment
set_environment_security_groupRestrict access to the members of a security group
clear_environment_security_groupRemove the security group restriction
get_access_with_m365_licensesCheck whether users can access the environment with Microsoft 365 licenses
set_access_with_m365_licensesAllow or disallow access with Microsoft 365 licenses

๐Ÿ’พ Database Export (2 tools)

ToolDescription
get_database_export_metricsExports allowed per month and remaining this month
start_database_exportExport the environment database as a .bacpac file to an Azure Storage account

start_database_export needs a paid subscription, the D365 BACKUP/RESTORE permission set and a Blob service SAS URI of an Azure standard storage account with Read, Write, Create and Delete permissions. The SAS URI is never logged or returned by the server, but it is part of the conversation with the AI assistant, so use a short-lived one. Track the export with get_environment_operations.

๐Ÿ”ง Feature Management (3 tools)

ToolDescription
get_available_featuresList available features in an environment
activate_featureActivate a feature in a Business Central environment
deactivate_featureDeactivate a feature in a Business Central environment

๐Ÿš€ PTE Management via Admin Center API v2.29 (4 tools)

ToolDescription
install_pteUpload a PTE (.app, max 50 MB) and install it immediately or on a schedule
install_ptes_from_folderUpload all .app files in a folder in dependency order, waiting for each immediate install
get_scheduled_pte_operationsList scheduled PTE installs and updates
cancel_scheduled_pteCancel a scheduled PTE install or update

deploymentSchedule accepts Immediate, UpdateWindow, NextMinorUpdate and NextMajorUpdate (new PTEs only accept Immediate or UpdateWindow); syncMode accepts Add and ForceSync.

install_ptes_from_folder reads each package's manifest (app.json, or NavxManifest.xml generated by the compiler) and uploads an app only after the apps it depends on. All files are validated (size, readable manifest, duplicates, circular dependencies) before anything is uploaded; if an app fails, the apps depending on it are skipped.

Dependencies outside the folder (for example AppSource apps) are checked against the apps installed in the environment before anything is uploaded. With installMissingDependencies (default true), missing apps are installed and apps older than the declared minimum version are updated, waiting for each operation; they run immediately, also when the PTEs are scheduled, and go to the latest version available for the environment. If a dependency cannot be installed, only the PTEs depending on it are skipped. With installMissingDependencies = false the tool stops and lists what is missing. Microsoft platform apps (System Application, Base Application, ...) are never installed or updated: if the environment version is too old, an environment update is required.

These tools require an Admin Center role (Dynamics 365 Business Central Administrator, Dynamics 365 Administrator, or delegated admin).

๐Ÿงฉ Extension Deployment & PTE Uploads โ€“ Automation API (4 tools, deprecated)

Uploading PTEs through the Automation API is being removed in 2027 release wave 1 (version 30.0). Use the PTE Management tools above instead.

ToolDescription
get_extension_deployment_statusGet extension deployment status for an environment/company
create_pte_uploadCreate and upload a single PTE (.app) file
create_pte_uploads_from_folderBulk upload PTEs from a folder, waiting for each deployment
get_extension_uploadRetrieve the status of a specific extension upload task

๐Ÿงน Token Management (2 tools)

ToolDescription
clear_cached_tokenClear cached authentication token for a tenant
get_token_cache_statusView cached token status for all tenants

Tool behaviour

  • Annotations: every tool declares MCP hints, so clients can run read-only tools (get_*) without confirmation. Tools that delete or break things (delete_environment, rename_environment, uninstall_app, kill_active_sessions, delete_environment_notification_recipient, cancel_scheduled_pte) are marked destructive, as are set_environment_security_group and clear_environment_security_group.
  • Confirmation for production: deleting or renaming a Production environment, and uninstalling an app with deleteData in production, require the user to type the environment name. Clients that support MCP elicitation (confirmation prompts) show a prompt and a name supplied by the model is ignored; with other clients the assistant must ask the user and pass confirmEnvironmentName. Sandboxes are not affected.
  • Throttling and transient errors: calls answered with 429 or 503 are retried up to 3 times, honouring Retry-After (max 60 s). Read calls are also retried on 502, 504, network errors and timeouts; write calls are not, to avoid running an operation twice. Each HTTP request times out after 5 minutes.
  • Cancellation and progress: cancelling a request in the client stops the tool, including the waits of install_pte and install_ptes_from_folder, which also report progress. An operation already accepted by Business Central keeps running server-side; check it with get_app_operations or get_environment_operations.

๐ŸŽฏ Quick Start

  1. Install the package:

    npm install -g @demiliani/d365bc-admin-mcp
    

    ๐Ÿ“– Need detailed installation instructions? See the Installation Guide for platform-specific steps (Windows, macOS, Linux) and troubleshooting.

  2. Configure your AI assistant (see Configuration section above)

  3. Start using it:

    • Open your AI assistant (Claude, Copilot, or Cursor)
    • Type: "Show me all my Business Central environments"
    • Authenticate when prompted (first time only)
    • Start managing your BC environments with natural language!

๐Ÿ“š Documentation

For detailed installation documentation, see:

๐Ÿ” Troubleshooting

"Command not found: d365bc-admin-mcp"

npm install -g @demiliani/d365bc-admin-mcp
d365bc-admin-mcp --version
which d365bc-admin-mcp      # macOS / Linux
where d365bc-admin-mcp      # Windows

If the command still isn't found, add npm's global folder (npm prefix -g) to your PATH.

"is not installed" / missing binary

The npm package installs the server binary from an optional dependency for your platform (e.g. @demiliani/d365bc-admin-mcp-win-x64). Reinstall without --omit=optional / --no-optional.

Upgrade fails with EPERM / EBUSY (Windows)

A running server keeps its executable locked. Close VS Code, Claude Desktop or Cursor (or stop the MCP server), then run npm install -g @demiliani/d365bc-admin-mcp@latest again.

Authentication Issues

  • Ensure you have Business Central admin privileges
  • Check that you're signing in with the correct Microsoft account
  • Try clearing the token cache: "Clear cached token for tenant [tenant-id]"
  • If the login prompt never appears, or you are signed in with the wrong account, ask: "Force interactive login for tenant [tenant-id]" (force_interactive_auth opens the browser immediately and lets you pick the account)

MCP Server Not Appearing

  • Verify the config file location for your OS
  • Check for JSON syntax errors in the config
  • Restart your AI assistant completely
  • Check the assistant's logs for error messages

Diagnostic Logging

The server writes its logs to stderr only (stdout is reserved for the MCP protocol). Set the D365BC_MCP_LOG_LEVEL environment variable to Debug, Information (default), Warning, Error or None. Access tokens and response bodies are never logged.

When an Admin Center API call fails, tools return the API error instead of a generic message, e.g. {"error": "HTTP 404 Not Found: EnvironmentNotFound: ..."}.

๐Ÿค Contributing

Contributions are welcome! Please feel free to submit issues, feature requests, or pull requests.

Building from source requires the .NET 10 SDK (pinned in global.json). Build and run the tests (the same steps run in CI on every pull request):

dotnet build src/D365BCAdminMCP.sln
dotnet test src/D365BCAdminMCP.sln

npm run build publishes the native server for your platform into build/, and npm test starts it through the npm launcher and checks the MCP handshake and the tool list.

Releasing

Releases are published by .github/workflows/release.yml with npm trusted publishing: GitHub Actions authenticates to npm with a short-lived OIDC token, so no npm token is stored anywhere, and every package gets a provenance attestation. The workflow only stages the packages; they go live when a maintainer approves them with 2FA.

Each release is seven npm packages: @demiliani/d365bc-admin-mcp (the launcher) and one package per platform with its server binary (@demiliani/d365bc-admin-mcp-win-x64, -win-arm64, -linux-x64, -linux-arm64, -osx-x64, -osx-arm64). The main package lists them as optional dependencies pinned to its own version, and npm installs only the one matching the user's OS and CPU.

To release:

  1. Bump the version with npm version 1.4.0 --no-git-tag-version: it updates package.json and server.json, and the csproj reads the version from package.json. Merge it to main.
  2. Tag the merge commit and push the tag: git tag v1.4.0 && git push origin v1.4.0. The workflow refuses tags that don't match package.json or that point outside main. A tag such as v1.4.0-beta.1 publishes under the next dist-tag.
  3. The workflow runs the tests, builds and smoke-tests each binary on its own OS and CPU, installs the packed packages like a user would, and stages them on npm.
  4. On npmjs.com โ†’ Staged Packages, wait until npm's automated review ("Validating") has finished, then approve the seven packages with 2FA: select them with Add to batch to approve them in one step, or approve the six platform packages first and @demiliani/d365bc-admin-mcp last. Approving the main package before the platform packages would briefly leave users without a binary.
  5. Review and publish the draft GitHub release, which carries the binaries, their SHA-256 checksums and build provenance attestations. Publishing it runs publish-mcp-registry.yml, which publishes server.json to the MCP Registry, logging in with GitHub OIDC (no secret). The registry checks that the npm version is live, so do this after step 4; if you didn't, re-run that workflow once the packages are approved. Prereleases are not sent to the registry.

One-time setup:

  • GitHub โ†’ repository Settings โ†’ Environments โ†’ create npm-publish, and under Deployment branches and tags allow only tags matching v*. Optionally add required reviewers.
  • GitHub โ†’ Settings โ†’ Rules โ†’ add a tag ruleset for v* so only maintainers can create, update or delete release tags.
  • GitHub โ†’ Settings โ†’ Code security โ†’ enable Private vulnerability reporting (used by SECURITY.md).
  • npmjs.com, for each of the seven packages โ†’ Settings โ†’ Trusted Publisher โ†’ GitHub Actions: organization or user demiliani, repository D365BCAdminMCP, workflow filename release.yml, environment npm-publish, allowed action stage publish. npm expects the first publish through a new trusted publisher within 2 days of creating it.
  • After the first release goes through, set Publishing access to Require two-factor authentication and disallow bypass 2fa tokens on every package, and revoke any old automation tokens.

First release with platform packages: npm only lets you configure a trusted publisher on a package that already exists, so the six platform packages are published by hand once:

  1. Configure the trusted publisher on @demiliani/d365bc-admin-mcp and push the release tag. The Stage npm packages job fails on the first platform package, which doesn't exist yet.
  2. Download the npm-packages artifact from that workflow run, then from its folder run npm login and for f in demiliani-d365bc-admin-mcp-*-<version>.tgz; do npm publish "$f"; done, or in PowerShell Get-ChildItem demiliani-d365bc-admin-mcp-*-<version>.tgz | ForEach-Object { npm publish $_.FullName }. The pattern matches the six platform packages, not the main one.
  3. Configure the trusted publisher on each of the six platform packages.
  4. Re-run the failed jobs: versions already on npm are skipped, so only the main package is staged. Approve it.

๐Ÿ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.

๐Ÿ“ฎ Support

๐Ÿ™ Acknowledgments

Built with:


Made with โค๏ธ for the Dynamics 365 Business Central community

Frequently asked questions

What is Dynamics 365 Business Central Admin MCP Server?

Administer Business Central environments, apps, PTEs, updates and exports via the Admin Center API.

How do I install Dynamics 365 Business Central Admin MCP Server in Claude Desktop, Cursor, or VS Code?

Pick your client in the Install section on this page and copy the generated config into the client's config file. Step-by-step guides: Claude Desktop, Cursor, and VS Code. Dynamics 365 Business Central Admin MCP Server runs locally from the npm package @demiliani/d365bc-admin-mcp with the command npx -y @demiliani/d365bc-admin-mcp@2.0.1.

Is Dynamics 365 Business Central Admin MCP Server free and open source?

Yes. Dynamics 365 Business Central Admin MCP Server is released under the MIT license, an OSI-approved open-source license, so you can use, modify, and self-host it under those terms.

Does Dynamics 365 Business Central Admin MCP Server support remote (HTTP) connections?

No remote endpoint is listed for Dynamics 365 Business Central Admin MCP Server. It runs locally on your machine over stdio, started by your MCP client.

What tools does Dynamics 365 Business Central Admin MCP Server provide?

Dynamics 365 Business Central Admin MCP Server provides 40 tools, including clear_environment_security_group, copy_environment, create_environment_notification_recipient, and create_new_environment. See the full tool list for descriptions and parameters.

How is Dynamics 365 Business Central Admin MCP Server's trust score calculated?

Dynamics 365 Business Central Admin MCP Server scores 70 out of 100 (Good). The score adds six capped public signals: registry status, maintenance, popularity, license, documentation, and security. Nobody can pay for points. Read the methodology for the full formula.

Reviews

No reviews yet

โ€”Be the first to review

5 star0 reviews at 5 stars
4 star0 reviews at 4 stars
3 star0 reviews at 3 stars
2 star0 reviews at 2 stars
1 star0 reviews at 1 stars

No published reviews yet. Used it? Tell the next person how it went.

Add badge to your README

Paste either snippet into the repository README. The image links to this listing.

Listed on MCPpedia

Top 5 MCP servers

Daily or weekly. Confirm by email, unsubscribe any time.

How often

Manage this listing

Claim this server