loading…
Search for a command to run...
loading…
A browser-accessible Model Context Protocol server that enables AI assistants to manage ServiceNow incidents using Server-Sent Events. It provides comprehensive
A browser-accessible Model Context Protocol server that enables AI assistants to manage ServiceNow incidents using Server-Sent Events. It provides comprehensive tools for creating, listing, retrieving, and updating incidents through a type-safe RESTful interface.
A browser-accessible Model Context Protocol (MCP) server for ServiceNow incident management using Server-Sent Events (SSE) transport.
| Feature | Stdio Server | SSE Server (This One) |
|---|---|---|
| Browser Access | ❌ No | ✅ Yes |
| AI Assistant Access | ✅ Yes | ✅ Yes |
| HTTP Endpoints | ❌ No | ✅ Yes |
| Port Required | ❌ No | ✅ Yes (3000) |
| Testing | Command line only | Browser, curl, Postman |
| Use Case | AI assistants only | Browsers + AI assistants |
Install dependencies:
cd servicenow-server-sse
/usr/local/bin/npm install
Build the server:
/usr/local/bin/npm run build
Set environment variables:
export SERVICENOW_INSTANCE_URL="https://your-instance.service-now.com"
export SERVICENOW_USERNAME="your-username"
export SERVICENOW_PASSWORD="your-password"
export PORT=3000 # Optional, defaults to 3000
Start the server:
/usr/local/bin/npm start
# Set credentials
export SERVICENOW_INSTANCE_URL="https://dev12345.service-now.com"
export SERVICENOW_USERNAME="admin"
export SERVICENOW_PASSWORD="your-password"
# Start server
cd servicenow-server-sse
/usr/local/bin/npm start
You should see:
🚀 ServiceNow MCP Server (SSE) running on http://localhost:3000
📡 SSE endpoint: http://localhost:3000/sse
💚 Health check: http://localhost:3000/health
📖 API info: http://localhost:3000/
🔗 ServiceNow instance: https://dev12345.service-now.com
Open in browser: http://localhost:3000/health
Response:
{
"status": "healthy",
"server": "servicenow-server-sse",
"version": "0.1.0",
"servicenow_instance": "https://your-instance.service-now.com"
}
Open in browser: http://localhost:3000/
Shows available tools and endpoints.
The MCP protocol endpoint: http://localhost:3000/sse
This is used by MCP clients (AI assistants) to connect.
Retrieve incident details by number or sys_id.
Parameters:
incident_id (required): Incident number (e.g., "INC0010001") or sys_idExample:
{
"incident_id": "INC0010001"
}
Query incidents with filters and pagination.
Parameters:
state (optional): 1=New, 2=In Progress, 3=On Hold, 6=Resolved, 7=Closedpriority (optional): 1=Critical, 2=High, 3=Moderate, 4=Low, 5=Planningassigned_to (optional): User sys_id or usernameassignment_group (optional): Group sys_id or namecaller_id (optional): Caller sys_id or usernamecreated_after (optional): ISO 8601 datecreated_before (optional): ISO 8601 datelimit (optional): 1-100, default 10offset (optional): Pagination offset, default 0Example:
{
"state": "2",
"priority": "1",
"limit": 20
}
Create a new incident.
Parameters:
short_description (required): Brief descriptioncaller_id (required): Caller sys_id or usernamedescription (optional): Detailed descriptionurgency (optional): 1=High, 2=Medium, 3=Lowimpact (optional): 1=High, 2=Medium, 3=Lowpriority (optional): 1-5assignment_group (optional): Group sys_id or nameassigned_to (optional): User sys_id or usernamecategory (optional): Categorysubcategory (optional): SubcategoryExample:
{
"short_description": "Email server down",
"caller_id": "john.doe",
"urgency": "1",
"impact": "1"
}
Update an existing incident.
Parameters:
incident_id (required): Incident number or sys_idstate (optional): New statepriority (optional): New priorityassigned_to (optional): Assign to userassignment_group (optional): Assign to groupwork_notes (optional): Add work notesclose_notes (optional): Close notesresolution_code (optional): Resolution codeshort_description (optional): Update descriptiondescription (optional): Update detailed descriptionExample:
{
"incident_id": "INC0010001",
"state": "2",
"assigned_to": "jane.smith",
"work_notes": "Investigating the issue"
}
Edit ~/.bob/settings/mcp_settings.json:
{
"mcpServers": {
"servicenow-sse": {
"url": "http://localhost:3000/sse",
"disabled": false,
"alwaysAllow": [],
"disabledTools": []
}
}
}
Note: For SSE servers, use url instead of command and args.
Edit ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"servicenow-sse": {
"url": "http://localhost:3000/sse"
}
}
}
After configuration, restart Bob or Claude Desktop to connect to the server.
# Health check
curl http://localhost:3000/health
# API info
curl http://localhost:3000/
# SSE connection (will stream events)
curl -N http://localhost:3000/sse
http://localhost:3000/ to see API informationhttp://localhost:3000/health to check server healthhttp://localhost:3000/health/sse (use EventSource)For production use, consider:
// Add to Express middleware
app.use((req, res, next) => {
const apiKey = req.headers['x-api-key'];
if (apiKey !== process.env.API_KEY) {
return res.status(401).json({ error: 'Unauthorized' });
}
next();
});
curl http://localhost:3000/health
Returns server status and configuration.
The server logs to console:
Use PM2 for production:
npm install -g pm2
pm2 start build/index.js --name servicenow-sse
pm2 logs servicenow-sse
pm2 restart servicenow-sse
# Find process using port 3000
lsof -i :3000
# Kill the process
kill -9 <PID>
# Or use a different port
export PORT=3001
npm start
The server has CORS enabled for all origins. If you need to restrict:
app.use(cors({
origin: 'https://your-domain.com',
methods: ['GET', 'POST'],
}));
itil rolenpm run dev
# Build
npm run build
# Start with PM2
pm2 start build/index.js --name servicenow-sse
# Or with systemd
sudo systemctl start servicenow-sse
FROM node:18-alpine
WORKDIR /app
COPY package*.json ./
RUN npm install
COPY . .
RUN npm run build
EXPOSE 3000
CMD ["node", "build/index.js"]
| Endpoint | Method | Description |
|---|---|---|
/ |
GET | API information and available tools |
/health |
GET | Health check and server status |
/sse |
GET | MCP SSE connection endpoint |
/message |
POST | MCP message handling (used by SSE) |
Both servers provide the same ServiceNow tools, but differ in access method:
Use Stdio Server when:
Use SSE Server when:
MIT
For issues or questions:
Добавь это в claude_desktop_config.json и перезапусти Claude Desktop.
{
"mcpServers": {
"servicenow-mcp-server-sse": {
"command": "npx",
"args": []
}
}
}