Service Desk Plus MCP Server

Service Desk Plus MCP Server

Integrates with Service Desk Plus Cloud API to enable AI assistants perform CRUD operations on service desk entities, including request management, technician management, and email communication.

Category
访问服务器

README

Service Desk Plus MCP Server

A Model Context Protocol (MCP) server that integrates with Service Desk Plus Cloud API, enabling AI assistants to perform CRUD operations on all Service Desk Plus entities.

🚀 Current Status (January 2025)

🎉 PRODUCTION READY - Complete Service Desk Plus MCP Server
ALL 16 TOOLS WORKING PERFECTLY (100% Success Rate)
Enterprise Grade - Full ITSM integration with comprehensive OAuth scopes
Email Communication - Reply to requesters with ticket conversation integration
Zero OAuth Issues - Bulletproof token management with rate limit protection
Complete Testing - All tools validated through comprehensive client testing
Production Ready - Robust error handling and business rule compliance

Recent Improvements

  • 🔧 Fixed Authorization header format from Bearer to Zoho-oauthtoken
  • 🔧 Added subcategory as mandatory field for request creation
  • 🔧 Implemented proper list_info structure with search_criteria
  • 🔧 Added advanced search capabilities with complex criteria
  • 🔧 Created comprehensive OAuth and search documentation
  • 🔧 Mock API now perfectly replicates real API behaviors
  • 🔧 NEW: Email communication tools for requester replies
  • 🔧 NEW: Private notes and first response functionality
  • 🔧 NEW: Full conversation history retrieval

Tool Status

  • list_requests - Working with proper search_criteria
  • get_request - Working
  • search_requests - Enhanced with advanced criteria support
  • get_metadata - Working
  • add_note - Working
  • reply_to_requester - NEW - Email reply functionality working
  • add_private_note - NEW - Private notes working
  • send_first_response - NEW - First response with email working
  • get_request_conversation - NEW - Conversation history working
  • list_technicians - Working with fallback to /users endpoint
  • get_technician - Working
  • find_technician - Working
  • create_request - Fixed with subcategory support
  • update_request - Working (priority updates blocked by API design)
  • close_request - Working with proper closure handling
  • claude_code_command - Working

Working Implementation

  • Architecture: Direct MCP protocol over Server-Sent Events (SSE)
  • Location: sdp-mcp-server/src/working-sse-server.cjs
  • Status: All Service Desk Plus tools operational
  • Client: Successfully tested with Claude Code

📋 Available Tools

Request Management

  1. list_requests - List service desk requests with optional filters
  2. get_request - Get detailed information about a specific request
  3. search_requests - Search requests using various criteria
  4. create_request - Create new service desk requests
  5. update_request - Update existing requests
  6. close_request - Close requests with closure information
  7. add_note - Add notes to existing requests

Email Communication (NEW)

  1. reply_to_requester - Send email reply to requester (appears in ticket conversation)
  2. add_private_note - Add private note not visible to requester
  3. send_first_response - Send first response with email notification
  4. get_request_conversation - Get full conversation history

Technician Management

  1. list_technicians - List available technicians for assignment
  2. get_technician - Get detailed technician information
  3. find_technician - Find technician by name or email

Utilities

  1. get_metadata - Get valid field values for dropdowns
  2. claude_code_command - Execute Claude Code commands

🔧 Recent Fixes & Improvements

OAuth Authentication

  • Fixed authorization header format: Zoho-oauthtoken instead of Bearer
  • Implemented singleton OAuth client to prevent rate limiting
  • Added global refresh lock to prevent concurrent token refreshes
  • Tokens now properly reused until expiry

API Field Handling

  • Added mandatory subcategory field for request creation
  • Fixed status filtering using proper search_criteria format
  • Implemented API maximum of 100 rows per request
  • Added support for complex search queries with logical operators

Mock API Server

  • Complete replication of real API behaviors
  • Includes all error responses and business rules
  • Test data includes Clay Meuth technician (ID: 216826000000006907)
  • Supports both /technicians and /users endpoints

🔧 Quick Start

Prerequisites

  • Node.js 18+
  • Service Desk Plus Cloud account with OAuth credentials
  • Permanent refresh token (never expires!)

Setup

  1. Clone the repository
git clone https://github.com/PTTG-IT/SDP-MCP.git
cd SDP-MCP/sdp-mcp-server
  1. Install dependencies
npm install
  1. Configure environment
cp .env.example .env
# Edit .env with your OAuth credentials
  1. Start the server
./start-sse-server.sh

The server will start on port 3456.

Client Configuration

For Claude Code or other MCP clients:

{
  "mcpServers": {
    "service-desk-plus": {
      "command": "npx",
      "args": ["mcp-remote", "http://localhost:3456/sse", "--allow-http"]
    }
  }
}

For remote access:

{
  "mcpServers": {
    "service-desk-plus": {
      "command": "npx",
      "args": ["mcp-remote", "http://192.168.2.10:3456/sse", "--allow-http"]
    }
  }
}

For Windows VS Code:

{
  "mcpServers": {
    "service-desk-plus": {
      "command": "npx",
      "args": ["-y", "mcp-remote", "http://10.212.0.7:3456/sse", "--allow-http"]
    }
  }
}

🧪 Testing with Mock API

The project includes a complete mock API server for safe testing:

# Start mock API server (port 3457)
npm run mock:api

# Use mock API with SSE server
export SDP_USE_MOCK_API=true
./start-sse-server.sh

The mock API:

  • Replicates exact error responses from real API
  • Enforces same business rules (can't update closed tickets)
  • Includes test data with is_mock: true identifier
  • Perfect for development and testing

📚 Documentation

Knowledge Base

  • example/knowledge/service-desk-plus-authentication.md - OAuth implementation guide
  • example/knowledge/service-desk-plus-oauth-complete.md - Complete OAuth reference
  • example/knowledge/service-desk-plus-search-criteria.md - Advanced search guide
  • example/knowledge/service-desk-plus-mandatory-fields.md - Required fields reference
  • example/knowledge/service-desk-plus-sse-implementation.md - SSE server details

API Documentation

  • Main Documentation: https://www.manageengine.com/products/service-desk/sdpod-v3-api/
  • OAuth Guide: https://www.manageengine.com/products/service-desk/sdpod-v3-api/getting-started/oauth-2.0.html

🔑 OAuth Configuration

Required Environment Variables

# Service Desk Plus Configuration
SDP_BASE_URL=https://helpdesk.yourdomain.com   # Custom domain
SDP_INSTANCE_NAME=itdesk                       # Instance name
SDP_PORTAL_NAME=yourportal                     # Portal name
SDP_DATA_CENTER=US                             # Data center (US, EU, IN, AU, JP, UK, CA, CN)

# OAuth Credentials
SDP_OAUTH_CLIENT_ID=your_client_id
SDP_OAUTH_CLIENT_SECRET=your_client_secret_here
SDP_OAUTH_REFRESH_TOKEN=your_permanent_refresh_token_here

# Optional: Use mock API for testing
SDP_USE_MOCK_API=false

OAuth Setup Steps

  1. Create a self-client OAuth app in Service Desk Plus
  2. Generate authorization code with required scopes
  3. Exchange code for permanent refresh token
  4. Configure .env with credentials

See docs/OAUTH_SETUP_GUIDE.md for detailed instructions.

🏗️ Architecture

Current Implementation (Single-Tenant)

  • Direct MCP protocol implementation over SSE
  • OAuth tokens configured via environment variables
  • Singleton OAuth client prevents rate limiting issues
  • Smart token refresh only on 401 errors
  • Production-ready and fully tested

Future Multi-Tenant Architecture

When MCP protocol evolves to support stateless connections:

  • Multiple clients connecting to single server
  • Per-tenant OAuth token management
  • Complete tenant isolation
  • Database-backed token storage

🐛 Troubleshooting

Common Issues

  1. OAuth Rate Limiting

    • Error: "You have made too many requests continuously"
    • Solution: Wait 5-15 minutes, server implements proper token reuse
  2. Field Validation Errors (4012)

    • Error: Missing mandatory fields
    • Solution: Check instance configuration for required fields
  3. Priority Update Errors (403)

    • Error: "Cannot give value for priority"
    • Solution: This is an API limitation, priority may not be updatable
  4. Authentication Errors (401)

    • Error: "UNAUTHORISED"
    • Solution: Verify OAuth tokens and custom domain configuration

Debug Mode

# Enable debug logging
export DEBUG=sdp:*
./start-sse-server.sh

🤝 Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

📄 License

This project is licensed under the MIT License - see the LICENSE file for details.

🙏 Acknowledgments

  • ManageEngine for Service Desk Plus API
  • Anthropic for the Model Context Protocol
  • Claude Code for testing and integration

📞 Support

For issues and questions:

  • GitHub Issues: https://github.com/PTTG-IT/SDP-MCP/issues
  • Documentation: Check example/knowledge/ folder
  • API Reference: https://www.manageengine.com/products/service-desk/sdpod-v3-api/

Note: This is for Service Desk Plus Cloud (SDPOnDemand), not on-premises installations.

推荐服务器

Baidu Map

Baidu Map

百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。

官方
精选
JavaScript
Playwright MCP Server

Playwright MCP Server

一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。

官方
精选
TypeScript
Magic Component Platform (MCP)

Magic Component Platform (MCP)

一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。

官方
精选
本地
TypeScript
Audiense Insights MCP Server

Audiense Insights MCP Server

通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。

官方
精选
本地
TypeScript
VeyraX

VeyraX

一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。

官方
精选
本地
graphlit-mcp-server

graphlit-mcp-server

模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。

官方
精选
TypeScript
Kagi MCP Server

Kagi MCP Server

一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。

官方
精选
Python
e2b-mcp-server

e2b-mcp-server

使用 MCP 通过 e2b 运行代码。

官方
精选
Neon MCP Server

Neon MCP Server

用于与 Neon 管理 API 和数据库交互的 MCP 服务器

官方
精选
Exa MCP Server

Exa MCP Server

模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。

官方
精选