We're reclaiming inactive PDIs to keep them available for active builders. Learn what's changing, who's affected, and how to protect your work. Read More

MCP server - Cannot expose the REST API to the tool

Nahn
Tera Contributor

Hi experts,

I'm trying to improve my knowledge of AI, and in the process, I'm having trouble using the REST API as a tool on an MCP server.

Specifically, when I use Postman to call the tool in MCP, the parameter values ​​I pass in the payload are not read by ServiceNow through request.body.data. Even when I set static values ​​for them, the system still can't read them.

nhuynh28_0-1784544124351.png

The only value I received was the value of the table.

nhuynh28_1-1784544207324.png

 

I would be very grateful to receive advice and assistance from experts.

Thank you so much!


1 REPLY 1

rpriyadarshy
Kilo Sage

 

 

Please also POST any error you are getting.

 

(1) Add these --To inspect what an MCP client is actually sending to ServiceNow, add temporary logging in the Scripted REST API or tool endpoint that backs your MCP tool.

(2) Check sn_mcp_execution_logs  for any other details.

(3) Navigate to System Logs → All    Filter on the text "MCP REQUEST".

(4) Check MCP CLient is able to establish session with Server - sn_mcp_client_server_session_mapping

 

Please post some additional Data / Logs to take It Further.

 

See if this Article helps you -  https://www.servicenow.com/community/developer-articles/how-to-create-your-own-servicenow-mcp-server...

 

Regards

RP