Connect Zammad to ChatGPT: Automate Support and Knowledge Bases via MCP
Learn how to connect Zammad to ChatGPT using Truto's managed MCP server. Automate ticket triage, update customer records, and curate knowledge bases with AI.
If you need to connect Zammad to ChatGPT to automate helpdesk triage, update customer tickets, or orchestrate knowledge base documentation, you need a Model Context Protocol (MCP) server. This infrastructure layer translates ChatGPT's natural language tool calls into Zammad's specific REST API requests.
If your team uses Claude, check out our guide on connecting Zammad to Claude or explore our broader architectural overview on connecting Zammad to AI Agents.
Giving a Large Language Model (LLM) read and write access to a complex support platform like Zammad is a significant engineering challenge. You must handle deep relational structures, execute database migrations via API, and manage strict rate limits. You can either build and maintain this custom infrastructure yourself, or use a managed integration platform like Truto to dynamically generate a secure, authenticated MCP server URL.
This guide breaks down exactly how to use Truto to generate a secure, managed MCP server for Zammad, connect it natively to ChatGPT, and execute complex support workflows using natural language.
Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::
The Engineering Reality of the Zammad API
A custom MCP server is a self-hosted integration layer. While the open MCP standard provides a predictable way for models to discover tools, implementing it against Zammad's highly specific API is exceptionally painful.
If you decide to build a custom MCP server for Zammad, you own the entire API lifecycle. Here are the specific integration challenges that break standard CRUD assumptions when working with Zammad:
Object Manager Attributes and Forced Restarts
Unlike SaaS platforms where creating a custom field is a simple metadata update, Zammad treats custom fields as literal database schema changes. When an LLM decides it needs a new field and calls create_a_zammad_object_manager_attribute, the field is not immediately usable. You must explicitly call the zammad_object_manager_attributes_execute_migrations endpoint. Critically, executing this migration requires a mandatory restart of the Zammad server. Giving an LLM raw, unfiltered write access to these endpoints can literally bring down your production helpdesk if the agent decides to optimize your data schema mid-conversation.
Ticket States and Undocumented Types
If an AI agent needs to create a new ticket state (e.g., "Pending Security Review"), it must provide a state_type_id. However, Zammad does not expose a REST endpoint to list state types. The state_type_id is instance-specific and must typically be obtained via the Rails console. Your MCP server must either hardcode these IDs or maintain a complex mapping layer, otherwise the LLM will hallucinate invalid state IDs and fail the request.
Tagging as a Relational Concept
In many APIs, tags are just an array of strings on a ticket payload. In Zammad, tagging requires entirely separate API calls. An LLM cannot just pass ["urgent"] in a ticket update. It must explicitly call zammad_tags_add with the object (Ticket) and the o_id (the ticket ID). Your MCP server must guide the LLM to execute these as discrete, sequenced steps.
Rate Limits and 429 Passthrough
Zammad enforces strict rate limits to protect server resources. Your custom server must handle HTTP 429 Too Many Requests errors. Note that when using Truto as your managed infrastructure layer, Truto does not retry, throttle, or apply backoff on rate limit errors. When Zammad returns an HTTP 429, Truto passes that error directly to the caller. Truto normalizes the upstream rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset) per the IETF spec. The caller (your client application or agent framework) is entirely responsible for implementing retry and exponential backoff logic.
The Managed MCP Approach
Instead of forcing your engineering team to build custom JSON-RPC routers, handle token hashing, and maintain Zammad JSON schemas, Truto provides a managed architecture.
Truto dynamically generates MCP tools from Zammad's resource definitions. Rather than hardcoding endpoints, Truto acts as a dynamic translation layer. A tool only appears in your MCP server if it has a corresponding documentation record, ensuring that only curated, well-described endpoints are exposed to ChatGPT.
Step 1: Create the Zammad MCP Server
You can generate a secure MCP server URL for Zammad using either the Truto UI or the Truto REST API.
Method A: Via the Truto UI
- Log into your Truto dashboard and navigate to your connected Zammad account.
- Click the MCP Servers tab.
- Click Create MCP Server.
- Configure your server settings (e.g., allow only
readmethods or restrict to specific tags likesupport). - Copy the generated MCP server URL (e.g.,
https://api.truto.one/mcp/a1b2c3d4...).
Method B: Via the API
For teams automating infrastructure, you can generate the server programmatically. Make an authenticated POST request to the Truto API. The platform validates your plan, ensures the integration is AI-ready, generates a cryptographically hashed token, and provisions the server at the edge.
// POST /integrated-account/:id/mcp
const response = await fetch('https://api.truto.one/integrated-account/zammad-account-id/mcp', {
method: 'POST',
headers: {
'Authorization': 'Bearer YOUR_TRUTO_API_TOKEN',
'Content-Type': 'application/json'
},
body: JSON.stringify({
name: "ChatGPT Support AI",
config: {
methods: ["read", "write"], // Excludes potentially dangerous custom methods
tags: ["tickets", "users", "knowledge_base"]
},
expires_at: "2026-12-31T23:59:59Z"
})
});
const data = await response.json();
console.log(data.url); // https://api.truto.one/mcp/<token>Step 2: Connect the MCP Server to ChatGPT
Once you have your Truto MCP URL, you can plug it directly into ChatGPT to grant it access to Zammad.
Method A: Via the ChatGPT UI
- Open ChatGPT and navigate to Settings -> Apps -> Advanced settings.
- Ensure Developer mode is enabled (available on Plus, Team, Enterprise, and Pro accounts).
- Under MCP servers / Custom connectors, click Add new server.
- Enter a name (e.g., "Zammad Helpdesk").
- Paste the Truto MCP URL into the Server URL field.
- Click Save. ChatGPT will perform an initialization handshake and fetch the available Zammad tools.
Method B: Via Manual Config File (Local/Desktop)
If you are running an MCP client locally or orchestrating via a desktop agent, you can configure the connection using a JSON config file. Use the official Server-Sent Events (SSE) proxy to bridge the connection.
{
"mcpServers": {
"zammad_support": {
"command": "npx",
"args": [
"-y",
"@modelcontextprotocol/server-sse",
"https://api.truto.one/mcp/YOUR_TRUTO_TOKEN"
]
}
}
}Zammad Hero Tools for ChatGPT
When ChatGPT connects to the MCP server, it gains access to specific operational tools. Here are 6 high-leverage tools that enable complex support workflows.
1. zammad_tickets_search
This tool allows the agent to search for tickets using Zammad's robust query string syntax. It returns arrays of ticket objects including priority, state, owner, and article counts.
"Find all open tickets assigned to the IT Support group that were created in the last 24 hours."
2. create_a_zammad_ticket
Enables the LLM to generate a new ticket. The agent must supply a title, group, and customer reference. It can also optionally attach an initial article (the actual message payload).
"Create a new high-priority ticket for John Smith regarding the broken VPN connection, and assign it to the Network Ops group."
3. update_a_zammad_ticket_by_id
Allows the model to modify an existing ticket's metadata, such as changing the state_id to closed, elevating the priority_id, or reassigning the owner_id.
"Update ticket #10452 to "closed" and reassign it to Jane Doe."
4. create_a_zammad_ticket_article
In Zammad, replies and internal notes are called "articles". This tool allows the AI to draft a response or log an internal summary to a specific ticket.
"Add an internal note to ticket #10452 summarizing my previous conversation with the user. Mark it as internal."
5. zammad_users_search
Before modifying a ticket, the agent often needs to resolve a user's email or name to their Zammad ID. This tool searches the user directory and returns metadata including organization and VIP status.
"Look up the Zammad user ID for sarah.connor@example.com."
6. zammad_knowledge_bases_init
An incredibly powerful orchestration tool. It initializes a new knowledge base in Zammad, returning a comprehensive overview of the KB structure, translations, categories, and permissions in a single call.
"Initialize a new internal knowledge base for the HR department and show me the root category structure."
To view the complete inventory of available tools, query schemas, and response formats, visit the Zammad Integration Reference.
Workflows in Action
Here is how ChatGPT uses these tools in sequence to automate complex, multi-step helpdesk tasks.
Scenario 1: Automated Ticket Triage and Resolution
When a support manager asks ChatGPT to handle an escalated customer issue, the agent must navigate relational data to resolve it.
"A VIP customer, Alex Mercer, emailed us about a billing error. Find his open ticket, reply to him apologizing for the delay, close the ticket, and add an internal note summarizing the resolution."
Step-by-step execution:
- Look up user: The agent calls
zammad_users_search(query: "Alex Mercer")to retrieve Alex's Zammad ID and verify his VIP status. - Find the ticket: The agent calls
zammad_tickets_search(query: "customer_id:42 AND state:open")to find the active billing ticket. - Send the reply: The agent calls
create_a_zammad_ticket_articlewithinternal: falseto send the apology email directly to the customer. - Log the internal summary: The agent calls
create_a_zammad_ticket_articleagain, this time withinternal: true, to leave an audit trail for the human team. - Close the ticket: The agent calls
update_a_zammad_ticket_by_idto change thestate_idto closed.
sequenceDiagram
participant User as Support Manager
participant Agent as ChatGPT Agent
participant Truto as Truto MCP Server
participant ZammadAPI as Zammad API
User->>Agent: "Find ticket for Alex Mercer and close it"
Agent->>Truto: Call: zammad_users_search
Truto->>ZammadAPI: GET /api/v1/users/search?query=Alex+Mercer
ZammadAPI-->>Truto: User (ID 42)
Truto-->>Agent: Returns User Data
Agent->>Truto: Call: zammad_tickets_search
Truto->>ZammadAPI: GET /api/v1/tickets/search?query=customer_id:42
ZammadAPI-->>Truto: Ticket (ID 1099)
Truto-->>Agent: Returns Ticket Data
Agent->>Truto: Call: create_a_zammad_ticket_article (internal: false)
Truto->>ZammadAPI: POST /api/v1/ticket_articles
ZammadAPI-->>Truto: 201 Created
Truto-->>Agent: Success
Agent->>Truto: Call: update_a_zammad_ticket_by_id (state: closed)
Truto->>ZammadAPI: PUT /api/v1/tickets/1099
ZammadAPI-->>Truto: 200 OK
Truto-->>Agent: Ticket ClosedScenario 2: Knowledge Base Architecture Setup
A technical writer wants to structure a new documentation portal but doesn't want to click through the Zammad UI for hours.
"Set up a new knowledge base for our engineering team. Create a root category for 'Deployment Runbooks' and a sub-category for 'Kubernetes'."
Step-by-step execution:
- Initialize KB: The agent calls
zammad_knowledge_bases_initto create the foundational structure and retrieve theknowledge_base_id. - Create Root Category: The agent calls
create_a_zammad_kb_categorypassing the newknowledge_base_idand the translations attribute for 'Deployment Runbooks'. - Create Sub-Category: The agent calls
create_a_zammad_kb_categoryagain, this time passing the parent ID of the root category it just created, to nest 'Kubernetes' properly.
Security and Access Control
Giving an LLM access to your helpdesk requires strict security boundaries. Truto provides configuration filters at the MCP server level to guarantee the agent cannot overstep its bounds:
- Method Filtering: Restrict the server to safe operations. By passing
methods: ["read"]during server creation, ChatGPT can query tickets and users but is physically blocked from writing, updating, or deleting records. - Tag-Based Curation: Scope the LLM's view to specific domains. Using
tags: ["support"], you can expose ticket endpoints while hiding sensitiveorganizationoruser_access_tokentools. - Time-To-Live (TTL): Set an
expires_attimestamp. The server and its cryptographic tokens will self-destruct automatically at the deadline, perfect for temporary agent tasking. - Secondary Authentication: Enable
require_api_token_auth: true. Even if the MCP URL is leaked in a log file, the caller must provide a valid Truto API token in the Authorization header to execute a tool.
Strategic Wrap-up
Connecting ChatGPT to Zammad via a managed MCP server transforms your LLM from a passive text generator into an active helpdesk operator. By treating Zammad as a suite of standardized tools, you sidestep the massive engineering overhead of maintaining custom integration code, pagination logic, and OAuth handshakes.
With Truto handling the JSON-RPC translation and strictly enforcing your configured security boundaries, your engineering team can focus on orchestrating intelligent workflows rather than debugging REST API payloads.
Stop writing boilerplate API integration code. Let Truto generate secure, managed MCP servers for your AI agents in seconds. :::
FAQ
- Does Truto automatically handle Zammad API rate limits?
- No. Truto passes Zammad HTTP 429 Too Many Requests errors directly to the caller, normalizing the upstream rate limit info into standardized headers (ratelimit-limit, ratelimit-remaining, ratelimit-reset). The caller must implement their own retry and exponential backoff logic.
- Can I prevent ChatGPT from deleting Zammad tickets?
- Yes. When creating the Truto MCP server, you can configure method filtering (e.g., methods: ["read", "update"]) to block destructive API calls like delete entirely.
- How do I connect the MCP server to ChatGPT?
- You can connect it via the ChatGPT UI by navigating to Settings -> Apps -> Advanced settings -> Developer mode, and adding the Truto MCP URL as a custom connector.
- Do I need to manage OAuth tokens for Zammad?
- No. Truto handles the underlying authentication and credential management for the integrated account. The MCP server securely delegates calls using the stored credentials.