KodachiQube/ServiceNowMCP
If you are the rightful owner of ServiceNowMCP and would like to certify it and/or have it hosted online, please leave a comment on the right or send an email to henry@mcphub.com.
An Azure Functions-based MCP server for interacting with ServiceNow instances, providing a standardized interface for managing various ServiceNow resources.
create_incident
Create a new incident in ServiceNow.
update_incident
Update an existing incident in ServiceNow.
get_incident
Retrieve details of a specific incident.
create_change_request
Create a new change request in ServiceNow.
search_users
Search for users in the ServiceNow instance.
ServiceNow MCP (Model Context Protocol) Server
An Azure Functions-based MCP server for interacting with ServiceNow instances. This server provides a standardized interface for managing incidents, change requests, users, and other ServiceNow resources through the Model Context Protocol.
Architecture
The solution follows a clean architecture pattern with the following projects:
- ServiceNow.Core: Core domain models, interfaces, and constants
- ServiceNow.Services: Business logic and ServiceNow API client implementations
- ServiceNow.Functions: Azure Functions host and MCP server implementation
- ServiceNow.Tests: Unit and integration tests
Features
- Incident Management: Create, update, and query incidents
- Change Request Management: Manage change requests and their lifecycle
- User Management: Search and manage ServiceNow users
- Table Operations: Generic CRUD operations on ServiceNow tables
- MCP Protocol Support: Full implementation of the Model Context Protocol
Prerequisites
- .NET 8.0 SDK
- Azure Functions Core Tools v4
- ServiceNow instance with API access
- Valid ServiceNow credentials
Configuration
- Copy
src/ServiceNow.Functions/local.settings.json.example
tolocal.settings.json
- Update the configuration values:
{
"IsEncrypted": false,
"Values": {
"AzureWebJobsStorage": "UseDevelopmentStorage=true",
"FUNCTIONS_WORKER_RUNTIME": "dotnet-isolated",
"ServiceNow:InstanceUrl": "https://your-instance.service-now.com",
"ServiceNow:Username": "your-username",
"ServiceNow:Password": "your-password"
}
}
Running the Server
As an Azure Function
./scripts/run-azure-function.sh
As an MCP Server
./scripts/run-mcp-server.sh
Testing the MCP Server
./scripts/test-mcp-server.sh
Development
Building the Solution
dotnet build
Running Tests
dotnet test
Project Structure
ServiceNowMCP/
āāā src/
ā āāā ServiceNow.Core/ # Core domain layer
ā āāā ServiceNow.Services/ # Business logic layer
ā āāā ServiceNow.Functions/ # Azure Functions and MCP server
ā āāā ServiceNow.Tests/ # Test projects
āāā scripts/ # Utility scripts
āāā docs/ # Documentation
āāā ServiceNow.sln # Solution file
MCP Protocol Implementation
The server implements the following MCP capabilities:
- Tools: ServiceNow operations exposed as MCP tools
- Resources: ServiceNow data exposed as MCP resources
- Prompts: Pre-configured prompts for common operations
Available Tools
create_incident
: Create a new incidentupdate_incident
: Update an existing incidentget_incident
: Retrieve incident detailscreate_change_request
: Create a new change requestsearch_users
: Search for ServiceNow users- And more...
Contributing
- Fork the repository
- Create a feature branch
- Make your changes
- Run tests
- Submit a pull request
License
[Specify your license here]