Hi all,
Have been playing with the Business Central MCP over the past couple weeks and have faced the same intermittent issue and wondering if anyone else has ran into it and determined a root cause / solution.
The actions of search and describe work 100% of the time as I dont believe the company header is required. When it comes to invoke an action, sometimes I am returned with:
"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]". You can see the available companies by accessing the default OData web service, Company. For more information, see "OData Web Services" in Help."
This is the same error payload you are returned if you try to hit a Business Central api endpoint without specifying a company, for ex: https://api.businesscentral.dynamics.com/v2.0/<tenant-id>/<environment>/api/v2.0/items
I've confirmed that I am sending the Company within the headers in the request to the BC MCP. Also as a confirmation, sometimes the invoke action works, then without changing any configuration making the exact same call fails.
Any thoughts would be appreciated!
Donovan