SkyeNet-MCP-ACE

SkyeNet-MCP-ACE

Enables AI agents to execute server-side JavaScript and perform CRUD operations directly on ServiceNow instances with context bloat reduction features for efficient token usage.

Category
访问服务器

README

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)
  • ServiceNow instance with API access
  • Root/sudo access for system-wide installation

Installation

# 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

Configuration

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:

SNOW_INSTANCE=https://your-instance.service-now.com
SNOW_USERNAME=your-username
SNOW_PASSWORD=your-password

Codex Integration

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.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选