Understand incidents. Decide faster. Β· Sandy Android Works
Note: SnowLens is for ServiceNow (IT Service Management platform), NOT Snowflake (data warehouse). "Snow" refers to ServiceNow, and "Lens" means intelligent visibility.
SnowLens is an AI-powered SRE co-pilot that transforms ServiceNow into an intelligent system. It connects to your ServiceNow instance, understands incidents (not just displays them), summarizes critical information, detects patterns across historical data, and recommends actionable next steps to reduce MTTR (Mean Time To Resolution).
ServiceNow is an IT service management (ITSM) platform used by organizations to manage incidents, problems, changes, and IT operations. SnowLens makes ServiceNow smarter by adding AI-powered analysis and recommendations.
- Understand & Summarize - Auto-summarize incidents and surface the most relevant worknotes
- Detect Patterns - Automatically correlate historical incidents and surface repeating patterns
- Recommend Actions - Provide prioritized, actionable next steps and runbook guidance
Before you start, make sure you have these installed on your computer:
- Python 3.8 or higher - Download Python
- Node.js 16 or higher - Download Node.js
- npm (comes with Node.js)
- ServiceNow Instance Access - You need credentials for a ServiceNow instance (ask your IT admin or use a developer instance from ServiceNow Developer Program)
python --version # Should show Python 3.8+
node --version # Should show v16+
npm --version # Should show 8+# If using git
git clone <repository-url>
cd servicenow-mcp
# Or just navigate to your project folder
cd /path/to/servicenow-mcp# Install all Python packages needed for the backend
pip install fastapi uvicorn anthropic requests python-dotenvWhat these packages do:
fastapi- Web framework for building the APIuvicorn- Server to run the FastAPI applicationanthropic- Claude AI integrationrequests- Make HTTP requests to ServiceNowpython-dotenv- Load environment variables
# Navigate to the UI folder
cd ui
# Install all Node.js packages
npm install
# Go back to the main folder
cd ..Create a file named .env in the main project folder:
# Create .env file
touch .envAdd these lines to your .env file:
# ServiceNow Configuration
SERVICENOW_INSTANCE=your-instance-name
SERVICENOW_USERNAME=your-username
SERVICENOW_PASSWORD=your-password
# Anthropic API Key (for Claude AI)
ANTHROPIC_API_KEY=your-anthropic-api-key
# Optional: Server Configuration
API_PORT=6001
UI_PORT=5173Where to get these:
- ServiceNow credentials: Ask your ServiceNow admin
- Anthropic API Key: Get from Anthropic Console
# Make sure you're in the main project folder
cd /path/to/servicenow-mcp
# Start the FastAPI backend server
python sre_agent_api.pyWhat you should see:
INFO: Started server process [12345]
INFO: Waiting for application startup.
INFO: Application startup complete.
INFO: Uvicorn running on http://0.0.0.0:6001 (Press CTRL+C to quit)
The backend is now running on: http://localhost:6001
Open a new terminal window (keep the first one running!):
# Navigate to the UI folder
cd /path/to/servicenow-mcp/ui
# Start the React development server
npm run devWhat you should see:
VITE v5.x.x ready in 500 ms
β Local: http://localhost:5173/
β Network: use --host to expose
β press h + enter to show help
The UI is now running on: http://localhost:5173
If you want to run everything in the background:
# Start backend in background
nohup python sre_agent_api.py > backend.log 2>&1 &
# Start UI in background
cd ui
nohup npm run dev > ui.log 2>&1 &
cd ..To check logs:
# View backend logs
tail -f backend.log
# View UI logs
tail -f ui/ui.logTo stop background processes:
# Find process IDs
ps aux | grep "sre_agent_api.py"
ps aux | grep "vite"
# Kill processes (replace PID with actual process ID)
kill <PID>- Open your web browser
- Go to:
http://localhost:5173 - You'll see the SnowLens landing page
Demo Credentials:
- Username:
demo - PIN:
1234
Or create a new account by clicking "Get Started"
servicenow-mcp/
βββ sre_agent_api.py # Main FastAPI backend server
βββ sre_agent.py # Core SRE agent logic
βββ servicenow_server.py # ServiceNow MCP integration
βββ test_client.py # Testing utilities
βββ test_snow.py # ServiceNow connection tests
βββ conversations.json # Stored conversation history
βββ users.json # User accounts and PINs
βββ .env # Environment variables (create this!)
βββ README.md # This file
βββ ui/ # React frontend
βββ package.json # UI dependencies
βββ vite.config.js # Vite configuration
βββ index.html # HTML entry point
βββ src/
βββ main.jsx # React entry point
βββ App.jsx # Main React component
βββ index.css # Tailwind CSS styles
Solution:
# Find what's using port 6001
lsof -i :6001
# Kill the process (replace PID with actual number)
kill -9 <PID>
# Or use a different port by editing sre_agent_api.py
# Change: uvicorn.run(app, host="0.0.0.0", port=6001)
# To: uvicorn.run(app, host="0.0.0.0", port=6002)Solution:
# Reinstall Python dependencies
pip install --upgrade fastapi uvicorn anthropic requests python-dotenv
# Reinstall UI dependencies
cd ui
rm -rf node_modules package-lock.json
npm install
cd ..Solution:
- Make sure backend is running on port 6001
- Check
ui/src/App.jsx- API_BASE_URL should behttp://localhost:6001 - Check browser console (F12) for CORS errors
Solution:
- Verify your
.envfile has correct credentials - Test ServiceNow connection:
python test_snow.pySolution:
- Make sure ServiceNow credentials are correct
- Check that your ServiceNow instance is accessible
- Verify you have permission to read incidents in ServiceNow
# In your browser or using curl
curl http://localhost:6001/health
# Should return: {"status":"healthy"}python test_snow.py- Open
http://localhost:5173 - Login with demo/1234
- Type a question like "Show me recent incidents"
- Should see incidents from ServiceNow
- Press
CTRL + Cin each terminal window
# Find and kill backend
pkill -f "sre_agent_api.py"
# Find and kill UI server
pkill -f "vite"
# Or find process IDs and kill manually
ps aux | grep "python"
ps aux | grep "node"
kill <PID>- Edit files in
ui/src/ - Changes automatically reload in browser (hot reload)
- No need to restart the server
- Edit
sre_agent_api.pyor related files - Must restart the backend server (CTRL+C then run again)
# Backend logs (if running with nohup)
tail -f backend.log
# UI logs (if running with nohup)
tail -f ui/ui.log
# Or just watch the terminal where you started them- π User authentication with PIN
- π¬ Conversational AI interface powered by Claude
- π ServiceNow incident summarization
- π Pattern detection across historical ServiceNow incidents
- π ServiceNow worknote analysis
- π‘ Resolution recommendations based on similar incidents
- π Conversation history persistence
- π― Full analysis mode for deep incident investigation
- π Real-time ServiceNow integration via MCP
- Backend: FastAPI, Python 3.8+, Anthropic Claude AI
- Frontend: React 18, Vite, Tailwind CSS
- Integration: ServiceNow via Model Context Protocol (MCP)
- Platform: ServiceNow (ITSM), NOT Snowflake
Having issues? Here's what to check:
- β Python and Node.js installed?
- β All dependencies installed?
- β
.envfile configured? - β Both servers running?
- β Correct ports (6001 for API, 5173 for UI)?
- β ServiceNow credentials valid?
Β© 2025 Sandy Android Works. All rights reserved.
Built with β€οΈ using:
SnowLens v2.0 - Turn ServiceNow into an intelligent system π