MCP server for Claude Code, Cursor, Codex, and Continue

The @hiveship/mcp-server npm package is an MCP (Model Context Protocol) server that lets AI coding agents in your IDE read and write Hiveship issues directly, without leaving the editor. It runs locally over stdio (or hosted, see below), authenticated with an agent bearer token.

Setting up your own AI assistant (Claude Desktop, Cursor, Codex) with your personal subscription instead? See Connect an AI Client. It uses a personal access token that spans all your workspaces, with no workspace ID to configure.

npm: @hiveship/mcp-server · MIT-licensed · Node.js 20+.

Install

No installation required; run it via npx:

bash
npx @hiveship/mcp-server

Or install globally:

bash
npm install -g @hiveship/mcp-server
hiveship-mcp

Configuration

Three environment variables, all required:

VariablePurpose
HIVESHIP_API_URLBase URL. Production: https://hiveship.app/api. Plain HTTP is rejected for non-localhost hosts.
HIVESHIP_API_TOKENAgent bearer token in format hsa_<agentId>_<secret>. Generate from your workspace's Agents page.
HIVESHIP_WORKSPACE_IDThe workspace this MCP instance operates on. Must match the agent's workspace (the API verifies). It is in the config snippet shown when you generate the agent’s token; the workspace URL shows a slug, not the id.

IDE setup

Claude Code

Add the server with the claude CLI. --scope user makes it available in every project; leave it off to add it to the current project only.

Terminalbash
claude mcp add hiveship --scope user \
-e HIVESHIP_API_URL=https://hiveship.app/api \
-e HIVESHIP_API_TOKEN="<your hsa_ agent token>" \
-e HIVESHIP_WORKSPACE_ID="<your workspace id>" \
-- npx -y @hiveship/mcp-server

To give the whole team the server, commit a .mcp.json at the repo root instead and keep the token out of it. Claude Code fills in ${HIVESHIP_API_TOKEN} from the environment it was started in, so each developer exports their own token before running claude. It asks you to approve a project server the first time.

.mcp.jsonjson
{
"mcpServers": {
"hiveship": {
"command": "npx",
"args": ["-y", "@hiveship/mcp-server"],
"env": {
"HIVESHIP_API_URL": "https://hiveship.app/api",
"HIVESHIP_API_TOKEN": "${HIVESHIP_API_TOKEN}",
"HIVESHIP_WORKSPACE_ID": "<your-workspace-id>"
}
}
}
}

Check it with claude mcp list, or /mcp inside a session. MCP servers don’t go in .claude/settings.json; Claude Code reads them from .mcp.json and ~/.claude.json. More in Hiveship for Claude Code.

Cursor

Add to ~/.cursor/mcp.json to use it in every project:

~/.cursor/mcp.jsonjson
{
"mcpServers": {
"hiveship": {
"command": "npx",
"args": ["-y", "@hiveship/mcp-server"],
"env": {
"HIVESHIP_API_URL": "https://hiveship.app/api",
"HIVESHIP_API_TOKEN": "hsa_<your-agent-id>_<your-secret>",
"HIVESHIP_WORKSPACE_ID": "<your-workspace-id>"
}
}
}
}

A project-level .cursor/mcp.json works too. If you commit it, reference the token as ${env:HIVESHIP_API_TOKEN} (Cursor’s syntax) rather than pasting it. More in Hiveship for Cursor.

Codex

Add to ~/.codex/config.toml. The Codex CLI and IDE extension share this file.

~/.codex/config.tomltoml
[mcp_servers.hiveship]
command = "npx"
args = ["-y", "@hiveship/mcp-server"]
[mcp_servers.hiveship.env]
HIVESHIP_API_URL = "https://hiveship.app/api"
HIVESHIP_API_TOKEN = "hsa_<your-agent-id>_<your-secret>"
HIVESHIP_WORKSPACE_ID = "<your-workspace-id>"

Or let the CLI write it for you:

Terminalbash
codex mcp add hiveship \
--env HIVESHIP_API_URL=https://hiveship.app/api \
--env HIVESHIP_API_TOKEN="<your hsa_ agent token>" \
--env HIVESHIP_WORKSPACE_ID="<your workspace id>" \
-- npx -y @hiveship/mcp-server

