Skip to main content

MCP for ServiceNow

Project description

Python Version MCP Compatible ServiceNow License: MIT Status

๐ŸŽฏ Transform ServiceNow data access with natural language commands

Export ServiceNow table data effortlessly using voice commands and AI - no complex APIs needed!

๐Ÿš€ Quick Start โ€ข ๐Ÿ“– Documentation โ€ข ๐Ÿ’ก Examples โ€ข ๐Ÿค Contributing


๐Ÿ“‹ Table of Contents

๐ŸŒŸ Overview

The ServiceNow MCP Server is a cutting-edge Model Context Protocol server that revolutionizes how you interact with ServiceNow data. By combining the power of AI with intuitive natural language processing, this tool transforms complex ServiceNow API operations into simple conversational commands.

graph TD
    A[๐Ÿ‘ค User Voice Command] --> B[๐Ÿค– Claude AI]
    B --> C[๐Ÿ”ง MCP Server]
    C --> D[๐ŸŒ ServiceNow API]
    D --> E[๐Ÿ“Š Data Processing]
    E --> F[๐Ÿ“ File Export]
    F --> G[๐Ÿ’พ Downloads Folder]

๐ŸŽฏ Why Choose ServiceNow MCP Server?

  • ๐Ÿ—ฃ๏ธ Voice-Controlled: Use natural language commands instead of complex API calls
  • ๐Ÿง  AI-Powered: Intelligent table name resolution from conversational descriptions
  • โšก Lightning Fast: Optimized async operations for rapid data retrieval
  • ๐Ÿ”’ Secure: Built-in authentication and error handling
  • ๐Ÿ“ฑ Cross-Platform: Works on Windows, macOS, and Linux
  • ๐ŸŽจ Multiple Formats: Export to CSV, XML, or both simultaneously

โœจ Key Features

๐ŸŽค Natural Language Interface

  • Convert "export server data" to actual table queries
  • NEW: [table_name] bracket syntax support
  • Command: "Export data from Server[cmdb_ci_server] table"
  • Voice command support through Claude AI integration

๐Ÿ“Š Smart Data Export

  • Multiple export formats (CSV, XML, both)
  • XML format as default (per requirements)
  • Automatic file naming with timestamps
  • File attachment support for Claude AI

๐Ÿ”ง Advanced API Support

  • REST API integration (default)
  • SOAP API support (new)
  • ๐Ÿš€ UNLIMITED RECORD EXPORT - Handles millions of records
  • ๐Ÿ“Š Pagination and chunked processing for memory efficiency
  • Custom query filters with ServiceNow syntax
  • Field selection for targeted exports

๐Ÿ›ก๏ธ Enterprise Ready

  • Robust error handling and logging
  • Secure authentication with environment variables
  • Production-ready async architecture
  • Cross-platform file handling

๐Ÿ—๏ธ Architecture

๐Ÿ” Click to expand architecture details

System Components

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚   Claude AI     โ”‚โ”€โ”€โ”€โ–ถโ”‚   MCP Server     โ”‚โ”€โ”€โ”€โ–ถโ”‚   ServiceNow    โ”‚
โ”‚                 โ”‚    โ”‚                  โ”‚    โ”‚                 โ”‚
โ”‚ โ€ข NL Processing โ”‚    โ”‚ โ€ข Table Mapping  โ”‚    โ”‚ โ€ข REST API      โ”‚
โ”‚ โ€ข Tool Calling  โ”‚    โ”‚ โ€ข Data Export    โ”‚    โ”‚ โ€ข Authenticationโ”‚
โ”‚ โ€ข User Interfaceโ”‚    โ”‚ โ€ข File Generationโ”‚    โ”‚ โ€ข Data Storage  โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜
                                โ”‚
                                โ–ผ
                       โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
                       โ”‚ Local File Systemโ”‚
                       โ”‚                  โ”‚
                       โ”‚ โ€ข Downloads Folderโ”‚
                       โ”‚ โ€ข CSV/XML Files  โ”‚
                       โ”‚ โ€ข Auto Naming    โ”‚
                       โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Data Flow

  1. Input: User provides natural language command
  2. Processing: Claude AI interprets and calls appropriate MCP tool
  3. Resolution: MCP server resolves table names and builds queries
  4. Retrieval: Secure API calls to ServiceNow instance
  5. Transformation: Data converted to requested format(s)
  6. Output: Files saved to Downloads folder with confirmation

