[BUG] Microsoft Business Central MCP server: all tool invocations fail with Internal_CompanyNotFound since MCP 2026-07-28 stateless spec rollout — header-bound context lost per-request
Preflight Checklist
- [x] I have searched existing issues and this hasn't been reported yet
- [x] This is a single bug report (please file separate reports for different bugs)
- [x] I am using the latest version of Claude Code
What's Wrong?
Microsoft's hosted Business Central MCP server (https://mcp.businesscentral.dynamics.com) stopped resolving its Company HTTP header on ~27 July 2026, coinciding with the MCP 2026-07-28 stateless spec cutover. Every data-returning tool call (bc_actions_invoke) now fails with BC's Internal_CompanyNotFound. Metadata tools (bc_actions_search, bc_actions_describe) still work, so OAuth and environment resolution are fine — only the per-request company context is lost.
The server config is exactly per Microsoft's docs (https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/ai/use-mcp-server-non-microsoft): an HTTP server with static headers carrying TenantId / EnvironmentName / Company / ConfigurationName, plus an oauth block (Entra public client, PKCE). Config is byte-identical to a pre-failure backup; the company name is verified against BC's own companyInformation record.
Under the pre-2026-07-28 protocol, the BC server bound those headers to the session at initialize. The stateless spec removes sessions, so context must be re-established on every request — and evidently isn't. Also filing with Microsoft in parallel; posting here because (a) Claude Code ≤2.1.220 lists no 2026-07-28 spec support in the CHANGELOG, and (b) I need to know whether Claude Code re-sends configured custom headers on every Streamable HTTP POST or only at connection establishment — under a stateless server, initialize-only delivery would produce exactly this failure.
What Should Happen?
bc_actions_invoke should return records, scoped to the company named in the configured Company header — as it did continuously until 27 July 2026 ~09:00 UTC on this exact config, including on Claude Code 2.1.220.
Error Messages/Logs
{ "Error": {
"Code": "Internal_CompanyNotFound",
"Message": "Cannot process the request because the default company cannot be found. You can specify a default company in the service configuration file, or specify one for each tenant, or you can add a query string in the form of \"company=[name]\". ..." } }
Steps to Reproduce
- Configure the BC MCP server in ~/.claude.json (user scope):
"businesscentral": {
"type": "http",
"url": "https://mcp.businesscentral.dynamics.com",
"headers": {
"TenantId": "<tenant-guid>",
"EnvironmentName": "<environment>",
"Company": "<company display name, ASCII>",
"ConfigurationName": "<mcp-config-name>"
},
"oauth": { "clientId": "<entra-app-guid>", "callbackPort": 33418 }
}
- Authenticate via /mcp (Entra OAuth) — succeeds.
- Call bc_actions_search or bc_actions_describe — succeeds (environment-specific action catalogue returned).
- Call bc_actions_invoke with any List action, e.g. List_PostedSalesInvoices_PAG9970 with {"top": 1} — fails with Internal_CompanyNotFound.
Ruled out already:
- ?company=... query string appended to the server URL: re-auth succeeds, gateway strips the query, same error.
- Per-call company parameter: tool schema rejects it ("Unknown property company").
- Base64 header encoding: N/A, value is ASCII.
- Company existence/name: verified against BC's own data and the connection string generated by BC's MCP Server Configurations page.
Claude Model
Not sure / Multiple models
Is this a regression?
Yes, this worked in a previous version
Last Working Version
2.1.220 (worked and then broke on the same version — see regression note; break window 27 July 2026 09:00–16:00 UTC)
Claude Code Version
2.1.220 (also reproduced on 2.1.216 CLI and 2.1.219 desktop agent mode)
Platform
Anthropic API
Operating System
Windows
Terminal/Shell
VS Code integrated terminal
Additional Information
Asks:
- Does Claude Code currently re-send configured custom
headerson every Streamable HTTP POST (tool calls included), or only at connection establishment? This determines whether the fix is client-side or purely Microsoft's. - Timeline for MCP 2026-07-28 spec support (per-request _meta context, Mcp-Method/Mcp-Name headers)?
- This will affect every Claude + Business Central MCP user; if it reproduces on your side against any multi-company BC environment, a heads-up to Microsoft's BC MCP team would help.
Spec references: https://blog.modelcontextprotocol.io/posts/2026-07-28-release-candidate/ (session removal, per-request context), SEP-2243 (HTTP standardization — the same SEP Microsoft's BC docs cite for header encoding).
Showing cached comments. Read the full discussion on GitHub ↗
5 Comments
I have the same issue, were you able to find a resolution?
@pjm3wv — same here, and there's nothing to fix client-side: it's server-side and self-heals on its own after a few hours, with no config or client change.
Signature we see every time: metadata (
bc_actions_search/describe) works, but everybc_actions_invokefailsInternal_CompanyNotFound— includingList_AutomationCompanies, which needs no default company. So the whole invoke layer loses theCompanyheader context per request.It's intermittent — for us: down 27 Jul (~7h), a brief flap 29 Jul, then down again 3 Aug (~5.5h), each recovering with zero changes our end. Config is byte-identical to BC's own connection string. Lines up with the 2026-07-28 stateless cutover. Escalating via our Microsoft/BC partner; no client fix to apply in the meantime.
I am getting this as well now, i have had multiple connections work before and now none of them are working. I have changed nothing on my end.
It started working again for me briefly. But now I am running into intermittent "company not found" errors, and then they self resolve.
Very frustrating.
Kamal Shah www.shahtrading.com<http://www.shahtrading.com/>
T: 514.336.2462 ext 102
Follow us on LinkedIn<https://www.linkedin.com/company/shah-trading-company>, Instagram<http://www.instagram.com/dunyaharvest>, Facebook<http://www.facebook.com/dunyaharvest>, YouTube<https://www.youtube.com/channel/UCI7UemxIQcdbTYKTM2fNbcA>
________________________________
From: Carl Ohlsson @.*>
Sent: Wednesday, August 12, 2026 09:06
To: anthropics/claude-code @.*>
Cc: Kamal Shah @.>; Manual @.>
Subject: Re: [anthropics/claude-code] [BUG] Microsoft Business Central MCP server: all tool invocations fail with Internal_CompanyNotFound since MCP 2026-07-28 stateless spec rollout — header-bound context lost per-request (Issue #81965)
[https://avatars.githubusercontent.com/u/11760980?s=20&v=4]CarlOhlsson left a comment (anthropics/claude-code#81965)<https://github.com/anthropics/claude-code/issues/81965#issuecomment-5267212643>
I am getting this as well now, i have had multiple connections work before and now none of them are working. I have changed nothing on my end.
—
Reply to this email directly, view it on GitHub<https://github.com/anthropics/claude-code/issues/81965?email_source=notifications&email_token=B6IAOPI7DRI5APY7RLAYNNT5JRTWVA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTKMRWG4ZDCMRWGQZ2M4TFMFZW63VGNVQW45LBNSSWK5TFNZ2KYZTPN52GK4S7MNWGSY3L#issuecomment-5267212643>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/B6IAOPJRTOE2FHLEYFUS2KL5JRTWVAVCNFSNUABFKJSXA33TNF2G64TZHM4TGNZSGUZTINZVHNEXG43VMU5TIOJZHA3TONBVGU4KC5QC>.
You are receiving this because you are subscribed to this thread.Message ID: @.***>
We work in muliple environments (one per country) and multiple companies per environment. One company per environment works, multiple doesnt.