The Bugzilla MCP Server requires Bugzilla API access to function. Following security best practices is essential to protect your Bugzilla instance and data.
A Bugzilla API key has the same permissions as the account that created it. You can't scope the key itself, so limit the account instead:
add_comment tool posts comments (including private ones) as this account. Give the account no edit rights on products where it shouldn't commenteditbugs-everywhere privilegesBest Practices:
Claude Code:
--scope user so the key is stored in ~/.claude.json, not the repository.mcp.json, use ${BUGZILLA_API_KEY} / ${BUGZILLA_URL} instead of literal valuesClaude Desktop:
~/Library/Application Support/Claude/claude_desktop_config.json (macOS)Cursor IDE:
.cursor/mcp.json.gitignore if in a repositoryVisual Studio Code:
mcp.json securelyThe server itself does not read environment variables. Credentials always come from the request headers your MCP client sends. Environment variables are still useful in the client config so the key isn't written into a file. For example, Claude Code expands ${VAR} in .mcp.json:
export BUGZILLA_API_KEY="your-api-key"
export BUGZILLA_URL="https://bugzilla.example.com"
"headers": {
"api_key": "${BUGZILLA_API_KEY}",
"bugzilla_url": "${BUGZILLA_URL}"
}
https:// URLshttps:// when possible, even for local instancesThe hosted production server at https://bugzilla.fastmcp.app/mcp:
X-BUGZILLA-API-KEY header. Stock Bugzilla 5.0/5.2 ignore that header, so for them the key is sent as ?api_key= instead (deprecated, see Deprecations)http://127.0.0.1:8000/mcp.Hosted (server.py) | Local stdio (server_local.py) | |
|---|---|---|
| Users | Many, at the same time | Just you |
| Credentials | Request headers, one client per request | Environment variables / .env |
| Write tools | Off by default; read_only: false header | Off by default; BUGZILLA_READ_ONLY=false |
Tools that save to the server's disk (download_attachment(s)) | Not offered | Offered (with writes enabled) |
upload_attachment from a file_path | Refused | Allowed |
| Attachments | get_attachment returns content inline | Inline, or saved to disk |
On the hosted server, download_attachment(s) aren't offered and upload_attachment(file_path=...) is refused, on purpose. A shared server that wrote or read files at a caller's request would let anyone fill its disk or send its files (for example its .env) to their own Bugzilla.
The server starts in read-only mode, so these tools are hidden until you enable them. update_bug, create_bug, add_comment, upload_attachment and tag_comment change data in Bugzilla as your account. Every tool carries MCP hints (read-only, adds data, or destructive for update_bug), so clients can ask before running changes. Keep approval prompts on for write tools, and limit what the account itself can edit. Before a bulk update_bug, ask for a dry_run to see every change first.
The server sends your API key to Bugzilla in the X-BUGZILLA-API-KEY header, which keeps it out of URLs and access logs. Stock Bugzilla 5.0 and 5.2 don't read that header, so for those instances the server falls back to sending the key as ?api_key= (the previous behaviour) and logs a deprecation warning.
master already use the header.What this means:
Consider implementing rate limiting for production use:
The server includes comprehensive error handling:
Monitor API key usage:
If you suspect a security issue: