Linnworks accounts are served from regional API hosts, and an integration finds out which one to use when it authorises. The AuthorizeByApplication call returns a session token and a Server field, and every later API call goes to that Server address. An MCP server for Linnworks should therefore never hard-code a host: it should use whatever Server value Linnworks returns, every time it opens a session.
This matters most if you run or modify the self-hosted Linnworks MCP source. If you use the Hosted MCP Server for Linnworks, the server already handles it for you.
How does Linnworks tell an app which region to use?
Linnworks' system integration setup guide describes the flow. An app calls AuthorizeByApplication with its application ID, its application secret and the token it received when the merchant installed it. The response includes a session token and a Server field, and the guide says the Server value is the base URL for subsequent requests. Its own example is a call to https://eu-ext.linnworks.net/api/Orders/CreateOrders.
So there are two hosts in play:
- The authorisation endpoint, https://api.linnworks.net/api/Auth/AuthorizeByApplication, which every app calls to open a session.
- The regional server, returned in that response, which every other call goes to.
The guide also says the session token has a limited lifetime, and that the app re-authorises with the same permanent token when it expires. Each re-authorisation returns the Server again, which is another reason to read it every time rather than store it once and assume it never changes.
What goes wrong if you hard-code the host?
An integration built and tested against one account will often work perfectly for that account and then fail for a merchant whose account lives in another region. The failure can look like an authentication problem, because the session token is presented to a server that doesn't recognise it. Developers then chase the token, the application secret or the permissions, when the real cause is the address.
Two rules avoid it:
- Build every request URL from the Server value of the current session, as in Server + /api/Orders/GetOpenOrders.
- Store the Server alongside the session, so a cached session and its host can never get out of step.
How does the hosted MCP server handle regions?
The hosted server is multi-tenant, so merchants on different regions use the same service. Here is what its code does:
- At connect time, when Linnworks sends the install token, the server calls AuthorizeByApplication straight away to prove the token works. It saves the regional server address from that response on your account record, together with the time you connected.
- For each tool call, it uses a cached session that holds both the session token and the Server it came with. The cache lasts 25 minutes, and when it runs out the server authorises again and gets a fresh token and Server.
- If Linnworks answers 401, the server throws the cached session away, authorises again and retries the call once.
- Sessions are per account. Each merchant's session is cached under their own account, so one merchant's regional server and token are never used for another.
Every request still follows the Linnworks API's other habits: calls are POSTs with form-encoded bodies (a few newer endpoints are GET or JSON), and the session token goes in the Authorization header with no "Bearer" prefix. Those details are handled inside the server, so the assistant only sees tools such as "search open orders" or "get stock levels".
What must self-hosters keep in place?
The self-hosted source follows the same pattern. It authorises with your application's credentials and install token, reads the Server from the response, caches the session with its server for 30 minutes, and refreshes on a 401. If you change the code:
- Don't replace the session's server with a fixed host to "simplify" things.
- If you add caching elsewhere, cache the server with the token.
- Keep Linnworks' authorisation error bodies out of logs and chat replies. The hosted server deliberately leaves them out of its errors, because they can contain the token that was sent.
- If you add new tools, build their URLs the same way as the existing ones.
Whether to self-host at all is covered in Linnworks MCP server: hosted or self-hosted?
Does region affect what the assistant can see?
No. The region decides which host the API calls go to, not which tools exist. The hosted Starter plan offers the same 11 read tools whichever region your account is in; what an MCP server can and can't see in Linnworks lists them. What the region doesn't change, either, is where your assistant's provider processes the results: that is set by your assistant and its terms.
For the security questions to ask about any MCP server, region aside, see MCP server security best practices.
MCP-G is part of Green and Home Limited and is not affiliated with, endorsed by or sponsored by Linnworks or Anthropic.
Rather not think about regions at all? The Hosted MCP Server for Linnworks handles them for you. Start a 14-day free trial, or see the self-hosted source if you want to run it yourself.