Skip to main content
Glama

SkyeNet-MCP-ACE

ServiceNow Background Script Execution for AI Agents - A Model Context Protocol (MCP) server that enables AI agents to execute server-side JavaScript directly on ServiceNow instances with context bloat reduction features.

πŸš€ Quick Start

Prerequisites

  • Node.js 20+ (system-wide installation recommended for Linux, nvm works on macOS)

  • ServiceNow instance with API access

  • Root/sudo access for system-wide installation (Linux only)

Installation

For Local Development (macOS/Linux)

# Clone the repository
git clone https://github.com/skyenet/skyenet-mcp-ace.git
cd skyenet-mcp-ace

# Install dependencies
npm install

# Build the project
npm run build

# Run locally
npm start

For System-Wide Installation (Linux)

# Clone the repository
git clone https://github.com/skyenet/skyenet-mcp-ace.git
cd skyenet-mcp-ace

# Bulletproof deployment (handles all edge cases)
sudo ./bulletproof-deploy.sh

# Verify installation
./bulletproof-verify.sh

Note: The deployment scripts are Linux-specific. For macOS, use local development mode or configure manually.

Configuration

The MCP server supports multiple ways to provide credentials, checked in priority order:

  1. Environment variables in MCP config (highest priority) - Recommended for project-specific configs

  2. Project directory .servicenow-ace.env file - In the SkyeNet-MCP-ACE repository root

  3. Home directory ~/.servicenow-ace.env file - Global/shared credentials

  4. System directory /etc/csadmin/servicenow-ace.env - Linux system-wide fallback

When configuring the MCP server in Cursor (.cursor/mcp.json), you can pass credentials directly:

{
  "mcpServers": {
    "skyenet-ace": {
      "command": "node",
      "args": ["/absolute/path/to/SkyeNet-MCP-ACE/build/index.js"],
      "env": {
        "SERVICENOW_ACE_INSTANCE": "your-instance.service-now.com",
        "SERVICENOW_ACE_USERNAME": "your-username",
        "SERVICENOW_ACE_PASSWORD": "your-password"
      }
    }
  }
}

Advantages: Project-specific credentials, no separate .env files needed, works from any project folder.

Option 2: Environment File

Create your ServiceNow credentials file:

# Copy the example file
cp servicenow-ace.env.example ~/.servicenow-ace.env

# Edit with your ServiceNow details
nano ~/.servicenow-ace.env

Required environment variables:

SERVICENOW_ACE_INSTANCE=your-instance.service-now.com
SERVICENOW_ACE_USERNAME=your-username
SERVICENOW_ACE_PASSWORD=your-password

Note: You can also place .servicenow-ace.env in the project root directory for project-specific credentials.

Cursor IDE Integration

For Cursor IDE (Project-Level Configuration)

Create .cursor/mcp.json in your project folder:

{
  "mcpServers": {
    "skyenet-ace": {
      "command": "node",
      "args": ["/absolute/path/to/SkyeNet-MCP-ACE/build/index.js"],
      "env": {
        "SERVICENOW_ACE_INSTANCE": "your-instance.service-now.com",
        "SERVICENOW_ACE_USERNAME": "your-username",
        "SERVICENOW_ACE_PASSWORD": "your-password"
      }
    }
  }
}

Replace /absolute/path/to/SkyeNet-MCP-ACE with the actual path to this repository. See .cursor/mcp.json.example for a template.

Note: If credentials are provided via the env field, they take highest priority over any .env files.

For Codex (System-Wide Configuration)

Add to your Codex configuration (/etc/codex/config.toml):

[[mcp.servers.skyenet-ace]]
command = "/usr/local/sbin/skyenet-mcp-ace-server"
args = []

πŸ› οΈ Available Tools

1. execute_background_script

Execute server-side JavaScript directly on ServiceNow instances.

Parameters:

  • script (string): The JavaScript code to execute

  • quiet (boolean, optional): Ultra-minimal response mode

Example:

// Get user information
var user = new GlideRecord('sys_user');
user.get('admin');
gs.print(user.getDisplayValue());

2. execute_table_operation

Perform CRUD operations on ServiceNow tables with context bloat reduction.

Parameters:

  • operation (string): GET, POST, PUT, DELETE

  • table (string): Table name (e.g., 'sys_user', 'incident')

  • sys_id (string, optional): Record sys_id for specific operations

  • sys_ids (array, optional): Multiple sys_ids for batch operations

  • fields (array, optional): Specific fields to retrieve

  • query (string, optional): Encoded query string

  • limit (number, optional): Maximum records to return

  • strict_fields (boolean, optional): Enable strict field validation

  • response_mode (string, optional): 'minimal' for reduced response size

Examples:

