ServiceNow FastMCP Server
MCP server that enables LLMs to interact with ServiceNow instances for managing incidents, users, stories, workflows, knowledge base articles, and script includes via the FastMCP framework.
README
ServiceNow FastMCP Server
A Model Context Protocol (MCP) server for ServiceNow, built with fastmcp.
Overview
This server allows LLMs to interact with ServiceNow instances to manage:
- Incidents
- Users and Groups
- Stories
- Workflows
- Knowledge Base Articles
- Script Includes
Architecture
The project follows a clean, modular architecture:
src/servicenow_mcp/
├── auth/ # Authentication handling (Basic, OAuth, API Key)
├── tools/ # MCP tool implementations
│ ├── incident_tools.py
│ ├── user_tools.py
│ ├── story_tools.py
│ ├── workflow_tools.py
│ ├── knowledge_base.py
│ └── script_include_tools.py
├── utils/ # Shared utilities
│ ├── http_client.py # Centralized HTTP client with SSL support
│ ├── helpers.py # Common helper functions
│ ├── config.py # Configuration models
│ └── logging_utils.py
├── application.py # FastMCP application setup
├── server.py # Main server entry point
└── server_sse.py # SSE server variant
Utility Modules
http_client.py
Centralized HTTP client providing:
- Unified interface for all HTTP methods (GET, POST, PUT, PATCH, DELETE)
- Automatic SSL certificate configuration for private network instances
- Consistent timeout and error handling
helpers.py
Common helper functions to reduce code duplication:
build_request_data()- Build request payloads from required/optional fieldsresolve_record_id()- Resolve ServiceNow identifiers to sys_idsformat_success_response()/format_error_response()- Standardized response formattingformat_list_response()- Pagination-aware list responsesextract_display_value()- Safely extract display values from ServiceNow fieldsis_sys_id()- Check if a string is a valid ServiceNow sys_id
Installation
- Create a virtual environment:
python -m venv .venv - Activate the virtual environment.
on Windows cmd
on Linux/macOS.venv\Scripts\activatesource .venv/bin/activate - Install the package:
pip install -e .
Configuration
Copy .env.example to .env and fill in your ServiceNow credentials.
SSL Configuration
The server supports flexible SSL verification settings to handle corporate networks, proxies, and self-signed certificates.
1. Default Secure Mode (Recommended) By default, SSL verification is enabled. If you use a custom corporate certificate, set the path:
# Uses the provided certificate for verification
SERVICENOW_SSL_CERT_PATH=C:\path\to\your\corporate-ca.crt
2. Disable SSL Verification (Testing Only)
To disable SSL verification (e.g., for local testing or dev instances), you must explicitly set the variable to true.
# API requests will skip SSL verification
SERVICENOW_DISABLE_SSL_VERIFY=true
Note: If
SERVICENOW_DISABLE_SSL_VERIFYis not present, or set tofalse, the server will default to secure verification (usingSERVICENOW_SSL_CERT_PATHif provided, or system defaults).
Usage
Run the server:
Windows (cmd)
.venv\Scripts\python.exe src\servicenow_mcp\server.py
Linux/macOS
.venv/bin/python src/servicenow_mcp/server.py
Debugging with MCP Inspector
The MCP Inspector is a browser-based tool for testing and debugging your MCP server. It connects to your server and allows you to interactively call tools.
Running the Inspector
Use npx to run the inspector, pointing it at the server entry point:
# On Windows (cmd)
.venv\Scripts\activate
set PYTHONPATH=src
npx @modelcontextprotocol/inspector python src/servicenow_mcp/server.py
# On Windows (PowerShell)
. .venv\Scripts\Activate.ps1
$env:PYTHONPATH = "src"
npx @modelcontextprotocol/inspector python src/servicenow_mcp/server.py
# On Linux/macOS
source .venv/bin/activate
PYTHONPATH=src npx @modelcontextprotocol/inspector python src/servicenow_mcp/server.py
This will:
- Start your ServiceNow MCP server.
- Open a browser window with the Inspector UI.
- Allow you to view available tools and call them interactively.
Using the Helper Script (Windows)
For convenience, a inspector.ps1 script is provided:
.\inspector.ps1
Remote Deployment (Streamable HTTP)
The server can run as a remote MCP server over Streamable HTTP so cloud AI clients (Claude Desktop, claude.ai, Claude Code) can connect:
# Streamable HTTP on 0.0.0.0:8080 at /mcp, protected by a bearer token
MCP_AUTH_TOKEN=<random-secret> servicenow-mcp-http
Key environment variables:
| Variable | Default | Purpose |
|---|---|---|
MCP_TRANSPORT |
http |
http (Streamable HTTP) or sse (legacy) |
MCP_HOST |
0.0.0.0 |
Bind interface (keep 0.0.0.0 for Docker/EC2) |
PORT |
8080 |
Listen port |
MCP_AUTH_TOKEN |
unset | If set, clients must send Authorization: Bearer <token>. Never expose the server publicly without it. |
See docs/DEPLOYMENT_EC2.md (local-only, not tracked in this repo) for a
complete AWS EC2 free-tier deployment guide (Docker + Caddy with automatic
HTTPS), client setup, OAuth upgrade path, and the scaling story.
Recommended Servers
playwright-mcp
A Model Context Protocol server that enables LLMs to interact with web pages through structured accessibility snapshots without requiring vision models or screenshots.
Magic Component Platform (MCP)
An AI-powered tool that generates modern UI components from natural language descriptions, integrating with popular IDEs to streamline UI development workflow.
Audiense Insights MCP Server
Enables interaction with Audiense Insights accounts via the Model Context Protocol, facilitating the extraction and analysis of marketing insights and audience data including demographics, behavior, and influencer engagement.
VeyraX MCP
Single MCP tool to connect all your favorite tools: Gmail, Calendar and 40 more.
graphlit-mcp-server
The Model Context Protocol (MCP) Server enables integration between MCP clients and the Graphlit service. Ingest anything from Slack to Gmail to podcast feeds, in addition to web crawling, into a Graphlit project - and then retrieve relevant contents from the MCP client.
Kagi MCP Server
An MCP server that integrates Kagi search capabilities with Claude AI, enabling Claude to perform real-time web searches when answering questions that require up-to-date information.
E2B
Using MCP to run code via e2b.
Neon Database
MCP server for interacting with Neon Management API and databases
Exa Search
A Model Context Protocol (MCP) server lets AI assistants like Claude use the Exa AI Search API for web searches. This setup allows AI models to get real-time web information in a safe and controlled way.
Qdrant Server
This repository is an example of how to create a MCP server for Qdrant, a vector search engine.