logo

NJP

MCP Connection with OAuth

New article articles in ServiceNow Community · Feb 16, 2026 · article

I have defined an MCP Server connection to an MCP Server which I control.

 

This works fine (after some hiccups, had to deal with this: https://support.servicenow.com/kb?id=kb_article_view&sys_kb_id=f2b77e69935efe188960fb2d6cba10be) when authentication is set to API key.

But when authentication is set to OAuth 2.1, the request to establish the connection is rejected with a 401 error, because it does not include the Authentication Bearer <token> Header. I have obtained an OAuth token from the connection which is used by my MCP Server definition, so I'm not sure what's going on.

 

I do see these errors in the system log

 

*** Script: sn_mcp_client.McpServerDao: Data not found in: sn_mcp_server

*** Script: sn_mcp_client.McpClientServerSessionMappingDao: Data not found in: sn_mcp_client_server_session_mapping

*** Script: sn_mcp_client.MCPConnectionManager: Error sending initialization request: Failed to execute Flow Action {0}, Error: {1}

But the MCP Server connection I am using IS defined in sn_mcp_server, with correct links to all the OAuth authentication records. 

 

Any help much appreciated

Thanks  

View original source

https://www.servicenow.com/community/now-assist-for-creator-forum/mcp-connection-with-oauth/m-p/3489993#M1459