// Get user records
{
  "operation": "GET",
  "table": "sys_user",
  "fields": ["sys_id", "user_name", "email"],
  "limit": 10,
  "response_mode": "minimal"
}

// Create incident
{
  "operation": "POST",
  "table": "incident",
  "data": {
    "short_description": "New incident",
    "priority": "3"
  }
}

3. execute_updateset_operation

Manage ServiceNow Update Sets with context bloat reduction.

Parameters:

  • operation (string): recent, contents, set_working, get_working

  • update_set_sys_id (string, optional): Update Set sys_id

  • response_mode (string, optional): 'minimal' for reduced response size

  • quiet (boolean, optional): Ultra-minimal response mode

Examples:

// Get recent XML activity (minimal mode)
{
  "operation": "recent",
  "response_mode": "minimal"
}

// Set working update set
{
  "operation": "set_working",
  "update_set_sys_id": "abc123def456",
  "quiet": true
}

πŸ”§ Context Bloat Reduction Features

Minimal Mode

  • Table API: Truncates large fields, limits records, removes redundant data

  • Update Sets: Limits to 5 records, compact summaries, flattened structure

  • Background Scripts: Truncates output, removes verbose logging

Quiet Mode

  • Ultra-minimal responses: Only success/failure status

  • No verbose output: Essential information only

  • Reduced token usage: 90%+ reduction in response size

Response Size Examples

  • Standard Table API: ~15KB

  • Minimal Table API: ~700 bytes

  • Quiet Update Set: ~300 bytes

  • Minimal Update Set: ~2.6KB

πŸ”„ Maintenance

Update Installation

# Pull latest changes
git pull origin main

# Re-run bulletproof deployment
sudo ./bulletproof-deploy.sh

# Verify everything works
./bulletproof-verify.sh

Clean Reinstall

# Clean everything
sudo rm -rf /usr/local/lib/node_modules/skyenet-mcp-ace
sudo rm -f /usr/local/sbin/skyenet-mcp-ace-server

# Re-run bulletproof deployment
sudo ./bulletproof-deploy.sh

# Verify
./bulletproof-verify.sh

🚨 Troubleshooting

Server Won't Start

# Check server binary
ls -la /usr/local/sbin/skyenet-mcp-ace-server

# Test manually
/usr/local/sbin/skyenet-mcp-ace-server

# Check Node.js version
/usr/bin/node --version

Codex Timeout Issues

# Verify server works
echo '{"jsonrpc": "2.0", "id": 1, "method": "tools/list"}' | /usr/local/sbin/skyenet-mcp-ace-server

# Check Codex configuration
cat /etc/codex/config.toml | grep skyenet

Permission Issues

# Fix permissions
sudo chmod +x /usr/local/sbin/skyenet-mcp-ace-server

# Verify ownership
sudo chown root:root /usr/local/sbin/skyenet-mcp-ace-server

πŸ“Š Project Structure

SkyeNet-MCP-ACE/
β”œβ”€β”€ bulletproof-deploy.sh    # Bulletproof deployment script
β”œβ”€β”€ bulletproof-verify.sh    # Comprehensive verification
β”œβ”€β”€ src/                     # TypeScript source code
β”‚   β”œβ”€β”€ index.ts            # Main MCP server
β”‚   β”œβ”€β”€ servicenow/         # ServiceNow integration
β”‚   └── utils/               # Utility functions
β”œβ”€β”€ build/                  # Compiled JavaScript
└── README.md              # This file

🎯 Key Features

  • Context Bloat Reduction: Minimal and quiet modes for AI agents

  • Bulletproof Deployment: Handles all edge cases automatically

  • Multi-User Compatibility: Works for all users system-wide

  • Comprehensive Verification: Tests all scenarios

  • ServiceNow Integration: Direct API access with error handling

  • Update Set Management: Full lifecycle support

  • Table Operations: CRUD with field validation

πŸ”’ Security

  • Credential Management: Separate from MCP-Connect

  • Field Validation: Prevents injection attacks

  • Error Handling: Secure error responses

  • System-wide Installation: Proper permissions

πŸ“ˆ Performance

  • Response Times: < 3 seconds for most operations

  • Memory Usage: Optimized for AI agent interactions

  • Token Efficiency: 90%+ reduction in context bloat

  • Reliability: Bulletproof deployment ensures stability


For detailed deployment instructions, see the bulletproof deployment script comments.

Available Tools

3 tools
execute_background_scriptA

Execute server-side JavaScript in ServiceNow using Background Scripts. ⚠️ SANDBOX ONLY - executes arbitrary code. πŸ›‘οΈ Auto-truncates large outputs. πŸ“ Use {{file:path}} for large scripts.