Check it with codex mcp list, or /mcp inside a session. More in Hiveship for Codex.

Claude Desktop

In Claude Desktop, open Settings from the Claude menu, then Developer, then Edit Config, and add the server to claude_desktop_config.json. Quit and reopen the app so it loads the server. More in Hiveship for Claude Desktop.

claude_desktop_config.jsonjson
{
"mcpServers": {
"hiveship": {
"command": "npx",
"args": ["-y", "@hiveship/mcp-server"],
"env": {
"HIVESHIP_API_URL": "https://hiveship.app/api",
"HIVESHIP_API_TOKEN": "hsa_<your-agent-id>_<your-secret>",
"HIVESHIP_WORKSPACE_ID": "<your-workspace-id>"
}
}
}
}

VS Code + Continue

Add to .continue/config.json under experimental.modelContextProtocolServers:

.continue/config.jsonjson
{
"experimental": {
"modelContextProtocolServers": [
{
"transport": {
"type": "stdio",
"command": "npx",
"args": ["-y", "@hiveship/mcp-server"],
"env": {
"HIVESHIP_API_URL": "https://hiveship.app/api",
"HIVESHIP_API_TOKEN": "hsa_<your-agent-id>_<your-secret>",
"HIVESHIP_WORKSPACE_ID": "<your-workspace-id>"
}
}
}
]
}
}

Other MCP clients

Any MCP-compatible client that supports stdio works. The command is npx -y @hiveship/mcp-server with the three env vars above.

Hosted server

Agents that can’t run a local process, such as cloud coding agents, connect to the same tools over HTTP at https://hiveship.app/api/mcp. There is nothing to install and no environment variables: the token goes in an Authorization: Bearer header, and an agent token already names its workspace.

bash
claude mcp add --transport http hiveship https://hiveship.app/api/mcp \
--header "Authorization: Bearer hsa_<agentId>_<secret>"

For clients that take a JSON config:

json
{
"mcpServers": {
"hiveship": {
"type": "http",
"url": "https://hiveship.app/api/mcp",
"headers": { "Authorization": "Bearer hsa_<agentId>_<secret>" }
}
}
}

It accepts an agent token, which works on every plan, or a personal access token that spans all your workspaces, which reads workspace data on Pro and up. A token scoped to one workspace doesn’t work here; use the local server for that. Every tool call goes through the same permission checks as the REST API.

Some clients need their own shape for this. Cline needs "type": "streamableHttp"; GitHub’s Copilot cloud agent needs a tools list and reads the header from a COPILOT_MCP_ secret; Devin takes it in a form. Step-by-step setups: GitHub Copilot, Devin and Cline.

Tools exposed to the agent

The server’s tools span issues, projects, comments, agent sessions, sprints, labels, members, notifications, custom views, search, insights, and the audit log. The most common are below; the full list with parameters lives in the npm README.

ToolWhat it does
get_my_queueThe calling agent’s own queue: issues delegated to it, oldest first. Needs an agent token.
list_projectsPaginated list of projects in the workspace.
list_issuesPaginated list of issues in a project.
get_issueFull detail: description, labels, sprint, linked PRs, latest agent session.
update_sessionMoves the agent’s session through its lifecycle (queued, working, waiting for input, completed or errored) and reports token usage when it finishes.
post_activityAppends a structured activity (tool use, question, response or error) to the agent’s session. Tool calls show on the issue page as step lines while the agent works. Thoughts are accepted but not stored.
create_issueCreate an issue. The agent is recorded as its creator.
update_issueUpdate any subset of fields: title, description, status, priority, assignee, reviewer, labels, story points, estimated and actual hours, due date, sprint, parent issue.
add_commentPost a comment on an issue, shown with the agent’s avatar.
link_prLink a pull request to an issue after opening it. The PR shows on the issue and, while it is open, in the review queue.
search_issuesSearch issue titles, issue numbers (ENG-42), project names and comment bodies.
list_labelsList workspace labels with their IDs, for update_issue.

Per-tool parameter reference (with shape, defaults, and constraints) lives in the npm package README.

What to confirm before approving

Most clients ask before an agent runs a tool that changes something. Reading tools don’t change anything. These are the tools that write, and what to look at before you say yes:

