A powerful tool to generate and load realistic dummy data into ServiceNow instances for testing, sampling, and development purposes.
The Model Context Protocol (MCP) provides the bridge between Claude Code and your ServiceNow instance. Without proper MCP configuration, this tool cannot create records in ServiceNow. See the Installation section for complete setup instructions.
- Generate realistic dummy records for multiple ServiceNow tables:
- Incidents
- Changes
- Problems
- Major Incidents
- Stories
- Interactive CLI interface for easy configuration
- Batch record generation for load testing
- Connects via Model Context Protocol (MCP) for secure ServiceNow integration
- Configurable data patterns and distributions
Before using this tool, you MUST have the following:
- Download and install from https://claude.com/claude-code
- This tool only works within Claude Code - it cannot function standalone
- What is it? The Model Context Protocol (MCP) server is a bridge between Claude Code and ServiceNow
- Which one to use? We use a centralized ServiceNow MCP server from the servicenow-mcp-doc repository
⚠️ Important: This is NOT an npm package - it's a custom-built MCP server that you clone from GitHub- Repository:
https://github.com/Kromula/servicenow-mcp-doc - This is a centralized MCP server used across all ServiceNow projects (not project-specific)
- Installation: You clone the repository once and point Claude Code to the local MCP server file (see Installation section below)
- Where it runs: The MCP server runs in the background as a Node.js process when Claude Code starts
- Required for the MCP server to run
- Download from https://nodejs.org/
- Verify:
node --versionshould show v18+
- A test/dev ServiceNow instance (never use production!)
- Service account credentials with appropriate permissions (see below)
This tool should ONLY be used with TEST or DEVELOPMENT ServiceNow instances. It generates dummy data for:
- Testing and development purposes
- Volume-based load testing
- Sampling and demo environments
- Training and proof-of-concept scenarios
DO NOT use this tool on production instances or instances containing real business data.
A dedicated service account must be created in your ServiceNow instance specifically for this tool:
- Dedicated Account: Create a separate account used only for data generation (e.g.,
svc_dataloader,claude_code_svc) - No MFA: Multi-factor authentication must be disabled for this service account to allow automated access
- Required Roles: The account must have appropriate roles to create records in target tables:
itil- For incident, problem, and change management recordssn_request_write- For service catalog and request items (if needed)sn_story_admin- For story records (if using Agile Development)- Or custom roles with
createaccess to your target tables
- Use a strong, unique password stored securely
- Document the account purpose and usage in your ServiceNow instance
- Regularly review the account's activity logs
- Disable or remove the account when not actively using the tool
- Restrict account permissions to only the tables and operations needed
Username: svc_claude_dataloader
Full Name: Claude Data Loader Service Account
Email: noreply-dataloader@yourcompany.com
Roles: itil, sn_story_admin
Active: true
MFA: false (disabled)
Note: Your ServiceNow administrator should create this service account following your organization's service account policies.
Download and install Claude Code from https://claude.com/claude-code
This is the most important step! Without this, the tool cannot connect to ServiceNow.
The MCP server is NOT included in this repository - it's a custom server that must be cloned from GitHub and configured in Claude Code settings.
Important: This is a centralized MCP server that you clone once and use across all ServiceNow projects. You only need to do this once per machine.
# Clone to a central location (recommended: alongside your project directories)
# Example: If your projects are in ~/Projects or E:\Claude Dev, clone it there
git clone https://github.com/Kromula/servicenow-mcp-doc.git
# Install dependencies
cd servicenow-mcp-doc
npm installRecommended locations:
- Mac/Linux:
~/servicenow-mcp-doc/or~/Projects/servicenow-mcp-doc/ - Windows:
E:\Claude Dev\servicenow-mcp-doc\orC:\Dev\servicenow-mcp-doc\
This will create the MCP server at:
- Mac/Linux:
~/servicenow-mcp-doc/server.js - Windows:
E:\Claude Dev\servicenow-mcp-doc\server.js
Option 1: Claude Code CLI (Recommended)
Create or edit ~/.claude.json (note: it's in your home directory, NOT .config/claude-code/):
{
"mcpServers": {
"servicenow": {
"type": "stdio",
"command": "node",
"args": ["/full/path/to/servicenow-mcp-doc/server.js"],
"env": {
"SERVICENOW_INSTANCE": "https://your-instance.service-now.com/",
"SERVICENOW_USERNAME": "your-username",
"SERVICENOW_PASSWORD": "your-password"
}
}
}
}Option 2: Claude Desktop App
Edit the config file:
- Mac:
~/Library/Application Support/Claude/claude_desktop_config.json - Windows:
%APPDATA%\Claude\claude_desktop_config.json
{
"mcpServers": {
"servicenow": {
"command": "node",
"args": ["/full/path/to/servicenow-mcp-doc/server.js"],
"env": {
"SERVICENOW_INSTANCE": "https://your-instance.service-now.com/",
"SERVICENOW_USERNAME": "your-username",
"SERVICENOW_PASSWORD": "your-password"
}
}
}
}- Path: Use the FULL absolute path to the centralized MCP server
server.jsfile- Mac example:
/Users/yourusername/servicenow-mcp-doc/server.js - Windows example:
E:\\Claude Dev\\servicenow-mcp-doc\\server.js
- Mac example:
- Instance format: Use full URL:
https://your-instance.service-now.com/(includehttps://and trailing/) - Credentials: Use your ServiceNow service account (see Service Account Configuration section)
- Security: This file contains credentials - ensure proper file permissions and never commit it to git
- Centralized: This same MCP server configuration works for all ServiceNow projects - you don't need different MCP servers per project
{
"mcpServers": {
"servicenow": {
"type": "stdio",
"command": "node",
"args": ["/Users/dan/servicenow-mcp-doc/server.js"],
"env": {
"SERVICENOW_INSTANCE": "https://dev12345.service-now.com/",
"SERVICENOW_USERNAME": "svc_dataloader",
"SERVICENOW_PASSWORD": "YourSecurePassword123!"
}
}
}
}{
"mcpServers": {
"servicenow": {
"type": "stdio",
"command": "node",
"args": ["E:\\Claude Dev\\servicenow-mcp-doc\\server.js"],
"env": {
"SERVICENOW_INSTANCE": "https://dev12345.service-now.com/",
"SERVICENOW_USERNAME": "svc_dataloader",
"SERVICENOW_PASSWORD": "YourSecurePassword123!"
}
}
}
}The MCP server runs via Node.js, so verify it's installed:
node --version # Should show v18 or higherIf Node.js is not installed, download it from https://nodejs.org/
After creating/editing the settings file, completely restart Claude Code for the MCP server to load.
git clone https://github.com/Kromula/servicenow-data-loader.git
cd servicenow-data-loader
npm installOpen the project directory in Claude Code and you're ready to go!
If you see errors like "cannot find MCP tools" or "ServiceNow MCP server not available":
Check the file location:
# Mac/Linux
cat ~/.config/claude-code/settings.json
# Windows
type %USERPROFILE%\.config\claude-code\settings.jsonIf the file doesn't exist, create it using the configuration from Step 2 above.
The JSON must be valid. Common issues:
- Missing commas between properties
- Incorrect quotes (must be double quotes
", not single quotes') - Trailing commas (not allowed in JSON)
Use a JSON validator like jsonlint.com to check your config.
Ensure the path to the centralized MCP server file is correct and absolute:
Check:
- ✅ Full absolute path (not relative)
- ✅ Points to
servicenow-mcp-doc/server.js - ✅ Path exists (test with
lson Mac/Linux ordiron Windows) - ✅ File has execute permissions
Test the path:
# Mac/Linux
ls -la ~/servicenow-mcp-doc/server.js
# Windows
dir E:\Claude Dev\servicenow-mcp-doc\server.jsAfter editing the settings file:
- Fully quit Claude Code (not just close the window)
- Relaunch Claude Code
- Open your project again
The MCP server runs via Node.js:
# Check Node.js
node --version # Should show v18+
# Test the MCP server manually
cd ~/servicenow-mcp-doc # Mac/Linux
cd E:\Claude Dev\servicenow-mcp-doc # Windows
node server.js # Should start the MCP server (Ctrl+C to stop)If the server starts without errors, the installation is correct.
Verify you can access your ServiceNow instance:
- Open
https://your-instance.service-now.comin a browser - Try logging in with the credentials from your MCP config
- Ensure your network allows access (VPN required?)
Instance format:
- ✅ Correct:
dev12345.service-now.com - ✅ Also works:
https://dev12345.service-now.com(some versions accept this) - ❌ Wrong:
dev12345(missing domain)
Username/Password:
- Use your ServiceNow service account credentials
- Ensure no leading/trailing spaces
- Verify the account is not locked
Claude Code may show MCP errors in the output. Look for messages containing:
- "MCP server failed to start"
- "servicenow" (your server name)
- Error details about connection or authentication
Once the MCP is configured and Claude Code restarted, test it:
"Query ServiceNow for 5 incidents"
If this works, the MCP is properly configured!
Create a GitHub issue with:
- Your operating system (Mac/Windows/Linux)
- Node.js version (
node --version) - Whether you're using Claude Desktop or Claude Code CLI
- The exact error message you're seeing
- Your MCP config (with credentials redacted!)
The project includes INSTANCE_CONTEXT.md - a configuration file that captures your ServiceNow instance's specific rules, data policies, and constraints. This helps avoid validation errors when generating data.
Setup:
- Review the template: Open
INSTANCE_CONTEXT.mdto see the sample configuration - Create your version: Copy it to a custom file (e.g.,
INSTANCE_CONTEXT_DEV.md) - Customize: Update with your instance's specific rules:
- Required fields and validation rules
- State constraints (which states can/cannot be used)
- Data policies (mandatory field combinations)
- Custom fields specific to your organization
- Reference it: When using Claude Code, mention your context file:
"Generate 10 incidents following the rules in INSTANCE_CONTEXT_DEV.md"
Multiple Instances:
If you work with multiple ServiceNow environments, create separate context files:
INSTANCE_CONTEXT_DEV.md- Development instanceINSTANCE_CONTEXT_TEST.md- Test instanceINSTANCE_CONTEXT_PROD.md- Production instance
Note: Custom context files (INSTANCE_CONTEXT_*.md) are automatically ignored by git, so you can safely store instance-specific details without committing them to the repository.
This is the primary way to use the tool for actually loading data into ServiceNow:
- Open this project in Claude Code
- Ensure your ServiceNow MCP server is configured
- Ask Claude to generate data:
- "Generate 10 incidents in ServiceNow"
- "Create 5 change requests and load them"
- "Run demo-load.js with 20 incidents"
Claude will use the MCP connection to create records directly in your ServiceNow instance.
This tool can work with ServiceNow field values in two ways:
Uses predefined field values from the tool's configuration files (src/config/defaults.js). These are common ServiceNow values that work out-of-the-box for standard instances.
When to use:
- You have a standard ServiceNow instance
- You want quick data generation without querying your instance
- The default categories, states, and priorities work for your needs
Example:
"Generate 10 incidents with software, hardware, and network categories"
Claude uses the hardcoded categories: inquiry, software, hardware, network, database
Claude queries your actual ServiceNow instance (using the sys_choice table) to discover real field values, including custom values you've added.
When to use:
- You have custom categories, states, or other choice list values
- You've modified standard ServiceNow choice lists
- You want to ensure generated data matches your instance exactly
- You want to discover available values before generating records
Example Prompts for Dynamic Discovery (Works for ALL record types):
# Discover values first, then generate:
"What categories are available for incidents in my ServiceNow instance?"
"Query my instance for available change types and show me what's configured"
"Show me all problem states in my instance, then create 10 problems using those states"
# Discover and generate in one prompt:
"Find available incident categories in my instance and generate 10 incidents using random values from that list"
"Query for change request risks, then create 5 changes with varying risk levels"
"Discover custom story classifications and generate 8 stories using those values"
# General discovery:
"What custom fields exist on the incident table?"
"List all choice list values for the problem category field"
How It Works:
The tool includes a field discovery utility (src/utils/field-discovery.js) that:
- Queries the
sys_choicetable in your ServiceNow instance - Caches discovered values for performance
- Falls back to default values when MCP is unavailable
- Automatically uses discovered values in record generation
Demo Script:
Try the discovery demo to see it in action:
node demo-discovery.js incident 5This script will:
- Attempt to discover field values from your instance
- Show which values were found (including custom values!)
- Generate records using discovered or default values
- Display cache statistics
You can customize the generated records by specifying field values and data patterns in your prompts. Below are the available fields for each record type with their standard values:
Available Fields to Customize:
- category: inquiry, software, hardware, network, database
- subcategory: Depends on category (e.g., email/os for software, monitor/printer for hardware, dhcp/dns/vpn for network)
- priority: 1 (Critical), 2 (High), 3 (Moderate), 4 (Low), 5 (Planning)
- impact: 1 (High), 2 (Medium), 3 (Low)
- urgency: 1 (High), 2 (Medium), 3 (Low)
- state: 1 (New), 2 (In Progress), 3 (On Hold), 6 (Resolved), 7 (Closed)
Example Prompts:
"Generate 10 incidents with category set to software"
"Create 5 high-priority incidents (priority 1) in the network category"
"Generate 15 incidents with a mix of software, hardware, and network categories"
"Create 20 incidents, mostly closed (state 7) with various priorities"
"Generate 8 incidents: 3 software, 3 hardware, 2 network, all with medium impact"
Available Fields to Customize:
- type: normal, standard, emergency
- category: Hardware, Software, Network, Database, Other
- risk: 1 (High), 2 (Medium), 3 (Low), 4 (Moderate)
- impact: 1 (High), 2 (Medium), 3 (Low)
- state: -5 (New), -4 (Assess), -3 (Authorize), -2 (Scheduled), -1 (Implement), 0 (Review), 3 (Closed)
Example Prompts:
"Generate 5 emergency change requests"
"Create 10 normal changes in the Software category"
"Generate 8 change requests: 5 closed, 3 in scheduled state"
"Create 12 changes with high risk across Hardware and Network categories"
"Generate 6 standard changes with low impact"
"Query available change types and categories, then generate 10 changes"
"Discover custom change states and create 5 changes using those states"
Available Fields to Customize:
- category: software, hardware, network, database, inquiry
- priority: 1-5 (calculated from impact and urgency)
- impact: 1 (High), 2 (Medium), 3 (Low)
- urgency: 1 (High), 2 (Medium), 3 (Low)
- state: 1 (New), 2 (Assess), 3 (Root Cause Analysis), 106 (Resolved), 107 (Closed)
Example Prompts:
"Generate 5 problem records in the software category"
"Create 10 problems: mix of resolved and closed states"
"Generate 7 high-impact problems across network and database categories"
"Create 4 problems in Root Cause Analysis state with high priority"
"Query my instance for problem categories and states, then create 8 problems"
"Find available problem resolution codes and generate 6 resolved problems"
Available Fields to Customize:
- classification: Feature, Enhancement, Defect
- priority: 1 (Critical), 2 (High), 3 (Moderate), 4 (Low), 5 (Planning)
- story_points: 1, 2, 3, 5, 8, 13
- state: 1 (Draft), 2 (Ready), 3 (In Progress), 4 (Complete)
- backlog_type: product, sprint
Example Prompts:
"Generate 10 feature stories with 5 story points"
"Create 8 defect stories in In Progress state"
"Generate 15 stories: mix of features and enhancements with various priorities"
"Create 5 high-priority stories (priority 2) that are complete"
"Generate 12 sprint backlog stories with story points between 2-5"
"Query available story classifications and states, then create 10 stories"
"Discover custom story fields and generate 7 stories using those values"
- Specify quantities and distributions: "Create 20 incidents: 10 software, 7 hardware, 3 network"
- Combine multiple criteria: "Generate 15 high-priority incidents in closed state with hardware category"
- Use natural language: "Create mostly resolved incidents with a few still open"
- Request specific patterns: "Generate incidents that represent a typical week of service desk tickets"
- Ask for realistic scenarios: "Create change requests for a database upgrade project"
You can run the tool from command line to preview what data will be generated, but it cannot create records in ServiceNow without Claude Code:
# Interactive mode - preview and export to JSON
npm start
# Generate specific record types (preview only)
node demo-load.js incident 10
node demo-load.js change 5
node demo-load.js problem 3Command line mode will export generated records to JSON files for review, but actual ServiceNow integration requires running within Claude Code.
This tool uses the ServiceNow Model Context Protocol (MCP) server for secure, authenticated access to ServiceNow. The MCP server runs within Claude Code and provides the necessary tools (create_incident, create_record, etc.) that this application uses to interact with ServiceNow.
Without Claude Code, the tool can still generate realistic dummy data and export it to JSON files, but cannot load records into ServiceNow.
servicenow-data-loader/
├── src/
│ ├── index.js # Main entry point
│ ├── generators/ # Record generators for each type
│ │ ├── incident.js # Incident record generator
│ │ ├── change.js # Change request generator
│ │ ├── problem.js # Problem record generator
│ │ └── story.js # Story record generator
│ ├── utils/
│ │ ├── servicenow-helpers.js # User pool and ServiceNow utilities
│ │ ├── field-discovery.js # Dynamic field value discovery
│ │ └── data-helpers.js # Data generation helpers
│ └── config/
│ └── defaults.js # Default field values
├── .github/
│ └── ISSUE_TEMPLATE/ # GitHub issue templates
├── INSTANCE_CONTEXT.md # Instance-specific rules and constraints (template)
├── Claude.md # Project context for Claude Code
├── package.json
└── README.md
Note: Users should create their own INSTANCE_CONTEXT_*.md files for instance-specific configurations (automatically ignored by git).
Issues and enhancement requests are tracked via GitHub Issues. Feel free to submit bug reports, feature requests, or pull requests.
This tool leverages Claude (via Claude Code) to generate realistic ServiceNow records through natural language prompts. Understanding the AI usage patterns and costs can help you plan and optimize your data generation workflows.
Token consumption varies based on:
- Number of records generated
- Complexity of prompts
- Field discovery operations (if querying your instance for custom values)
- Context file consultation (INSTANCE_CONTEXT.md)
| Batch Size | Estimated Input Tokens | Estimated Output Tokens | Total Tokens | Generation Time |
|---|---|---|---|---|
| 10 incidents | ~8,000 | ~15,000 | ~23,000 | 15-20 seconds |
| 50 incidents | ~10,000 | ~70,000 | ~80,000 | 60-70 seconds |
| 100 incidents | ~12,000 | ~140,000 | ~152,000 | 120-140 seconds |
| 200 incidents | ~15,000 | ~280,000 | ~295,000 | 240-280 seconds |
Note: Token counts include conversation context, tool calls, MCP interactions, and record generation. Actual usage may vary based on prompt complexity and instance configuration.
Based on Claude Sonnet 4.5 pricing (as of January 2025):
- Input tokens: $3.00 per million tokens
- Output tokens: $15.00 per million tokens
| Batch Size | Input Cost | Output Cost | Total Cost | Cost per Record |
|---|---|---|---|---|
| 10 incidents | $0.024 | $0.225 | $0.249 | $0.025 |
| 50 incidents | $0.030 | $1.050 | $1.080 | $0.022 |
| 100 incidents | $0.036 | $2.100 | $2.136 | $0.021 |
| 200 incidents | $0.045 | $4.200 | $4.245 | $0.021 |
Cost Optimization Tips:
- Batch generation is more efficient: Generating 100 records at once is more cost-effective per record than generating 10 records ten times
- Use standard values when possible: Dynamic field discovery adds minimal overhead, but standard values are slightly faster
- Specify clear constraints: Well-defined prompts reduce back-and-forth iterations
- Leverage INSTANCE_CONTEXT.md: Pre-configured rules prevent validation errors and wasted generation attempts
- Parallel execution: The tool creates records in parallel, achieving ~1-2 seconds per record
- User pool caching: Active user queries are cached during the session to improve performance
- Field discovery caching: Discovered field values are cached to avoid repeated queries
- Context optimization: INSTANCE_CONTEXT.md is read once per session, not per record
- Generate in larger batches when possible (50-200 records) for better per-record efficiency
- Use clear, specific prompts to minimize retries and corrections
- Consult INSTANCE_CONTEXT.md automatically to prevent validation errors (this is done automatically)
- Leverage field discovery strategically - discover once, generate many records using those values
- Monitor token usage in Claude Code to track actual consumption for your use case
Small Dataset (Development/Testing):
"Generate 10 incidents with varied states and categories"
Cost: ~$0.25 | Time: ~15 seconds
Medium Dataset (Load Testing):
"Generate 50 incidents across all categories with realistic distribution"
Cost: ~$1.08 | Time: ~65 seconds
Large Dataset (Volume Testing):
"Generate 200 incidents representing a month of service desk activity"
Cost: ~$4.25 | Time: ~4-5 minutes
Custom Instance Discovery:
"Discover incident categories in my instance, then generate 100 incidents using those values"
Cost: ~$2.20 (includes discovery + generation) | Time: ~2.5 minutes
Claude Code operates within token budget limits. For very large data generation tasks:
- Generate in multiple sessions if needed (e.g., 4 sessions of 200 records vs. 1 session of 800)
- Monitor your session's token usage periodically
- The tool automatically handles MCP token limits by fetching limited user pools (20 users by default)
This project is licensed under the MIT License.
The MIT License is a permissive open-source license that allows you to:
- ✅ Use this software for any purpose (commercial or personal)
- ✅ Modify the source code to fit your needs
- ✅ Distribute copies of the software
- ✅ Sublicense or incorporate into proprietary software
The only requirements are:
- Include the original copyright notice and license text in any copies or substantial portions of the software
- The software is provided "AS IS" without warranty of any kind
For the full license text, see the LICENSE file in this repository.
This is NOT an official ServiceNow application.
This tool is an independent, community-developed project and is:
- ❌ NOT developed by ServiceNow, Inc.
- ❌ NOT endorsed or supported by ServiceNow, Inc.
- ❌ NOT covered by any ServiceNow support agreements or warranties
ServiceNow, Inc. holds no liability or accountability for:
- The functionality, reliability, or security of this application
- Any data generated, modified, or deleted through use of this tool
- Any issues, damages, or losses resulting from use of this application
- Any support, maintenance, or updates to this software
This tool interacts with ServiceNow instances using publicly available APIs and the Model Context Protocol (MCP). Users are solely responsible for:
- Ensuring compliance with their organization's ServiceNow usage policies
- Proper configuration and security of service accounts
- Any data created or modified in their ServiceNow instances
- Following ServiceNow's terms of service and acceptable use policies
Use at your own risk. Always test thoroughly in non-production environments.