ParametersJSON Schema
NameRequiredDescriptionDefault
scriptYesThe server-side JavaScript code to execute (e.g., gs.print("Hello");). Maximum 50,000 characters. Supports {{file:...}} placeholders to load content from local files.
scopeYesThe application scope (e.g., "global" or specific app scope). Required.
timeout_msNoOptional timeout in milliseconds (default: 60000, range: 1000-300000)
include_htmlNoInclude HTML output in response (default: true). Set to false for text-only mode to reduce response size.
response_modeNoResponse verbosity: full (all data), minimal (essential only), compact (summarized). Default: full

TDQS

A4.4/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure and does so exceptionally well. It explicitly warns about the sandbox environment ('⚠️ SANDBOX ONLY - executes arbitrary code'), discloses output handling behavior ('πŸ›‘οΈ Auto-truncates large outputs'), and provides practical implementation guidance. This goes well beyond what the input schema provides about parameters.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly sized and front-loaded with the core purpose. Every sentence earns its place: the first states the primary function, the second provides critical warnings, and the third offers practical implementation advice. The emoji usage enhances scannability without adding fluff.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool that executes arbitrary code with 5 parameters and no output schema, the description provides excellent context about behavior, warnings, and practical usage. The only minor gap is the lack of information about return values or error handling, which would be helpful given there's no output schema. However, the description covers the most critical aspects well.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the input schema already thoroughly documents all 5 parameters. The description adds some value by reinforcing the script parameter's support for file placeholders, but doesn't provide additional semantic context beyond what's already in the schema descriptions. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Execute server-side JavaScript in ServiceNow using Background Scripts') and resource ('ServiceNow'), distinguishing it from sibling tools like execute_table_operation and execute_updateset_operation which likely operate on different resources. It provides a precise verb+resource combination that leaves no ambiguity about what the tool does.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool ('Execute server-side JavaScript in ServiceNow') and includes practical guidance for handling large scripts ('Use {{file:path}} for large scripts'). However, it doesn't explicitly state when NOT to use it or directly compare it to sibling alternatives, which prevents a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_table_operationA

CRUD operations on ServiceNow tables via Table API. Supports GET/POST/PUT/PATCH/DELETE with query syntax and batch operations. ⚠️ SANDBOX ONLY - reads/modifies data. πŸ›‘οΈ Auto-limits large results. Use pagination for big datasets. πŸ“ Use {{file:path}} for large data.

ParametersJSON Schema
NameRequiredDescriptionDefault
operationYesThe operation to perform on the table. Required.
tableYesThe ServiceNow table name (e.g., "incident", "sys_user"). Required.
sys_idNoSystem ID for single record operations (GET, PUT, PATCH, DELETE).
sys_idsNoArray of system IDs for batch operations.
queryNoServiceNow encoded query string (e.g., "active=true^priority=1").
fieldsNoComma-separated list of fields to return.
limitNoMaximum number of records to return (default: 1000).
offsetNoNumber of records to skip for pagination.
display_valueNoReturn display values for reference fields.
exclude_reference_linkNoExclude reference link fields from response.
dataNoRecord data for POST/PUT/PATCH operations. Can be single object or array for batch operations. Supports {{file:...}} placeholders to load content from local files.
batchNoEnable batch mode for multiple record operations.
validate_fieldsNoEnable field validation warnings to catch typos and invalid field names. Default: true (validation enabled by default).
context_overflow_preventionNoEnable context overflow prevention to limit large result sets. Default: true. Set to false to disable automatic truncation (use with caution).
strict_fieldsNoStrict field filtering - only return requested fields and strip large fields (script, html, css) unless explicitly requested. Default: false.
response_modeNoResponse verbosity: full (all data), minimal (essential only), compact (summarized). Default: full

TDQS

A4.3/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure and does so comprehensively. It explicitly warns about data modification in sandbox environments, mentions auto-limiting of large results, provides pagination advice, and describes file placeholder support. This covers critical behavioral aspects like safety, performance, and data handling that aren't in the schema.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is efficiently structured with key information front-loaded (CRUD operations, API type, supported methods) followed by important warnings and usage tips. The use of emojis helps visually organize critical points. While slightly dense due to the tool's complexity, every sentence adds value without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 16 parameters, no annotations, and no output schema, the description provides substantial context about behavioral traits, safety warnings, and usage patterns. It covers the tool's scope, data modification implications, performance considerations, and file handling. The main gap is the lack of output format description, but given the tool's complexity, the description does remarkably well.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all 16 parameters thoroughly. The description adds some context about query syntax, batch operations, and file placeholders, but doesn't provide additional parameter-specific semantics beyond what's in the schema descriptions. This meets the baseline expectation when schema coverage is complete.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool performs 'CRUD operations on ServiceNow tables via Table API' with specific HTTP methods (GET/POST/PUT/PATCH/DELETE) and mentions query syntax and batch operations. It distinguishes itself from sibling tools like 'execute_background_script' and 'execute_updateset_operation' by focusing on table operations rather than scripts or updatesets.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for usage with warnings like '⚠️ SANDBOX ONLY - reads/modifies data' and guidance on handling large datasets ('Use pagination for big datasets'). However, it doesn't explicitly state when to use this tool versus the sibling tools, though the different focus areas (tables vs. scripts vs. updatesets) are implied.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

