I keep getting this issue trying to connect claude mcp to servicem8
SDK auth failed: Protected resource https://api.servicem8.com/ does not match expected https://go.servicem8.com/mcp (or origin)
I keep getting this issue trying to connect claude mcp to servicem8
SDK auth failed: Protected resource https://api.servicem8.com/ does not match expected https://go.servicem8.com/mcp (or origin)
Hi Michael,
For ServiceM8 MCP, the MCP Server URL needs to be https://go.servicem8.com/mcp.
In your Claude Code MCP setup, set the MCP Server URL to https://go.servicem8.com/mcp and set Authentication to OAuth, then reconnect.
When it’s configured correctly, you’ll see a green ServiceM8 authentication screen where you can grant access to your ServiceM8 account data.
If it’s still failing after that, use the Help menu in the Online Dashboard to contact Support via chat or email and include the full error text and a screenshot of your MCP settings.
Thanks,
Cody
Hey Cody, I have tried this a number of times and Claude seems to struggle and throws an error. Also in Claude you can’t set a “Authentication” instead it asks for Auth Client ID and Client Secret (see screenshots). I can use a connection through Composio, however the depth of access is not enough for my intended use. I have also made full access API key in servicem8 and used Claude to try and build its own MCP, getting stuck on this also (I’m not very experienced, so probably not the right way about it anyway) - I’ve no joke spent over 2 full days on this.
Hi Caitlin,
For ServiceM8’s hosted MCP connection, the MCP Server URL needs to be https://go.servicem8.com/mcp (this is what our MCP setup guide uses).
If Claude Code is asking for “Auth Client ID” and “Client Secret”, that’s an OAuth 2.0-style setup. In ServiceM8 terms, client_id = your App ID and client_secret = your App Secret.
A couple of key details that usually help with tools that want the OAuth fields explicitly:
Also, if you do end up creating a Public Application to get an App ID/App Secret, make sure the App Secret stays private (it functions like a password).
Separately, if you’re building a direct integration against the REST API (not using the hosted MCP server), ServiceM8 supports API key auth by sending the key in the X-API-Key header when calling endpoints on https://api.servicem8.com/api_1.0/.
If Claude continues to error after matching the MCP Server URL and the OAuth endpoints above, the best next step is to contact Support via the Help menu in the Online Dashboard (chat or email) and include the full error text plus a screenshot of the Claude MCP settings with any secrets removed.
Thanks,
Cody
Hi Cody,
Quick summary up front: the hosted MCP connection works perfectly in the Claude desktop/web app, but it FAILS in Claude Code (the version that runs inside VS Code). Same ServiceM8 account, same MCP URL, two different results. In Claude Code, the login step consistently fails with this error: “Protected resource https://api.servicem8.com/ does not match expected https://go.servicem8.com/mcp” I looked into it and the cause is a mismatch in your OAuth metadata. Your protected-resource document at https://go.servicem8.com/.well-known/oauth-protected-resource returns: “resource”: “https://api.servicem8.com/” but the MCP endpoint being connected is on a different host: https://go.servicem8.com/mcp
Claude Code (and any MCP client that strictly follows RFC 8707 / the MCP authorization spec) checks that the protected-resource “resource” value matches the MCP server’s own URL/origin. Because “resource” points at api.servicem8.com while the MCP server is on go.servicem8.com, the check fails and login cannot complete. The Claude desktop/web app is more lenient about this, which is exactly why it connects there but not in Claude Code.
Could you please either: (a) set “resource” in the protected-resource metadata to the MCP endpoint’s own URL (https://go.servicem8.com/mcp), or its origin (https://go.servicem8.com/), or (b) serve the MCP endpoint from the same host as the declared resource, so the resource indicator matches the MCP server URL?
Everything else (dynamic client registration, PKCE) works correctly. It is purely the resource-host mismatch blocking strict clients like Claude Code in VS Code.
Thanks!
Hi Michael,
For Claude Code specifically, please use this MCP Server URL:
Claude Code validates the OAuth protected resource differently to some other MCP clients, and this URL matches what Claude Code expects during the OAuth setup.
You can add it from Claude Code with:
claude mcp add --transport http servicem8 https://api.servicem8.com/mcp
Thanks for flagging this. We’ll update our guidance so the Claude Code setup is clearer.