Commit 4a3a6e4
committed
Fix BC MCP proxy to target current MCP server endpoint
Microsoft moved the Business Central MCP server from
api.businesscentral.dynamics.com/v2.0/<env>/mcp to a dedicated host at
mcp.businesscentral.dynamics.com, with environment routing via HTTP
headers (TenantId, EnvironmentName, Company). The previous proxy URL
returns 400 Bad Request after a successful sign-in, even when the Azure
app registration is correctly configured.
Update both the Python (bc-mcp-proxy) and .NET (BcMCPProxy) samples:
- Default Url/BaseUrl -> https://mcp.businesscentral.dynamics.com
- Default scope -> https://mcp.businesscentral.dynamics.com/.default
- Drop the /v2.0/<env>/mcp path suffix from the request URL
- Send TenantId and EnvironmentName headers in addition to Company
Verified end-to-end against a sandbox environment: the proxy completes
the MCP initialize handshake, lists tools, and successfully invokes
List_Customers / List_Items via bc_actions_invoke.1 parent c0783dd commit 4a3a6e4
5 files changed
Lines changed: 15 additions & 10 deletions
File tree
- samples
- BcMCPProxyPython
- bc_mcp_proxy
- BcMCPProxy
- Models
- Runtime
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
16 | 16 | | |
17 | 17 | | |
18 | 18 | | |
19 | | - | |
| 19 | + | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
46 | | - | |
| 46 | + | |
47 | 47 | | |
48 | 48 | | |
49 | 49 | | |
50 | | - | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
51 | 53 | | |
52 | 54 | | |
53 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
| 97 | + | |
| 98 | + | |
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
| 17 | + | |
| 18 | + | |
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
94 | 98 | | |
95 | 99 | | |
96 | 100 | | |
| |||
99 | 103 | | |
100 | 104 | | |
101 | 105 | | |
102 | | - | |
103 | | - | |
| 106 | + | |
104 | 107 | | |
105 | 108 | | |
106 | 109 | | |
| |||
0 commit comments