Bc Mcp Proxy

finance MCP Server

Resilient MCP stdio proxy for Microsoft Dynamics 365 Business Central. Fork of microsoft/BCTech BcMCPProxyPython with reconnect, silent token refresh, and surfaced upstream errors.

Verified
financefinancepython
4 views0 stars0 forksMIT

Why This Matters

Discovered via github-topic:mcp-server and last synced 3mo ago.

Verified
Source
github-topic:mcp-server
Stars
0
Last synced
3mo ago
Install
Check source

Install

Install instructions not detected yet

Check the source repository for the latest setup steps.

View source instructions
18
Tools
0
Resources
0
Prompts
Standard I/O
Transport

Available Tools (18)

Item

Detail

BC_CUSTOM_AUTH_HEADER

unset (skips interactive/device flow when provided)

BC_BASE_URL

`https://mcp.businesscentral.dynamics.com` (v28)

BC_TOKEN_SCOPE

auto-picked from base URL host (v28 → v28 scope, v27 → v27 scope)

BC_TENANT_ID

*required*

BC_SSE_TIMEOUT_SECONDS

`300.0`

Fast

Fast — the catalog is cached

off

Token cache locations (when no custom auth header is supplied): - **Windows**: `%LOCALAPPDATA%\BcMCPProxyPython\bc_mcp_proxy.bin` - **macOS**: `~/Library/Caches/BcMCPProxyPython/bc_mcp_proxy.bin` - **Linux**: `$XDG_CACHE_HOME/BcMCPProxyPython/bc_mcp_proxy.bin` (or `~/.cache/…`) --- ## Troubleshooting - **`HTTP 400`/`404` from `mcp.businesscentral.dynamics.com` (or `Session terminated` at connect).** Sign-in worked; BC is rejecting the request *routing*, not the token. Almost always: a wrong **Environment name** (exact, case-sensitive — typically a `404`), a missing/incorrect **MCP Configuration Name** (required when a named MCP configuration exists — typically a `400`; easy to leave blank in the extension settings since it's not shown in Claude Desktop's args log), a wrong **Company**, or the signed-in account lacking access to that environment. The proxy surfaces this as a single actionable line in the log (echoing your effective Environment/Company/ConfigurationName) and **stays alive** instead of crash-looping with a Python traceback — fix the field and restart. - **`The MCP Configuration named X was not found or not active`.** Open the configuration in BC and verify the **Active** toggle is on. Saving the page does not flip Active automatically. The error also fires when the `ConfigurationName` header value differs from the BC record by even a trailing space. - **Authentication failures.** `AADSTS500113` / `AADSTS50011` (no reply address / redirect URI mismatch) means the **`http://localhost` redirect URI is not registered** under *Authentication → Mobile and desktop applications* — add it (see [Step 1](#step-1--azure-app-registration)). The proxy names this exact fix in its error message and falls back to device-code in `auto` mode. Otherwise verify *"Allow public client flows"* is **Yes**, the `ms-appx-web://Microsoft.AAD.BrokerPlugin/<clientID>` redirect URI is present, all API permissions are granted (and admin-consented where required), and rerun setup if device-code times out. For headless/server hosts where no browser can open, set `--AuthMode device_code` (or `BC_AUTH_MODE=device_code`). - **Calls hang or time out (especially in Dynamic Tool Mode).** The first `bc_actions_search` against a configuration with *Discover Additional Objects* enabled enumerates the entire metadata catalog — measured at 50–60s server-side on a Cronus demo. Raise `BC_HTTP_TIMEOUT_SECONDS` (default 120) if you see `httpx.ReadTimeout` on the first call. Subsequent calls within the same session are typically sub-second. - **JSON-RPC `-32603 "An error occurred."` with no detail.** This is BC's catch-all when something inside a dynamic-tool call goes wrong. The actual reason is logged to Azure Application Insights as event `RT0054` with custom dimension `toolInvocationFailureReason`. Enable telemetry on the BC environment and query (`traces

Platform

Filename pattern

BC_COMPANY

*required*

BC_LOG_LEVEL

`INFO`

BC_CONFIGURATION_NAME

unset

Debug

`--Debug`

Environment

`--Environment`

BC_AUTH_MODE

`auto` (`auto` \

BC_CLIENT_ID

*required*

BC_HTTP_TIMEOUT_SECONDS

`120.0`

Parameter

CLI argument