Not able to fetch tools of custom MCP Sever on AWS

vipulvyas
Giga Contributor

I have created one custom MCP Server on AWS using AWS Lambda and API Gateway services.
There are 2 APIs currently:
1. One GET API which will list the tools present in the server.

2. Second is POST API which is the tool for resetting the password.

Both the endpoints are authenticated using API Key and are working fine in Postman. But when configuring it with Service Now MCP then it is showing that it is unable to fetch the tools.

 

Can you provide the steps to resolve this?

 

 image.png

 

1 REPLY 1

JaishreeR
Giga Guru

Hello @vipulvyas  It’s great to see you exploring MCP with AWS. Since your APIs are working in Postman but failing in ServiceNow, we need to narrow down exactly where the 'handshake' is breaking.

To help you resolve this, could you please check and answer the following?

  1. Response Schema Check: In Postman, does your GET response body start exactly with the "tools": key? ServiceNow requires the official MCP JSON structure. Could you share a sample of the JSON structure you see in Postman?

  2. Authentication Mapping: In your ServiceNow Connection/Credential record, how is the API Key configured? Is it being sent as a header named exactly x-api-key? (ServiceNow sometimes defaults to different header names).

  3. Lambda Proxy Handling: Are you using 'Lambda Proxy Integration' in API Gateway? If so, is your Lambda returning the tool list as a string inside a body object, or as raw JSON?

  4. CORS Configuration: Have you enabled CORS (Cross-Origin Resource Sharing) on your API Gateway for the GET method? Browsers and cloud platforms like ServiceNow often block requests if the Access-Control-Allow-Origin and x-api-key headers aren't explicitly permitted.

Once you provide these details, we can pinpoint exactly why ServiceNow is unable to fetch the tools.

 

Thanks 

Jaishree R