tokenless-zendesk-mcp
MCP server that authenticates via browser session cookies to access Zendesk's REST API without API tokens, supporting reads and writes with agent permissions.
README
Tokenless Zendesk MCP Server
An MCP server for Zendesk. You sign in once in a real browser (Playwright) — any method works, including SSO and 2FA — and the resulting session cookies are then used to call the Zendesk REST API directly. No API token, OAuth client, or admin setup required: it acts with exactly your agent account's permissions.
This is the same way Zendesk's own agent web UI talks to its API — a valid session
cookie is all a GET request needs (no CSRF token is required for reads).
What it can do
Reads
| Tool | Description |
|---|---|
zendesk_login |
Open a visible browser to sign in (password / SSO / 2FA). Saves the session cookies + CSRF token. |
zendesk_session_status |
Check whether a saved session exists and is still valid (calls the API as the current user). |
zendesk_list_views |
List the agent's active views with numeric IDs, titles, and cached ticket counts. |
zendesk_fetch_view_tickets |
Fetch tickets in a view, following pagination (limit caps the count). |
zendesk_search |
Search via /api/v2/search — any Zendesk query string; returns results tagged by type. |
zendesk_get_ticket |
Subject, status, parties, tags, custom fields (incl. product), full comment thread, and attachments. |
zendesk_download_attachment |
Download an attachment (by its content_url from get_ticket) to a path or directory. |
zendesk_requester_tickets |
List the tickets a user has requested (their history) — "have they reported this before?". |
zendesk_organization_tickets |
List tickets belonging to an organization. |
zendesk_ticket_fields |
Field definitions with valid dropdown/tagger option values — look up the value to set a custom field. |
zendesk_ticket_metrics |
SLA / timing metrics for a ticket (reply time, resolution time, reopens, replies). |
zendesk_list_macros |
List active macros with ids and titles (for zendesk_apply_macro). |
zendesk_search_users |
Find users by free-text (name, email, …). |
zendesk_get_user |
Fetch one user by id. |
zendesk_ticket_audits |
Full audit trail (every change/event) for a ticket. |
zendesk_request |
Read-only passthrough to any /api/v2 endpoint — for anything the dedicated tools don't cover. |
Writes (require the CSRF token — see Writes below)
| Tool | Description |
|---|---|
zendesk_add_comment |
Add a public reply or internal note to a ticket. |
zendesk_update_ticket |
Set status, priority, type, assignee, group, tags, and custom fields (optionally with a comment). |
zendesk_apply_macro |
Apply a macro and persist its changes (status/fields/comment) to a ticket. |
Attachments. zendesk_get_ticket returns an attachments array; each item has
an id, file_name, content_url, content_type, and size. Pass an attachment's
content_url to zendesk_download_attachment along with a destination (a file
path, or a directory to save under the original filename). Downloads use the
authenticated session, so private attachments work.
zendesk_request unlocks the rest of the Zendesk REST
API for reads — e.g.
tickets/123/audits, ticket_metrics, organizations, users/123,
satisfaction_ratings. It is GET-only by design (write operations would require a
CSRF token, which is out of scope).
How auth works
You sign in once in a real browser window. Playwright saves the resulting
cookies to ~/.zendesk-mcp/storageState.json. Every other tool reads the cookies
scoped to your instance and replays them as a Cookie header against
https://{subdomain}.zendesk.com/api/v2/…. When the session expires the API
returns 401/403 and the tool returns a clear "run zendesk_login" message.
The session file holds live auth cookies — it's git-ignored. Treat it like a password.
Writes (CSRF)
GET requests authenticate with the session cookie alone. Write requests
(POST/PUT/DELETE) additionally require Zendesk's CSRF token — the same
one the agent UI uses. It's captured at login (from the agent page's
<meta name="csrf-token">) and saved to ~/.zendesk-mcp/csrf.txt. The token is
stable for the life of the session; if it ever goes stale, the server fetches a
fresh one automatically and retries the write once. The write tools
(zendesk_add_comment, zendesk_update_ticket, zendesk_apply_macro) modify
real tickets — confirm changes with the user before sending.
Add to Claude Code
No clone, no build — just point your MCP config at npx. Add to your .mcp.json
(or Claude Desktop config), replacing youracme with your Zendesk subdomain:
{
"mcpServers": {
"zendesk": {
"command": "npx",
"args": ["-y", "tokenless-zendesk-mcp"],
"env": {
"ZENDESK_SUBDOMAIN": "youracme"
}
}
}
}
Or with the CLI: claude mcp add zendesk -e ZENDESK_SUBDOMAIN=youracme -- npx -y tokenless-zendesk-mcp
First login
You sign in once in a real browser window. Run the bundled login subcommand
(it downloads Chromium on first use, then opens the window):
ZENDESK_SUBDOMAIN=youracme npx -y tokenless-zendesk-mcp login
- macOS / Windows / Linux desktop: a Chromium window opens — sign in, done.
- WSL2: you need WSLg (Windows 11) or an X server so the window can show.
If the window can't open, run the login on the Windows host, or set
DISPLAY.
You can also trigger login from inside Claude with the zendesk_login tool, but
the standalone command is more reliable since not every MCP host surfaces the window.
From source (contributors)
npm install
npm run build
ZENDESK_SUBDOMAIN=youracme npm run login # one-time browser sign-in
Then point your MCP config at the build instead of npx:
{
"mcpServers": {
"zendesk": {
"command": "node",
"args": ["/path/to/tokenless-zendesk-mcp/dist/index.js"],
"env": { "ZENDESK_SUBDOMAIN": "youracme" }
}
}
}
See CONTRIBUTING.md for the release process and how publishing is configured.
Configuration (env vars)
| Var | Default | Purpose |
|---|---|---|
ZENDESK_SUBDOMAIN |
— (required) | The {subdomain} in https://{subdomain}.zendesk.com. |
ZENDESK_SESSION_DIR |
~/.zendesk-mcp |
Where the saved session lives. |
ZENDESK_API_TIMEOUT |
30000 |
Per-request timeout in ms. |
ZENDESK_LOGIN_TIMEOUT |
300000 |
How long the login window waits for you to finish signing in, in ms. |
Verify
After building and logging in:
ZENDESK_SUBDOMAIN=youracme node scripts/verify.mjs
It calls me, listViews, search, and getTicket against your live instance.
Notes & limitations
- Auth is session-cookie based. Cookies expire (and SSO sessions time out), so
you'll re-run
zendesk_loginperiodically. - It respects whatever permissions your agent account has — nothing more.
- The API is paginated; list tools cap results (
limit) and page 100 at a time. Rate-limited (429) responses are retried honoringRetry-After. - Writes are supported via the session CSRF token (see Writes). They act with your agent permissions — review changes before sending.
推荐服务器
Baidu Map
百度地图核心API现已全面兼容MCP协议,是国内首家兼容MCP协议的地图服务商。
Playwright MCP Server
一个模型上下文协议服务器,它使大型语言模型能够通过结构化的可访问性快照与网页进行交互,而无需视觉模型或屏幕截图。
Magic Component Platform (MCP)
一个由人工智能驱动的工具,可以从自然语言描述生成现代化的用户界面组件,并与流行的集成开发环境(IDE)集成,从而简化用户界面开发流程。
Audiense Insights MCP Server
通过模型上下文协议启用与 Audiense Insights 账户的交互,从而促进营销洞察和受众数据的提取和分析,包括人口统计信息、行为和影响者互动。
VeyraX
一个单一的 MCP 工具,连接你所有喜爱的工具:Gmail、日历以及其他 40 多个工具。
graphlit-mcp-server
模型上下文协议 (MCP) 服务器实现了 MCP 客户端与 Graphlit 服务之间的集成。 除了网络爬取之外,还可以将任何内容(从 Slack 到 Gmail 再到播客订阅源)导入到 Graphlit 项目中,然后从 MCP 客户端检索相关内容。
Kagi MCP Server
一个 MCP 服务器,集成了 Kagi 搜索功能和 Claude AI,使 Claude 能够在回答需要最新信息的问题时执行实时网络搜索。
e2b-mcp-server
使用 MCP 通过 e2b 运行代码。
Neon MCP Server
用于与 Neon 管理 API 和数据库交互的 MCP 服务器
Exa MCP Server
模型上下文协议(MCP)服务器允许像 Claude 这样的 AI 助手使用 Exa AI 搜索 API 进行网络搜索。这种设置允许 AI 模型以安全和受控的方式获取实时的网络信息。