โšก Quick Start

๐Ÿš€ 1-Minute Setup with Claude

# Clone the repository
git clone https://github.com/mallikarjunservicenow/ServiceNow_MCP
cd ServiceNow_MCP

# Install dependencies
pip install -r requirements.txt

# Configure Claude Desktop (see Configuration section)
# Add the servicenow-client configuration to your Claude config

# Restart Claude Desktop
# Start using natural language commands!

๐ŸŽฏ First Export with Claude

Once configured in Claude Desktop, try these natural language commands:

๐Ÿ’ฌ "Export the server table from ServiceNow"

๐Ÿ’ฌ "Get me incident data in XML format"

๐Ÿ’ฌ "Show me all available ServiceNow tables"

๐Ÿ’ฌ "Export users with both CSV and XML formats"

๐Ÿ”„ Workflow Integration

graph LR
    A[๐Ÿ‘ค User in Claude] --> B[๐Ÿ’ฌ Natural Language]
    B --> C[๐Ÿ”ง MCP Server]
    C --> D[๐ŸŒ ServiceNow API]
    D --> E[๐Ÿ“Š Data Export]
    E --> F[๐Ÿ“ Claude Attachment]

๐Ÿ”ง Installation

Prerequisites

Requirement Version Purpose
Python 3.8+ Runtime environment
ServiceNow Instance Any Data source
Claude AI Access Latest Natural language interface

Step-by-Step Installation

๐Ÿ“ฆ Detailed Installation Guide
  1. Clone Repository

    git clone https://github.com/mallikarjunservicenow/ServiceNow_MCP
    cd ServiceNow_MCP
    
  2. Create Virtual Environment

    python -m venv venv
    source venv/bin/activate  # On Windows: venv\Scripts\activate
    
  3. Install Dependencies

    pip install -r requirements.txt
    
  4. Environment Setup

    cp .env.example .env
    

    Edit .env file:

    SERVICENOW_INSTANCE=https://your-instance.service-now.com
    SERVICENOW_USERNAME=your_username
    SERVICENOW_PASSWORD=your_password
    
  5. Verify Installation

    python -c "import main; print('โœ… Installation successful!')"
    

Requirements

# Core dependencies
fastmcp>=0.1.0
httpx>=0.24.0
python-dotenv>=1.0.0

# Optional enhancements
rich>=13.0.0        # Better console output
typer>=0.9.0        # CLI interface
pytest>=7.0.0       # Testing framework

โš™๏ธ Configuration

Claude Desktop Configuration

To use this MCP server with Claude Desktop, add the following configuration to your Claude config file:

Location:

  • Windows: %APPDATA%\Claude\claude_desktop_config.json
  • macOS: ~/Library/Application Support/Claude/claude_desktop_config.json
{
  "mcpServers": {
    "servicenow-client": {
      "command": "servicenow-mcp",
      "args": [],
      "env": {
        "SERVICENOW_INSTANCE": "https://your_instance_id.service-now.com",
        "SERVICENOW_USERNAME": "your_username",
        "SERVICENOW_PASSWORD": "your_password"
      }
    }
  }
}

โš ๏ธ Security Note: Replace the example credentials with your actual ServiceNow instance details. For production use, consider using environment variables or secure credential management.

Environment Variables

Variable Description Example Required
SERVICENOW_INSTANCE Your ServiceNow instance URL https://your_instance_id.service-now.com โœ…
SERVICENOW_USERNAME ServiceNow username your_username โœ…
SERVICENOW_PASSWORD ServiceNow password your_password โœ…

Alternative: Environment File Setup

Create a .env file in the project root:

SERVICENOW_INSTANCE=https://your_instance_id.service-now.com
SERVICENOW_USERNAME=your_username
SERVICENOW_PASSWORD=your_password

### ๐Ÿš€ Claude Integration Quick Start

