The Zurich release has arrived! Interested in new features and functionalities? Click here for more

VaranAwesomenow
Mega Sage

How to create your own ServiceNow MCP Server

Code: anilvaranasi/ServiceNowMCPServer

In order to implement Agentic AI one of the first steps it to be able to build AI agents that can interact with ServiceNow. One of the easiest ways to interact with ServiceNow is via REST APIs. This blog covers steps on how to build an MCP server that helps in interacting with ServiceNow via REST APIs and consuming the MCP Server via Claude desktop MCP client.

This requires basic knowledge of python and understanding of MCP (Model Context Protocol). To get required basic understanding please refer to : Introduction - Model Context Protocol

 

References

Example Servers - Model Context Protocol

echelon-ai-labs/servicenow-mcp: MCP Server for ServiceNow

michaelbuckner/NOW-Utils

How to Build Your Own MCP Server

modelcontextprotocol/inspector: Visual testing tool for MCP servers

The Essential Guide to HTTP Request Parameters in REST API

QuickStart - HTTPX

Install Claude desktop

To install Claude desktop follow the steps provided here : For Claude Desktop Users - Model Context Protocol

Once its successfully installed launch the desktop client which should look like below.

VaranAwesomenow_0-1750748873388.png

 

Create your own ServiceNow MCP Server

Python code for creating MCP server is available here: ServiceNowMCPServer/mcpnow1.py at master · anilvaranasi/ServiceNowMCPServer

Download the python code locally and update your instance url and credentials in the file mcpnow1.py

VaranAwesomenow_9-1750749289673.png

Search for claude_desktop_config.json file and update MCP server details of mcpnow1.py, sample config.json would look like below.

VaranAwesomenow_10-1750749544964.png

You can also open config via Claude desktop client Developer menu options -> Open App configuration file

VaranAwesomenow_11-1750749639000.png

Once the file is updated restart Claude desktop client from desktop icons

 

VaranAwesomenow_13-1750749736916.png

VaranAwesomenow_14-1750749752955.png

 

Once you reload the client you should see MCP server 

 

VaranAwesomenow_16-1750749855819.png

 

Testing authentication

Prompt: Test function to verify nowauth is running with authentication.

Endpoint: GET https://dev251734.service-now.com/api/x_146833_awesomevi/test

VaranAwesomenow_1-1750748873390.png

Once tool is available test below example prompts.

Testing with an input parameter

Endpoint: GET https://dev251734.service-now.com/api/x_146833_awesomevi/test/{table_name}

Prompt: Get ServiceNow table description for a given table.

VaranAwesomenow_2-1750748873394.png

 

VaranAwesomenow_3-1750748873398.png

 

Testing with OOB APIs

Get short description for a given incident

Endpoint: GET https://dev251734.service-now.com/api/now/table/incident?sysparm_fields=short_description&sysparm_query=number={inputincident}

Prompt: Get short_description for a given incident based on input incident number INC0008001

 

VaranAwesomenow_4-1750748873401.png

 

 

Similar incidents for a given incident

When incident number INC0000019 is provided as input it found INC0000015 which contains key words Cant and Launch from original incident Can't launch 64-bit Windows 7 virtual machine

VaranAwesomenow_5-1750748873411.png

 

VaranAwesomenow_6-1750748873413.png

 

VaranAwesomenow_7-1750748873416.png

 

VaranAwesomenow_8-1750748873418.png

VaranAwesomenow_1-1750750554052.png

Another example

VaranAwesomenow_0-1750770960347.png

 

This is just an initial attempt to PoC MCP server setup there is lot of potential to build complex usecases which can be leveraged in implementing Agentic AI. I hope you will look forward for future posts on this topic.

 

Comments
Karthick Nagara
Tera Expert

Thanks for sharing this!
Do we have MCP to be used with Cursor.

AJugovic
Tera Expert

Thanks for sharing!! Any options like this with copilot ?

VaranAwesomenow
Mega Sage

@Karthick Nagara same setup should work for cursor as well, once we update the .json file that stores mcp server configuration it should let you interact with mcp server. I will try to check how to do it on cursor when I get a chance.

VaranAwesomenow
Mega Sage

@AJugovic I will check and let you know. Thanks

sandeepkhat
Mega Explorer

What's your MCP config? Did you use basic auth or token?

John Morales
Kilo Contributor

Are there any plans for ServiceNow Product Management / Product Engineering to actually developed a ServiceNow MCP Server and offer to their customers?

Version history
Last update:
‎06-24-2025 06:16 AM
Updated by:
Contributors