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., "@FogBugz MCP Serversearch for open cases assigned to me in the 'Website Redesign' project"
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.
FogBugz MCP Server
A Model Context Protocol (MCP) server that lets Codex interact with FogBugz over the official XML API. The server exposes curated tools for searching, auditing, and updating cases so agents can stay inside Codex while FogBugz handles the workflow.
🧭 Overview
The server runs over the MCP stdio transport via @modelcontextprotocol/sdk. Every tool call is framed, schema-validated, and logged, so you can reason about FogBugz state while keeping your MCP client stable. The project ships with:
Canonical tool names (
search_cases,case_events,view_case, etc.) mapped to FogBugz XML commands.A markdown help resource (
help) that Codex can read when it needs a refresher.Structured logging of outbound FogBugz traffic to simplify debugging.
⚙️ Setup
Prerequisites
Node.js 20.x or newer (ESM + undici are required).
npm (ships with Node) and
git.A FogBugz account with access to the projects you plan to touch.
Codex configured to load MCP servers from
~/.config/codex/config.toml.
1. Recommended: run via npx (no clone required)
This is the simplest setup and the recommended approach for Codex. You do not need to clone the repo locally.
If you prefer a local clone for development, see the “Local development setup” section below.
2. Pick the values you will embed in the MCP config
Codex can pass environment variables directly to the MCP process via the env = { ... } block you define in config.toml, so you don’t need to export them in your shell. Decide on the following values (but keep them out of git/notes):
Variable | Required | Description |
| ✅ | Full FogBugz API endpoint, e.g. |
| ✅ | Personal API token with permission to read/update the target projects. |
| optional | File path for JSON logs (e.g. |
| optional | Set to |
Because these values end up in config.toml, keep that file outside version control (Codex stores it under your home directory by default). If you sync dotfiles, mask or template the token first.
3. Generate a FogBugz token (once per user)
Sign in to FogBugz in a browser.
Click your avatar ➜ User Options (or Profile depending on your skin).
Open API Tokens and click Create API Token.
Give the token a descriptive label (e.g., “Codex MCP”) and copy the generated value.
Store it securely (password manager, OS keychain) and set
FOGBUGZ_TOKENin your environment.
Why the fuss? FogBugz tokens grant the same rights as your account—treat them like passwords, rotate them when someone leaves the team, and never paste them into support tickets or commit history.
4. Wire the server into Codex (recommended npx config)
Edit ~/.config/codex/config.toml (create the file if it does not exist) and add:
This installs and runs the CLI straight from GitHub; no local path required.
To pin to a tag (recommended for stability), suffix the repo with
#<tag>, for example:github:dpupek/fogbugz-mcp#v1.0.0github:dpupek/fogbugz-mcp#latest-release
Codex injects these env vars when it launches the server, so there is no need to export them globally; treat this block like a private secrets store.
If Codex reports a handshake timeout, raise
startup_timeout_secslightly to give Node more time to boot.env property must have no line breaks.
Local development setup (optional)
If you want to hack on the server locally:
macOS/Linux
Windows (PowerShell)
Windows doesn’t require chmod +x. If you use WSL, follow the Linux steps instead.
When running from a local clone, use:
5. Smoke test the transport
You can sanity-check the MCP handshake without Codex:
You should see a newline-framed JSON response containing the tool registry. Confirm help, search_cases, and case_events show up.
🔎 FogBugz query syntax primer
Most tools rely on FogBugz’ search syntax. Highlights:
ixBug:207291finds a single case by ID.assignedto:"Tier 2" status:activefilters by owner and status (use quotes for spaces).project:"NexPort Solutions" opened:"this week"mixes project filters with date shortcuts.parent:207291orchildren:207291retrieves hierarchy relationships.outline:207291returns the full descendant tree (whatcase_outlineuses under the hood).Use
cols=to request additional XML columns (comma separated). The MCP server auto-adds safe defaults for each tool. For the full grammar, see FogBugz’ “Search Syntax” guide or runfogbugz.helpfrom Codex for quick reminders.
🧰 MCP tool catalog
Tool | Purpose | Key arguments & notes |
| Returns the markdown help/recipes that ships with the server. | No arguments. Useful when Codex needs onboarding text. |
| Return the MCP server name + version. | No arguments. |
| Check configuration and FogBugz API connectivity. | No arguments. |
| Run arbitrary FogBugz searches. |
|
| Same as | Ideal when auditing conversations or history. |
| Fetch one case by ID with optional columns; auto-includes | Arguments: |
| Create a new FogBugz case. Supports parent/milestone/category and the custom | Required: |
| Update an existing case. You can change the title, | Required: |
| Add a comment/event to a case. |
|
| Upload an attachment using base64 content. |
|
| Return the parent case plus its children (ID, title, assignee, timestamps). |
|
| Build the entire descendant tree using FogBugz |
|
| Resolve a case with optional closing comment or field edits. |
|
| Re-open a case with optional comment/field payload. | Same schema as |
| Enumerate every FogBugz category and metadata ( | No arguments; handy for validating the |
| List undeleted areas (optionally filtered by project). |
|
| List FogBugz statuses (optionally filtered by category/resolved state). | Optional: |
| View a specific FogBugz status. | Provide |
| List milestones (FixFors), optionally filtered by project. | Optional: |
| View a specific milestone (FixFor). | Required: |
| Create a new milestone (FixFor). | Required: |
| Edit an existing milestone (FixFor). | Required: |
| Add a dependency between milestones (FixFors). | Required: |
| Remove a dependency between milestones (FixFors). | Required: |
| Create a new area in a project. | Required: |
| Edit an existing area. | Required: |
| Return the custom-field names configured for a specific case. |
|
| Build the FogBugz web URL a human can click. |
|
| Search people via cached | Optional: |
Example MCP call payload:
userStory
🧪 Workflow snippets
Search then inspect: Call
search_caseswithq="ixBug:207291", grab the ID, then callview_casefor enriched columns.Full audit trail: Use
case_eventswithcols="sTitle,events"to stream every change along with event codes (see FogBugz docs for the code legend).Create + comment: After
create_casereturns the newixBug, immediately calladd_commentto capture additional context while Codex still has it in memory.Hierarchy review:
list_childrenreturns both the parent echo and each child’sixBug,sTitle,sStatus,ixPersonAssignedTo, anddtLastUpdated.Epic outline: Use
case_outlineto pull the entire descendant tree (parent ➜ children ➜ grandchildren) before planning or bulk edits.
🩺 Troubleshooting
Symptom | Likely cause | Fix |
| Env vars missing or startup failed before registration. | Check |
| MCP framing mismatch caused by a crash or malformed FogBugz response. | Inspect the log file for the failing tool; run it manually with |
Continuous heartbeat but Codex times out | The server never received | Confirm stdin/stdout aren’t redirected and that no other process is binding to the same command. |
| Tool names contained dots/aliases. | Stick with the canonical names listed above; aliases were removed. |
Attachments or | Large payloads can hit FogBugz or Codex limits. | Narrow your |
🔒 Security notes
Tokens inherit your FogBugz permissions. Store them in env vars or OS keychains—not in git, Codex transcripts, or screenshots.
Rotate tokens periodically and immediately after leaving a shared machine.
Log files can capture request URLs (including tokens if you misconfigure the base URL). Keep them on trusted disks and redact before sharing.
If you must share logs, strip case content to avoid leaking customer data.
📜 License
MIT (or internal use). Update if distributing publicly.
👤 Maintainer
Daniel Pupek — Chief Systems & Software Architect, Advanced Systems Technology, Inc.