servicenow-mcp-server 2.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/.claude/settings.local.json +70 -0
  2. package/CLAUDE.md +777 -0
  3. package/LICENSE +21 -0
  4. package/README.md +562 -0
  5. package/assets/logo.svg +385 -0
  6. package/config/servicenow-instances.json.example +28 -0
  7. package/docs/403_TROUBLESHOOTING.md +329 -0
  8. package/docs/API_REFERENCE.md +1142 -0
  9. package/docs/APPLICATION_SCOPE_VALIDATION.md +681 -0
  10. package/docs/CLAUDE_DESKTOP_SETUP.md +373 -0
  11. package/docs/CONVENIENCE_TOOLS.md +601 -0
  12. package/docs/CONVENIENCE_TOOLS_SUMMARY.md +371 -0
  13. package/docs/FLOW_DESIGNER_GUIDE.md +1021 -0
  14. package/docs/IMPLEMENTATION_COMPLETE.md +165 -0
  15. package/docs/INSTANCE_SWITCHING_GUIDE.md +219 -0
  16. package/docs/MULTI_INSTANCE_CONFIGURATION.md +185 -0
  17. package/docs/NATURAL_LANGUAGE_SEARCH_IMPLEMENTATION.md +221 -0
  18. package/docs/PUPPETEER_INTEGRATION_PROPOSAL.md +1322 -0
  19. package/docs/QUICK_REFERENCE.md +395 -0
  20. package/docs/README.md +75 -0
  21. package/docs/RESOURCES_ARCHITECTURE.md +392 -0
  22. package/docs/RESOURCES_IMPLEMENTATION.md +276 -0
  23. package/docs/RESOURCES_SUMMARY.md +104 -0
  24. package/docs/SETUP_GUIDE.md +104 -0
  25. package/docs/UI_OPERATIONS_ARCHITECTURE.md +1219 -0
  26. package/docs/UI_OPERATIONS_DECISION_MATRIX.md +542 -0
  27. package/docs/UI_OPERATIONS_SUMMARY.md +507 -0
  28. package/docs/UPDATE_SET_VALIDATION.md +598 -0
  29. package/docs/UPDATE_SET_VALIDATION_SUMMARY.md +209 -0
  30. package/docs/VALIDATION_SUMMARY.md +479 -0
  31. package/jest.config.js +24 -0
  32. package/package.json +61 -0
  33. package/scripts/background_script_2025-09-29T20-19-35-101Z.js +23 -0
  34. package/scripts/link_ui_policy_actions_2025-09-29T20-17-15-218Z.js +90 -0
  35. package/scripts/set_update_set_Integration_Governance_Framework_2025-09-29T19-47-06-790Z.js +30 -0
  36. package/scripts/set_update_set_Integration_Governance_Framework_2025-09-29T19-59-33-152Z.js +30 -0
  37. package/scripts/set_update_set_current_2025-09-29T20-16-59-675Z.js +24 -0
  38. package/scripts/test_sys_dictionary_403.js +85 -0
  39. package/setup/setup-report.json +5313 -0
  40. package/src/config/comprehensive-table-definitions.json +2575 -0
  41. package/src/config/instance-config.json +4693 -0
  42. package/src/config/prompts.md +59 -0
  43. package/src/config/table-definitions.json +4681 -0
  44. package/src/config-manager.js +146 -0
  45. package/src/mcp-server-consolidated.js +2894 -0
  46. package/src/natural-language.js +472 -0
  47. package/src/resources.js +326 -0
  48. package/src/script-sync.js +428 -0
  49. package/src/server.js +125 -0
  50. package/src/servicenow-client.js +1625 -0
  51. package/src/stdio-server.js +52 -0
  52. package/start-mcp.sh +7 -0
