- Home
- MCP servers
- ServiceNow
ServiceNow
- python
2
GitHub Stars
python
Language
6 months ago
First Indexed
2 months ago
Catalog Refreshed
Documentation & install
Readme and setup notes from the catalogue, plus a client-ready config you can copy for your MCP host.
Installation
Add the following to your MCP client configuration file.
Configuration
View docs{
"mcpServers": {
"lokimcpuniverse-servicenow-mcp-server": {
"command": "servicenow-mcp",
"args": [],
"env": {
"SERVICENOW_INSTANCE": "your-instance.service-now.com",
"SERVICENOW_PASSWORD": "your-password",
"SERVICENOW_USERNAME": "your-username"
}
}
}
}You can connect ServiceNow data and operations to MCP clients through a dedicated MCP server. This server provides a standardized interface for essential ServiceNow modules such as incidents, changes, CMDB, catalogs, and more, enabling AI assistants and automation tools to perform actions against your ServiceNow instance in a safe, structured way.
How to use
You will run the MCP server locally or in your environment and connect your MCP clients to it. Start the server, then configure your clients to point at the local or remote server. Use the available tools to create, query, and manage ServiceNow data. Your client can perform common operations like creating incidents, querying CMDB items, or listing catalog items through the MCP interface. Ensure your ServiceNow credentials have the necessary permissions and that the server is reachable from your client network.
How to install
Prerequisites you need before installing include Python 3.9 or higher and a ServiceNow instance with API access. You also need a ServiceNow user with appropriate permissions.
Install from source by following these steps on your machine.
# Clone the repository
git clone https://github.com/asklokesh/servicenow-mcp-server.git
cd servicenow-mcp-server
# Create a virtual environment
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# Install the package in editable mode
pip install -e .
Configuration and starting the server
Quick start to configure and run the server uses environment variables. Create a local copy of the example environment file and set your credentials.
# Copy the example environment file
cp .env.example .env
# Edit .env with your ServiceNow credentials
# (values shown are placeholders)
SERVICENOW_INSTANCE=your-instance.service-now.com
SERVICENOW_USERNAME=your-username
SERVICENOW_PASSWORD=your-password
Run the server
After configuring credentials, you start the MCP server with a simple command.
servicenow-mcp
Advanced configuration
You can customize the server with environment-based settings and JSON configuration files. The precedence for configuration is environment variables first, followed by local overrides, then base defaults.
{
"servicenow": {
"instance": "your-instance.service-now.com",
"username": "your-username",
"password": "your-password",
"api_version": "v2",
"timeout": 30,
"max_retries": 3
},
"features": {
"incident_management": true,
"change_management": true,
"problem_management": true,
"service_catalog": true,
"knowledge_base": true,
"user_management": true,
"cmdb": true,
"custom_tables": true
},
"logging": {
"level": "INFO",
"format": "json",
"file": "logs/servicenow-mcp.log"
}
}
Integration with MCP clients
Configure your MCP client to connect to the server. Use the client’s MCP configuration to specify the server, and provide the necessary credentials through environment variables.
Security considerations
Keep credentials out of version control. Use environment variables or a secret management solution. Apply least-privilege access for ServiceNow users and enable audit logging in production.
Development
Set up a development environment to run tests and linters, and verify types and style. Install development dependencies, run tests, lint, and type checks.
Available tools
query_table
Query any ServiceNow table with filters and return matching records.
get_record
Retrieve a single record by its sys_id from a ServiceNow table.
create_record
Create new records in a ServiceNow table with provided fields.
update_record
Update existing records by sys_id with new field values.
delete_record
Delete a record by sys_id from a ServiceNow table.
incident_create
Create a new incident in ServiceNow with given details.
incident_update
Update an existing incident, including state, notes, and resolution.
incident_search
Search incidents using multiple filters and criteria.
change_create
Create change requests in ServiceNow.
change_search
Search change requests with various filters.
ci_search
Search configuration items (CMDB) by criteria.
ci_relationships
Retrieve relationships between configuration items.
user_search
Search users in ServiceNow by different fields.
kb_search
Search knowledge articles in the knowledge base.
catalog_items
List catalog items available in the Service Catalog.
get_stats
Get aggregate statistics from a specified ServiceNow table.