1. **Install the MCP server** following the installation steps above
2. **Update Claude config** with the servicenow-client configuration
3. **Restart Claude Desktop** to load the new MCP server
4. **Start chatting** with natural language commands like:
   - *"Export the server table from ServiceNow"*
   - *"Get me all incidents in XML format"*
   - *"Show me the available ServiceNow tables"*

### ๐Ÿ”ง Advanced Configuration Options

<details>
<summary><strong>๐Ÿ” Click to see advanced settings</strong></summary>

You can customize the MCP server behavior by adding additional environment variables:

```json
{
  "mcpServers": {
    "servicenow-client": {
      "command": "servicenow-mcp",
      "args": ["--verbose", "--max-records=1000"],
      "env": {
        "SERVICENOW_INSTANCE": "https://your-instance.service-now.com",
        "SERVICENOW_USERNAME": "your_username",
        "SERVICENOW_PASSWORD": "your_password",
        "DEBUG": "1",
        "DEFAULT_FORMAT": "xml",
        "DOWNLOAD_PATH": "C:\\Custom\\Downloads"
      }
    }
  }
}

Additional Environment Variables:

  • DEBUG: Enable debug logging (set to "1")
  • DEFAULT_FORMAT: Set default export format ("csv", "xml", "both")
  • DOWNLOAD_PATH: Custom download directory path
  • MAX_RECORDS: Default maximum records to export

๐Ÿ’ก Usage Examples

Natural Language Commands

Try these conversational commands with Claude:

"Export all incidents from ServiceNow"
"Get me user data in XML format"
"Show available tables in ServiceNow"
"Export server information with both CSV and XML"
"Get cmdb_ci_server table data"

Advanced Queries

"Export incidents where state is active"
"Get all users created this month"
"Export server data with specific fields only"

๐ŸŽ›๏ธ Available Tools

The MCP server provides these tools for Claude AI:

  • export_servicenow_table: Main export functionality
  • list_available_tables: Browse ServiceNow tables
  • get_table_schema: View table structure
  • test_connection: Verify ServiceNow connectivity

๐Ÿ“Š Supported Formats

  • CSV: Comma-separated values (Excel compatible)
  • XML: Structured XML format (ServiceNow native)
  • Both: Generate both formats simultaneously

๐Ÿ—บ๏ธ Table Mappings

Common table aliases supported:

Alias Actual Table Description
incidents incident Service incidents
users sys_user System users
servers cmdb_ci_server Server CIs
changes change_request Change requests

๐Ÿ”’ Authentication

The server supports ServiceNow basic authentication. Ensure your ServiceNow user has appropriate read permissions for the tables you want to export.

๐Ÿ› Troubleshooting

Common Issues:

  1. Connection failed: Check ServiceNow instance URL and credentials
  2. Permission denied: Verify user has table read access
  3. Large exports: Use pagination for tables with millions of records

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

servicenow_mcp-0.1.1.tar.gz (25.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

servicenow_mcp-0.1.1-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file servicenow_mcp-0.1.1.tar.gz.

File metadata

  • Download URL: servicenow_mcp-0.1.1.tar.gz
  • Upload date:
  • Size: 25.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for servicenow_mcp-0.1.1.tar.gz
Algorithm Hash digest
SHA256 bbd95d603d03384501e72e9768983ed85e614133d61dd45b53354ea2bbb6e050
MD5 633b0c40143f561799ecec2a89a6af1e
BLAKE2b-256 5923ce910643f46d2eb3b6c350591692053b0004f3e086bb276a178689c8457d

See more details on using hashes here.

Provenance

The following attestation bundles were made for servicenow_mcp-0.1.1.tar.gz:

Publisher: publish.yml on mallikarjunservicenow/ServiceNow_MCP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file servicenow_mcp-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: servicenow_mcp-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for servicenow_mcp-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 a499f2d6073295b87afa0056be8d230e82520814cb15d2603b942e297ea7b8df
MD5 b2f9c0f24e4f8736ffd6f9ac170b602b
BLAKE2b-256 6ba28767d605d76118d8ed8d1fdc761d2213e235a36fbadde3338ae5fd4f655c

See more details on using hashes here.

Provenance

The following attestation bundles were made for servicenow_mcp-0.1.1-py3-none-any.whl:

Publisher: publish.yml on mallikarjunservicenow/ServiceNow_MCP

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page