@@ -0,0 +1,104 @@
1
+ # MCP Resources Summary
2
+
3
+ ## Implementation Complete
4
+
5
+ MCP Resources have been successfully implemented for the ServiceNow MCP server.
6
+
7
+ ## Files Created
8
+
9
+ 1. **`/src/resources.js`** - Resource handlers implementation
10
+ 2. **`/docs/RESOURCES_IMPLEMENTATION.md`** - Complete documentation
11
+
12
+ ## Integration Required
13
+
14
+ Add to `/src/mcp-server-consolidated.js`:
15
+
16
+ ```javascript
17
+ import { createResourceHandlers } from './resources.js';
18
+
19
+ // After loading tableMetadata:
20
+ const { listResources, readResource } = createResourceHandlers(
21
+ serviceNowClient,
22
+ configManager,
23
+ tableMetadata
24
+ );
25
+
26
+ // Replace existing resource handlers with:
27
+ server.setRequestHandler(ListResourcesRequestSchema, listResources);
28
+ server.setRequestHandler(ReadResourceRequestSchema, async (request) => {
29
+ const { uri } = request.params;
30
+ return await readResource(uri);
31
+ });
32
+ ```
33
+
34
+ ## Resource URIs Implemented
35
+
36
+ ### Global Resources
37
+ - `servicenow://instances` - All configured instances
38
+ - `servicenow://tables` - All available tables with metadata
39
+
40
+ ### Instance Resources
41
+ - `servicenow://{instance}/info` - Instance info & capabilities
42
+ - `servicenow://{instance}/incidents` - Active incidents (25)
43
+ - `servicenow://{instance}/incidents/{number}` - Specific incident
44
+ - `servicenow://{instance}/users` - Active users (50)
45
+ - `servicenow://{instance}/update-sets` - Update sets in progress (25)
46
+ - `servicenow://{instance}/update-sets/{sys_id}` - Update set contents & breakdown
47
+ - `servicenow://{instance}/groups` - User groups (50)
48
+ - `servicenow://{instance}/change-requests` - Active change requests (25)
49
+
50
+ ## Key Features
51
+
52
+ 1. **Multi-Instance Support** - Automatic instance routing
53
+ 2. **Metadata Enrichment** - All responses include timestamp, instance, count
54
+ 3. **Cacheable** - Read-only with timestamps for client caching
55
+ 4. **Error Handling** - Clear error messages with suggestions
56
+ 5. **Performance Optimized** - Field selection, default limits
57
+ 6. **Update Set Inspection** - Detailed component breakdown by type
58
+
59
+ ## Example Response Format
60
+
61
+ ```json
62
+ {
63
+ "metadata": {
64
+ "timestamp": "2025-10-06T12:00:00.000Z",
65
+ "instance": "dev",
66
+ "description": "Active incidents from dev",
67
+ "record_count": 15
68
+ },
69
+ "data": [
70
+ {
71
+ "number": "INC0012345",
72
+ "short_description": "Server down",
73
+ "state": "1",
74
+ "priority": "1",
75
+ "assigned_to": {"value": "abc123", "display_value": "John Doe"},
76
+ "sys_created_on": "2025-10-05 14:23:15"
77
+ }
78
+ ]
79
+ }
80
+ ```
81
+
82
+ ## Testing
83
+
84
+ Use MCP Inspector to test:
85
+
86
+ ```bash
87
+ npx @modelcontextprotocol/inspector node src/stdio-server.js
88
+
89
+ # Commands:
90
+ resources/list
91
+ resources/read servicenow://dev/info
92
+ resources/read servicenow://dev/incidents
93
+ resources/read servicenow://dev/update-sets/abc123
94
+ ```
95
+
96
+ ## Documentation
97
+
98
+ See `/docs/RESOURCES_IMPLEMENTATION.md` for complete details including:
99
+ - Integration instructions
100
+ - URI format specification
101
+ - Feature descriptions
102
+ - Error handling
103
+ - Performance considerations
104
+ - Future enhancements
@@ -0,0 +1,104 @@
1
+ # ServiceNow MCP Server Setup Guide
2
+
3
+ ## Two Server Modes
4
+
5
+ This MCP server can run in two different modes:
6
+
7
+ ### 1. HTTP/SSE Mode (Port 3000) - For Claude Code & Testing
8
+ - **File**: `src/server.js`
9
+ - **Port**: 3000 (configurable via PORT env var)
10
+ - **Usage**: Claude Code integration, API testing, web-based access
11
+ - **Start Command**: `npm start:http` or `npm run dev`
12
+ - **Endpoint**: http://localhost:3000/mcp
13
+
14
+ ### 2. STDIO Mode - For Claude Desktop App
15
+ - **File**: `src/stdio-server.js`
16
+ - **Usage**: Claude Desktop app integration
17
+ - **Start Command**: `npm start:stdio`
18
+ - **No port required** (uses standard input/output)
19
+
20
+ ## Configuration for Claude Desktop
21
+
22
+ Add to your Claude Desktop configuration (`~/Library/Application Support/Claude/claude_desktop_config.json`):
23
+
24
+ ```json
25
+ {
26
+ "mcpServers": {
27
+ "servicenow": {
28
+ "command": "node",
29
+ "args": ["/Users/nczitzer/WebstormProjects/mcp-servicenow-nodejs/src/stdio-server.js"],
30
+ "env": {
31
+ "SERVICENOW_INSTANCE_URL": "https://dev276360.service-now.com",
32
+ "SERVICENOW_USERNAME": "admin",
33
+ "SERVICENOW_PASSWORD": "$h4fG+9nAGeU"
34
+ }
35
+ }
36
+ }
37
+ }
38
+ ```
39
+
40
+ ## Configuration for Claude Code
41
+
42
+ The HTTP server runs automatically on port 3000 when you use:
43
+ ```bash
44
+ npm start
45
+ # or
46
+ npm run dev
47
+ ```
48
+
49
+ ## Running Both Simultaneously
50
+
51
+ You can run both servers at the same time:
52
+
53
+ 1. **Terminal 1** - HTTP Server for Claude Code:
54
+ ```bash
55
+ npm start:http
56
+ ```
57
+
58
+ 2. **Claude Desktop** - Will automatically start stdio server when needed
59
+
60
+ ## Testing the Servers
61
+
62
+ ### Test HTTP Server:
63
+ ```bash
64
+ # Health check
65
+ curl http://localhost:3000/health
66
+
67
+ # Test MCP endpoint
68
+ curl -X GET http://localhost:3000/mcp
69
+ ```
70
+
71
+ ### Test STDIO Server:
72
+ ```bash
73
+ # Run directly to see output
74
+ node src/stdio-server.js
75
+ # Press Ctrl+C to exit
76
+ ```
77
+
78
+ ## Common Issues
79
+
80
+ 1. **Port 3000 already in use**: Kill existing process:
81
+ ```bash
82
+ pkill -f "node src/server.js"
83
+ ```
84
+
85
+ 2. **Claude Desktop not connecting**:
86
+ - Restart Claude Desktop after updating config
87
+ - Check the path in config matches your actual path
88
+ - Ensure credentials in config are correct
89
+
90
+ 3. **Both trying to use same port**:
91
+ - HTTP server uses port 3000
92
+ - STDIO server doesn't use any port
93
+ - They can run simultaneously without conflict
94
+
95
+ ## Environment Variables
96
+
97
+ Make sure your `.env` file contains:
98
+ ```
99
+ SERVICENOW_INSTANCE_URL=https://dev276360.service-now.com
100
+ SERVICENOW_USERNAME=admin
101
+ SERVICENOW_PASSWORD=$h4fG+9nAGeU
102
+ PORT=3000
103
+ DEBUG=true
104
+ ```