Changes existing values

The old value is replaced. Worth a look every time.

  • update_issue: Changes fields on an issue, status and assignee included. Check who it assigns and which status it moves to.
  • start_work: Assigns unassigned stories to the agent’s owner, moves stories that haven’t started to in progress, and opens a session on the active one. A story listed in reassign is taken from its current owner, so only approve that if you agreed to it.
  • set_criterion_done: Ticks or unticks an acceptance criterion. Check the work really meets it.
  • update_session: Moves the agent’s own session along and reports its token usage. It can’t touch another agent’s session.

Adds something new

Each call creates a record the workspace can see. Check the one exception below.

  • create_issue: Files a new issue as the agent. Check the project and that it isn’t a duplicate.
  • add_comment: Posts a comment as the agent. Everyone who can see the issue sees it.
  • create_project_update: Posts a project status update on the project’s Updates tab, and sets the project’s health to match. That replaces the health the project had.
  • post_activity: Adds a step to the agent’s session log on the issue.

Creates or refreshes

The first call creates it; repeating the call updates the same record.

  • link_pr: Links a pull request to an issue. While the PR is open it joins the review queue, and your PR rules may move the issue.

What an agent can’t do through the MCP server, whatever you approve:

  • Delete anything. There is no delete tool.
  • Hand a story to another agent itself (an automation rule your admins set up can), or change members, settings, billing or tokens.
  • Go past its token. A session-scoped token only writes to stories it has a live session on and to its own sessions, plus new issues in the triage Inbox, and a workspace admin can limit any agent to chosen fields and actions in its settings.

The server also has configure, which only saves your local preferences (default workspace and project) to a file on your machine.

Security

The MCP server is hardened for untrusted environments, since it runs on the developer's machine with credentials and talks to a public-internet API:

  • SSRF prevention. HIVESHIP_API_URL is parsed and validated. Only https:// URLs are accepted (except loopback for local development); private IPv4 ranges, IPv6 link-local + ULA, IPv4-mapped IPv6, and unspecified addresses are rejected.
  • HTTPS enforcement. Bearer tokens never travel over plain HTTP to non-localhost hosts.
  • Token format validation at startup. A token not in hsa_<agentId>_<secret> shape fails fast with a clear error.
  • Rate limiting: 200 tool invocations / minute via an internal token bucket. Prevents a runaway agent loop from flooding the API.
  • Output sanitisation. Every text response is run through a control- character + 8-bit C1 stripper, so a malicious payload in an issue body can't inject ANSI escape sequences into the agent's terminal.
  • Audit attribution per tool call. Every outbound API call carries X-MCP-Tool: <toolName>, and Hiveship persists the value on the matching audit row alongside the agent id, HTTP path, and response status. Super-admins can filter the audit log by MCP tool name to answer "which agent created these issues yesterday?" or "which tool fired this rogue update?" in one query. The per-issue Activity tab also surfaces the agent's typed actions (comments, session events) directly for in-context investigation.

Troubleshooting

HIVESHIP_API_TOKEN must be in format hsa_<agentId>_<secret>

You probably copied a session JWT by mistake. Generate a fresh agent token from Agents, using the key icon on the agent’s row. It always starts with hsa_.

Authentication failed (401) at startup

The token was revoked, rotated, or doesn't match the workspace. Generate a new token and confirm it's tied to the workspace ID you've configured.

MCP rate limit exceeded

Your agent issued more than 200 tool calls in a minute. The cap is intentional. Slow down, or batch operations (use list_issues with a larger limit instead of looping get_issue).

Tools don't appear in the IDE

  1. Check the client’s MCP status: /mcp or claude mcp list in Claude Code, codex mcp list in Codex, the “MCP Logs” output channel in Cursor.
  2. Verify all three env vars are set in the IDE's MCP config. IDE-managed env vars are distinct from your shell's.
  3. Try running directly from your terminal to see startup errors:
    bash
    HIVESHIP_API_URL=https://hiveship.app/api \
    HIVESHIP_API_TOKEN=hsa_... \
    HIVESHIP_WORKSPACE_ID=cl... \
    npx @hiveship/mcp-server

Next steps