Claude-powered agent that manages ServiceNow incidents using MCP and AWS Bedrock
Project description
ServiceNow MCP Agent
Claude-powered agent that manages ServiceNow incidents from natural language using MCP and AWS Bedrock.
Describe IT issues, look up tickets, search by criteria, add notes, and resolve incidents -- all through a conversational interface powered by Claude.
Architecture
User Input (natural language)
|
v
agent.py (agentic loop)
|
v
Claude via AWS Bedrock
| (tool calls)
v
MCP Protocol (stdio)
|
v
server.py (6 tools)
| (HTTP GET / POST / PATCH)
v
ServiceNow REST API
|
v
Incidents created / queried / updated / resolved
agent.py -- Orchestrates the conversation loop. Sends user messages to Claude, executes tool calls via MCP, and returns results back to Claude until the task is complete.
server.py -- An MCP server that exposes six incident management tools. Handles authentication and communication with the ServiceNow Table API.
Tools
| Tool | Description |
|---|---|
create_incident |
Create a new incident from a natural language description |
get_incident |
Look up a single incident by number (e.g. INC0010054) |
search_incidents |
Search incidents by state, impact, category, assignment group, etc. |
update_incident |
Update fields on an existing incident (impact, urgency, assignment, etc.) |
add_comment |
Add a customer-visible comment or internal work note |
resolve_incident |
Resolve an incident with a close code and resolution notes |
Prerequisites
- Python 3.10+
- AWS CLI configured with a profile that has access to Amazon Bedrock
- A ServiceNow instance with REST API access (a developer instance works)
Installation
Option A: Install with pip
pip install servicenow-mcp-agent
Option B: Install from source
git clone https://github.com/Slalom-Consulting/servicenow-mcp-agent.git
cd servicenow-mcp-agent
pip install .
For development (editable install):
pip install -e .
Configure environment variables
Copy the example file and fill in your credentials:
cp .env.example .env
Edit .env:
SERVICENOW_INSTANCE_URL=https://your-instance.service-now.com
SERVICENOW_USERNAME=your-username
SERVICENOW_PASSWORD=your-password
AWS_REGION=us-east-1
AWS_PROFILE=default
Usage
servicenow-mcp-agent
Or run directly with Python:
python -m servicenow_mcp_agent.agent
Create an incident
You: Software 1 is having issues with Authentication. Can someone look into it
Assistant: Your incident has been created successfully!
Incident Number: INC0010054
Short Description: Authentication issues with Software 1
Category: Software
Impact: 2 - Medium
Urgency: 2 - Medium
Priority: 3 - Moderate
State: New
Look up an incident
You: What's the status of INC0010054?
Assistant: INC0010054 is currently in New state, Priority 3 - Moderate...
Search incidents
You: Show me all open high-priority software incidents
Assistant: Found 4 incident(s):
[INC0000015] I can't launch my VPN client since the last software update
State: 2 | Priority: 1 | Category: Software
...
Add a work note
You: Add a work note to INC0010054: Root cause identified - SSO certificate expired
Assistant: Work note added to incident INC0010054 successfully!
Update an incident
You: Escalate INC0010054 to high urgency
Assistant: Incident INC0010054 updated successfully!
Urgency: 1 - High
Resolve an incident
You: Resolve INC0010054. The fix was renewing the SSO certificate.
Assistant: Incident INC0010054 resolved successfully!
State: Resolved (6)
Close Code: Solution provided
Close Notes: Resolved by renewing the SSO certificate.
Type quit or exit to end the session.
Project Structure
servicenow-mcp-agent/
├── pyproject.toml # Package metadata, dependencies, entry points
├── src/
│ └── servicenow_mcp_agent/
│ ├── __init__.py # Package version
│ ├── agent.py # Main entry point - agentic loop
│ └── server.py # MCP server with 6 incident management tools
├── .env.example # Environment variable template
├── .env # Your credentials (git-ignored)
└── .gitignore
License
MIT
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file servicenow_mcp_agent-0.1.0.tar.gz.
File metadata
- Download URL: servicenow_mcp_agent-0.1.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
882b3a5d1d6f48c4d5dfc4681f9cd1efe601a32f707e555ccb5dca9b4187044a
|
|
| MD5 |
d37f2b23d80ad4a66b6ab6809cbbcd83
|
|
| BLAKE2b-256 |
eccca691545266a7cce84f3e4d2d23a2665b75a8e494097680b838ea18f08f58
|
File details
Details for the file servicenow_mcp_agent-0.1.0-py3-none-any.whl.
File metadata
- Download URL: servicenow_mcp_agent-0.1.0-py3-none-any.whl
- Upload date:
- Size: 11.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3fc447bcd6c22c3f75cc816b42752e8a55e0594fdf010fef960043b817f42cf6
|
|
| MD5 |
b796ab1b2ff6ff4da3194694e58a409e
|
|
| BLAKE2b-256 |
719ace19242d9f07a3eb88e4d89b1a4a05f0c16c635bd18715b2ac2bb9cc51dc
|