Provides access to Zendesk API for managing tickets, users, organizations, automation, help center articles, and search, with AI-powered ticket analysis.
Click on "Install Server".
Wait a few minutes for the server to deploy. Once ready, it will show a "Started" state.
In the chat, type
@followed by the MCP server name and your instructions, e.g., "@Zendesk MCP Serverlist tickets assigned to me"
That's it! The server will respond to your query, and you can continue using it as needed.
Here is a step-by-step guide with screenshots.
Zendesk MCP Server
👁 npm version
👁 License: MIT
👁 Node.js Version
👁 MCP Compatible
A Model Context Protocol server for Zendesk API integration with AI-powered ticket analysis
Quick Start • Configuration • Tools • Architecture • Development
Overview
Zendesk MCP Server provides comprehensive access to the Zendesk API through the Model Context Protocol. It supports two transport modes that are auto-detected from environment variables:
Stdio mode — API token auth, for CLI-based MCP clients (Claude Code, Cursor, etc.)
HTTP mode — OAuth 2.1 with PKCE, for web-based MCP clients
Both modes expose the same set of tools. No code changes are needed to switch between them.
Based on mattcoatsworth/zendesk-mcp-server with significant enhancements including AI-powered features, dual-mode authentication, improved error handling, and comprehensive retry logic.
Related MCP server: Zendesk MCP Server
Quick Start
Stdio Mode (API Token)
Best for CLI-based MCP clients like Claude Code or Cursor. Each user only needs their own email + API token.
1. Get your API token from Zendesk Admin Center → Apps and integrations → APIs → Zendesk API → Add API token.
2. Configure your MCP client:
{
"zendesk": {
"type": "stdio",
"command": "npx",
"args": ["@sshadows/zendesk-mcp-server"],
"env": {
"ZENDESK_SUBDOMAIN": "your-subdomain",
"ZENDESK_EMAIL": "you@example.com",
"ZENDESK_API_TOKEN": "your-api-token"
}
}
}That's it. The server auto-detects stdio mode and connects.
HTTP Mode (OAuth 2.1)
Best for web-based MCP clients or multi-user deployments with centralized OAuth.
1. Create an OAuth app in Zendesk Admin Center → Apps and integrations → APIs → OAuth Clients.
2. Create a .env file:
ZENDESK_SUBDOMAIN=your-subdomain
ZENDESK_OAUTH_CLIENT_ID=your_client_id
ZENDESK_OAUTH_CLIENT_SECRET=your_client_secret
ZENDESK_OAUTH_REDIRECT_URI=http://localhost:3030/zendesk/oauth/callback3. Start and authorize:
npm start
# Visit http://localhost:3030/oauth/authorize in your browser4. Use the token with your MCP client: Authorization: Bearer mcp_...
Installation
Requirement | Version | Notes |
Node.js | >= 18.0.0 | Required |
Zendesk Account | Any plan | Required |
Anthropic API Key | - | Only for AI analysis features |
# npm (recommended)
npm install -g @sshadows/zendesk-mcp-server
# Or from source
git clone https://github.com/SShadowS/zendesk-mcp-server.git
cd zendesk-mcp-server
npm installConfiguration
Environment Variables
The server auto-detects which mode to use based on which variables are set.
Stdio mode (set ZENDESK_EMAIL + ZENDESK_API_TOKEN, without ZENDESK_OAUTH_CLIENT_ID):
ZENDESK_SUBDOMAIN=mycompany
ZENDESK_EMAIL=user@example.com
ZENDESK_API_TOKEN=your-api-tokenHTTP mode (set ZENDESK_OAUTH_CLIENT_ID):
ZENDESK_SUBDOMAIN=mycompany
ZENDESK_OAUTH_CLIENT_ID=your_client_id
ZENDESK_OAUTH_CLIENT_SECRET=your_client_secret
ZENDESK_OAUTH_REDIRECT_URI=http://localhost:3030/zendesk/oauth/callbackCommon (both modes):
MODE=full # 'full' (all 55 tools) or 'lite' (10 essential tools)
ANTHROPIC_API_KEY=sk-ant-... # Required for AI image/document analysis
ZENDESK_DEBUG=false # Enable debug loggingHTTP mode only:
PORT=3030
SERVER_BASE_URL=http://localhost:3030 # Use https:// in productionSee .env.example for the full list.
Tool Modes
Control which tools are exposed with the MODE environment variable:
full(default) — All 55 tools available.lite— 10 essential tools for reduced context usage:search,get_user,list_tickets,get_ticket,get_ticket_comments,add_ticket_comment,get_ticket_attachments,analyze_ticket_images,analyze_ticket_documents,get_document_summary.
MODE=lite npm startAvailable Tools
Tool | Description |
| List tickets with filters (status, assignee, etc.) |
| Get ticket details with optional comments |
| Create a new ticket |
| Update ticket fields |
| Get all comments on a ticket |
| Add public or internal comment |
| Get ticket attachments |
| AI-powered image analysis with Claude Vision |
| AI-powered document analysis |
| Quick document summary |
Tool | Description |
| List all users |
| Get user details |
| Create new user |
| Update user info |
| Delete a user |
Tool | Description |
| List all organizations |
| Get organization details |
| Create new organization |
| Update organization |
| Delete organization |
Category | Tools |
Groups |
|
Macros |
|
Views |
|
Triggers |
|
Automations |
|
Category | Tools |
Search |
|
Help Center |
|
Talk |
|
Chat |
|
Architecture
Transport Modes
src/index.js (auto-detection)
├── ZENDESK_EMAIL + ZENDESK_API_TOKEN → Stdio mode
│ ├── ZendeskClient.setApiTokenAuth()
│ ├── setDefaultZendeskClient(client)
│ └── StdioServerTransport (stdin/stdout)
│
└── ZENDESK_OAUTH_CLIENT_ID → HTTP mode
├── Express server (src/http-server.js)
├── OAuth 2.1 with PKCE (src/auth/)
├── Per-session ZendeskClient instances
└── StreamableHTTPServerTransportTools are identical in both modes. They call getZendeskClient() which resolves to:
HTTP mode: Per-session client via AsyncLocalStorage
Stdio mode: Singleton default client
Project Structure
zendesk-mcp-server/
├── src/
│ ├── index.js # Entry point (auto-detects mode)
│ ├── http-server.js # Express server with OAuth (HTTP mode only)
│ ├── server.js # MCP server setup and tool registration
│ ├── request-context.js # Per-session + default client context
│ ├── auth/
│ │ ├── oauth-handler.js # OAuth 2.1 with PKCE
│ │ ├── session-store.js # Session management
│ │ └── middleware.js # Bearer token auth middleware
│ ├── zendesk-client/
│ │ ├── base.js # Auth, HTTP requests, retry logic
│ │ ├── index.js # Mixin composition
│ │ ├── tickets.js # Ticket API methods
│ │ ├── users.js # User API methods
│ │ └── ... # Other API domain mixins
│ ├── tools/ # MCP tool implementations
│ ├── config/
│ │ └── tool-modes.js # Full/lite mode filtering
│ └── utils/
│ ├── errors.js # Classified error types
│ ├── retry.js # Exponential backoff
│ ├── ticket-context.js # AI prompt context builder
│ ├── document-handler.js # Document routing
│ └── converter-client.js # Office-to-PDF conversion
├── tests/ # Vitest test suite
├── .env.example # Environment variable template
└── CLAUDE.md # AI assistant project guideKey Design Decisions
Dual auth in one client:
ZendeskClientBasesupports bothsetApiTokenAuth()(Basic) andsetAccessToken()(Bearer). The_authModefield determines which headergetAuthHeader()returns.Default client fallback: AsyncLocalStorage doesn't propagate through StdioServerTransport's event callbacks. Instead of fighting that,
getZendeskClient()falls back to a module-level default client in stdio mode. Zero changes needed in any tool file.Console.error everywhere: In stdio mode, stdout is the MCP transport. All diagnostic logging in shared code paths uses
console.error.HTTP mode is unchanged:
src/http-server.jsandsrc/auth/*are only imported in HTTP mode. No changes were needed.
Development
npm start # Start server (auto-detects mode)
npm run dev # Start with auto-reload
npm test # Run all tests
npm run test:watch # Run tests in watch mode
npm run inspect # Launch MCP InspectorTesting
Tests use Vitest and are in tests/ mirroring the src/ directory:
npm test # Run all tests
npm run test:watch # Watch modeIntegration tests (against real Zendesk + Anthropic APIs) require .env credentials and are automatically skipped when credentials are missing.
HTTP Mode Endpoints
Endpoint | Description |
| Main MCP endpoint (requires Bearer token) |
| Start OAuth flow |
| OAuth callback |
| Token exchange |
| Dynamic client registration (RFC 7591) |
| OAuth metadata (RFC 8414) |
| Protected resource metadata (RFC 9728) |
| Health check |
Troubleshooting
The server needs either API token or OAuth credentials. Set one of:
# Stdio mode
ZENDESK_SUBDOMAIN=... ZENDESK_EMAIL=... ZENDESK_API_TOKEN=...
# HTTP mode
ZENDESK_SUBDOMAIN=... ZENDESK_OAUTH_CLIENT_ID=... ZENDESK_OAUTH_CLIENT_SECRET=...Complete OAuth flow: visit
http://localhost:3030/oauth/authorizeCheck if token expired (24-hour TTL) — re-authorize if needed
Ensure Bearer token is included:
Authorization: Bearer mcp_xxxToken format should start with
mcp_
Verify
ZENDESK_EMAILis correctVerify
ZENDESK_API_TOKENis a valid API token (not a password)Verify
ZENDESK_SUBDOMAINis correctCheck the connection test output in stderr on startup
In-memory sessions are cleared on restart. Re-authorize to get a new token. For production, implement a Redis-based session store (see src/auth/session-store.js).
Set ANTHROPIC_API_KEY in your environment. This is only needed for analyze_ticket_images, analyze_ticket_documents, and get_document_summary.
The server includes exponential backoff retry logic. If you hit rate limits frequently, consider using MODE=lite to reduce API calls, or check if multiple clients share the same credentials.
Contributing
Fork the repository
Create your feature branch (
git checkout -b feature/my-feature)Run tests (
npm test)Commit your changes
Open a Pull Request
License
MIT License — see LICENSE for details.
Acknowledgments
Original implementation by @mattcoatsworth
Built with Model Context Protocol
AI features powered by Anthropic Claude
Made with care by SShadowS
Maintenance
Resources
Unclaimed servers have limited discoverability.
Looking for Admin?
If you are the server author, to access and configure the admin panel.
Latest Blog Posts
MCP directory API
We provide all the information about MCP servers via our MCP API.
curl -X GET 'https://glama.ai/api/mcp/v1/servers/SShadowS/zendesk-mcp-server'
If you have feedback or need assistance with the MCP directory API, please join our Discord server
