Labsco
shameerampcome logo

ServiceNow

from shameerampcome

An MCP server for interacting with ServiceNow instances to manage records, incidents, and other platform features.

๐Ÿ”ฅ๐Ÿ”ฅ๐Ÿ”ฅโœ“ VerifiedAccount requiredNeeds API keys

ServiceNow MCP Server

A Model Completion Protocol (MCP) server implementation for ServiceNow, allowing Claude to interact with ServiceNow instances.

ServiceNow Server MCP server

Overview

This project implements an MCP server that enables Claude to connect to ServiceNow instances, retrieve data, and perform actions through the ServiceNow API. It serves as a bridge between Claude and ServiceNow, allowing for seamless integration.

Features

  • Connect to ServiceNow instances using various authentication methods (Basic, OAuth, API Key)
  • Query ServiceNow records and tables
  • Create, update, and delete ServiceNow records
  • Execute ServiceNow scripts and workflows
  • Access and query the ServiceNow Service Catalog
  • Analyze and optimize the ServiceNow Service Catalog
  • Debug mode for troubleshooting
  • Support for both stdio and Server-Sent Events (SSE) communication

Authentication Methods

Basic Authentication

SERVICENOW_AUTH_TYPE=basic
SERVICENOW_USERNAME=your-username
SERVICENOW_PASSWORD=your-password

OAuth Authentication

SERVICENOW_AUTH_TYPE=oauth
SERVICENOW_CLIENT_ID=your-client-id
SERVICENOW_CLIENT_SECRET=your-client-secret
SERVICENOW_TOKEN_URL=https://your-instance.service-now.com/oauth_token.do

API Key Authentication

SERVICENOW_AUTH_TYPE=api_key
SERVICENOW_API_KEY=your-api-key

Development

Documentation

Additional documentation is available in the docs directory:

Troubleshooting

Common Errors with Change Management Tools

  1. Error: argument after ** must be a mapping, not CreateChangeRequestParams

    • This error occurs when you pass a CreateChangeRequestParams object instead of a dictionary to the create_change_request function.
    • Solution: Make sure you're passing a dictionary with the parameters, not a Pydantic model object.
    • Note: The change management tools have been updated to handle this error automatically. The functions will now attempt to unwrap parameters if they're incorrectly wrapped or passed as a Pydantic model object.
  2. Error: Missing required parameter 'type'

    • This error occurs when you don't provide all required parameters for creating a change request.
    • Solution: Make sure to include all required parameters. For create_change_request, both short_description and type are required.
  3. Error: Invalid value for parameter 'type'

    • This error occurs when you provide an invalid value for the type parameter.
    • Solution: Use one of the valid values: "normal", "standard", or "emergency".
  4. Error: Cannot find get_headers method in either auth_manager or server_config

    • This error occurs when the parameters are passed in the wrong order or when using objects that don't have the required methods.
    • Solution: Make sure you're passing the auth_manager and server_config parameters in the correct order. The functions have been updated to handle parameter swapping automatically.

Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add some amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details.