npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@dwiesendanger/servicenow-mcp

v1.1.0

Published

MCP server for ServiceNow incident management

Readme

ServiceNow MCP Server

A Model Context Protocol (MCP) server for ServiceNow incident management. It lets AI assistants like Cline create, read, update, and resolve incidents through a standardized tool interface.

Features

  • get_incident — Retrieve incident details by number
  • search_incidents — Search with filters (state, priority, assignment group, assigned user)
  • create_incident — Create new incidents
  • update_incident — Update fields on existing incidents
  • add_comment — Add work notes or customer-visible comments
  • resolve_incident — Resolve incidents with resolution notes and codes

Security & Safety

  • PII redaction enabled by default — emails, phone numbers, IPs, and SSNs are masked before reaching the LLM
  • Read-only mode via SERVICENOW_ALLOW_WRITE=false — disables all write operations
  • Input validation on all ticket numbers and required fields

Prerequisites

  • Node.js ≥ 18
  • A ServiceNow instance with REST API access (a free developer instance works)
  • Basic-auth credentials for the ServiceNow API

Quick Start

Install from npm

npx @dwiesendanger/servicenow-mcp

Or clone & build from source

git clone https://github.com/dwiesendanger/servicenow-mcp.git
cd servicenow-mcp
npm install
npm run build

Configuration

Environment Variables

Copy .env.example to .env and fill in your values:

cp .env.example .env

| Variable | Required | Default | Description | |---|---|---|---| | SERVICENOW_INSTANCE_URL | ✅ | — | Your instance URL, e.g. https://dev12345.service-now.com | | SERVICENOW_USERNAME | ✅ | — | ServiceNow user name | | SERVICENOW_PASSWORD | ✅ | — | ServiceNow password | | SERVICENOW_ALLOW_WRITE | — | true | Set to false to disable write operations | | SERVICENOW_DISABLE_REDACTION | — | false | Set to true to disable PII redaction |

⚠️ Never put credentials in MCP config files. Always use .env or OS-level environment variables. See SECURITY.md for details.

Cline / VS Code Setup

Create a .env file in the project directory (see Configuration → Environment Variables above), then add the server to your MCP settings file (cline_mcp_settings.json).

Using npx (recommended):

{
  "mcpServers": {
    "servicenow": {
      "command": "npx",
      "args": ["-y", "@dwiesendanger/servicenow-mcp"]
    }
  }
}

Or if you built from source:

{
  "mcpServers": {
    "servicenow": {
      "command": "node",
      "args": ["/absolute/path/to/servicenow-mcp/dist/index.js"]
    }
  }
}

Note: The server uses dotenv to load .env from its working directory. If your .env file is in a different location, you can set the variables as OS-level environment variables or pass the cwd option in your MCP config.

Claude Desktop Setup

Add to your claude_desktop_config.json:

{
  "mcpServers": {
    "servicenow": {
      "command": "npx",
      "args": ["-y", "@dwiesendanger/servicenow-mcp"]
    }
  }
}

Development

npm run dev          # Run with tsx (hot-reload)
npm test             # Run tests (vitest)
npm run test:watch   # Watch mode
npm run build        # Compile TypeScript → dist/

Project Structure

src/
├── index.ts               # Entry point, tool registration, MCP server setup
├── servicenow-client.ts   # Axios-based ServiceNow REST API client
├── redaction.ts            # PII redaction utilities
├── validation.ts           # Input validation helpers
├── types.ts                # Shared TypeScript types
├── tools/
│   ├── get-incident.ts     # get_incident handler
│   ├── search-incidents.ts # search_incidents handler
│   ├── create-incident.ts  # create_incident handler
│   ├── update-incident.ts  # update_incident handler
│   ├── add-comment.ts      # add_comment handler
│   └── resolve-incident.ts # resolve_incident handler
└── __tests__/
    ├── validation.test.ts  # Validation unit tests
    └── redaction.test.ts   # Redaction unit tests

Contributing

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/my-feature)
  3. Make your changes with tests
  4. Run npm test to ensure tests pass
  5. Commit and push
  6. Open a Pull Request

License

MIT