execute_updateset_operationA

Manage ServiceNow update sets with lifecycle operations, XML reassignment, and working set tracking. ⚠️ SANDBOX ONLY - modifies update sets. πŸ›‘οΈ Auto-limits large results. Use pagination for big datasets. πŸ“ Use {{file:path}} for large data.

ParametersJSON Schema
NameRequiredDescriptionDefault
operationYesThe update set operation to perform. Required.
nameNoUpdate set name (required for create operation).
descriptionNoUpdate set description (optional for create operation).
scopeNoUpdate set scope (optional, defaults to configured scope).
set_as_workingNoSet the created update set as working set (for create operation).
update_set_sys_idNoUpdate set sys_id for operations that require it.
tableNoTable name for insert/update operations.
sys_idNoRecord sys_id for update operations.
dataNoRecord data for insert/update operations. Can be single object or array for batch operations. Supports {{file:...}} placeholders to load content from local files.
batchNoEnable batch mode for multiple record operations.
xml_sys_idsNoArray of XML sys_ids for rehome operations.
queryNoServiceNow encoded query string for rehome operations.
forceNoForce reassignment even if XML is not in Default update set.
limitNoMaximum number of records to return for list/recent operations.
offsetNoNumber of records to skip for pagination.
filtersNoFilters for list operations (scope, state, created_by, sys_created_on).
response_modeNoResponse verbosity: full (all data), minimal (essential only), compact (summarized). Default: full
quietNoCompact acknowledgment for update operations to avoid RESPONSE_TOO_LARGE errors. Default: false.

TDQS

A3.8/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by warning about sandbox-only usage and modification of update sets, mentioning auto-limiting of large results, and providing pagination guidance. It also hints at file handling capabilities. However, it doesn't cover all behavioral aspects like error handling, authentication requirements, or rate limits, which prevents a perfect score.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded with the core purpose. The warning icons and file handling note are useful additions. However, the structure could be slightly improved by separating the core purpose from the usage notes more clearly, and some phrasing ('large data' vs 'big datasets') is slightly redundant.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex tool with 18 parameters, no annotations, and no output schema, the description provides good basic context about sandbox restrictions and data handling. However, it doesn't explain what the tool returns (no output schema), doesn't cover all behavioral aspects, and doesn't differentiate from sibling tools. Given the complexity, more comprehensive guidance would be expected.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema description coverage is 100%, so the schema already documents all 18 parameters thoroughly. The description doesn't add any meaningful parameter semantics beyond what's in the schema - it mentions file placeholders but this is already covered in the 'data' parameter description. This meets the baseline expectation when schema coverage is high.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool manages ServiceNow update sets with specific operations (lifecycle, XML reassignment, working set tracking). It specifies the resource (ServiceNow update sets) and general action verbs (manage, track). However, it doesn't explicitly differentiate from sibling tools like execute_background_script or execute_table_operation, which prevents a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear usage context with '⚠️ SANDBOX ONLY - modifies update sets' warning and guidance for handling large datasets ('Use pagination for big datasets'). It also offers file handling advice ('πŸ“ Use {{file:path}} for large data'). However, it doesn't explicitly mention when to use this tool versus the sibling tools (execute_background_script, execute_table_operation), which would be needed for a perfect score.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

TDQS

A4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: execute_background_script runs JavaScript code, execute_table_operation performs CRUD on tables, and execute_updateset_operation manages update sets. There is no overlap or ambiguity between these three domains.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with 'execute_' prefix and descriptive suffixes (background_script, table_operation, updateset_operation). The naming is uniform and predictable throughout the set.

Tool Count3/5

With only 3 tools, the set feels thin for a ServiceNow automation server, potentially lacking coverage for other common operations like user management, incident handling, or workflow automation. However, the tools are well-scoped for their specific purposes.

Completeness3/5

The tools cover script execution, table operations, and update set management, but there are notable gaps in ServiceNow functionality such as user/group operations, incident/change request handling, and workflow automation. Agents may need workarounds for common tasks outside these three areas.

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/ClearSkye/SkyeNet-MCP-ACE'

If you have feedback or need assistance with the MCP directory API, please join our Discord server