MCP Server
Zenhub's MCP server lets you query and interact with your Zenhub data through AI clients like Claude Code, Cursor, Windsurf, Gemini CLI, and even Claude Desktop.
Our MCP server wraps the Zenhub GraphQL API, and exposes a number of tools to search and modify issues, understand your current sprint, and more.
For more on what MCP is, see this introduction
Prerequisites
To connect to the MCP server, you'll need:
- a Zenhub API token from https://app.zenhub.com/settings/tokens
- optionally, a default Zenhub workspace ID (the 24-character id in your workspace URL). See Choosing a workspace
- node installed, so you can use mcp-remote via
npx
Configuring your MCP client
Each MCP client has a slightly different way to accessing your MCP settings. For the most part, however, they use the same JSON format for MCP configuration.
Below is the JSON to use to connect your MCP client to Zenhub. Note that you'll need to replace the following values:
YOUR_ZENHUB_TOKENwith your Zenhub API tokenYOUR_ZENHUB_WORKSPACE_IDwith your default Zenhub workspace ID, or remove that--headerline and theX-zh-workspaceline after it to choose a workspace in your prompts instead
{
"mcpServers": {
"zenhub": {
"command": "npx",
"args": [
"-y",
"mcp-remote",
"https://api.zenhub.com/mcp",
"--header",
"Authorization:${API_TOKEN}",
"--header",
"X-zh-workspace:YOUR_ZENHUB_WORKSPACE_ID"
],
"env": {
"API_TOKEN": "YOUR_ZENHUB_TOKEN"
}
}
}
}
Cursor
- Hit
Cmd-Shift-J(Ctrl-Shift-Jon Windows), and click the "MCP Tools" tab on the left - Click "New MCP Server"
- Use the JSON above in the newly opened json file
- Start a chat and ask it which issue you should work on. The LLM should figure out to use the tools exposed via this MCP server to answer this.
Claude Code
Claude Code includes a /mcp command to add servers, but manually editing its JSON settings is simpler and less error-prone.
This guide explains why
manually editing your claude.json file is a simpler option.
- Edit your
claude.json(on macOS, this will be located at~/claude.json) and include the json snippet above - Note that the
mcpServerskey is present for each directory/project you use Claude Code in. You'll want to add that JSON into each project where you want to use this MCP server.
Choosing a workspace
The X-zh-workspace header is optional. Tools that work within a workspace take a workspaceId
argument, and the searchWorkspaces tool lists the workspaces you can access (ID, name, and organization).
This lets you work across several workspaces with one MCP configuration. For example, ask
"what's in the current sprint in my Platform workspace?" and the AI client will look up that workspace first.
- Without the header, the AI client must pass a
workspaceIdto these tools. If it doesn't, the tool returns an error asking it to callsearchWorkspacesfirst. - With the header, that workspace is the default: the AI client uses it unless it passes a different
workspaceId.
Existing configurations that set the X-zh-workspace header keep working unchanged.