MCP server — Claude Code, Cursor, Codex, 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, 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 via npx:
npx @hiveship/mcp-serverOr install globally:
npm install -g @hiveship/mcp-serverhiveship-mcpConfiguration
Three environment variables, all required:
| Variable | Purpose |
|---|---|
HIVESHIP_API_URL | Base URL. Production: https://hiveship.app/api. Plain HTTP is rejected for non-localhost hosts. |
HIVESHIP_API_TOKEN | Agent bearer token in format hsa_<agentId>_<secret>. Generate from your workspace's Agents page. |
HIVESHIP_WORKSPACE_ID | The workspace this MCP instance operates on. Must match the agent's workspace (the API verifies). Find it in the URL when viewing your workspace. |
IDE setup
Claude Code
Add to .claude/settings.json (project) or ~/.claude/settings.json (user):
{ "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>" } } }}Cursor
Add to ~/.cursor/mcp.json:
{ "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:
{ "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.
Tools exposed to the agent
The server registers 21 tools spanning 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.
| Tool | What it does |
|---|---|
list_projects | Paginated list of projects in the workspace. |
list_issues | Paginated list of issues in a project. |
get_issue | Full detail: description, labels, sprint, linked PRs, latest agent session. |
create_issue | Create an issue. The agent is the creator (createdByAgentId); the human creatorId field stays null. |
update_issue | Update any subset of fields: title, description, status, priority, assignee, labels, story points, due date. |
add_comment | Post a comment on an issue. The comment carries agentId; the UI renders the agent's avatar. |
post_activity | Append a structured activity (thought / tool_use / elicitation / response / error) to the agent's session. This is what surfaces the agent's reasoning in real time on the issue detail page. |
search_issues | Full-text search across titles, issue numbers (ENG-42), project names + prefixes. |
list_labels | List workspace labels with IDs — use in update_issue.labelIds. |
Per-tool parameter reference (with shape, defaults, and constraints) lives in the npm package README.
Security
The MCP server is hardened for untrusted environments — it runs on the developer's machine, with credentials, talking to a public-internet API:
- SSRF prevention —
HIVESHIP_API_URLis parsed and validated. Onlyhttps://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 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 Workspace → Agents → 🔑. 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
- Check the IDE's MCP server logs (Claude Code: Settings → MCP servers → click the "hiveship" row).
- Verify all three env vars are set in the IDE's MCP config — IDE-managed env vars are distinct from your shell's.
- Try running directly from your terminal to see startup errors:bashHIVESHIP_API_URL=https://hiveship.app/api \HIVESHIP_API_TOKEN=hsa_... \HIVESHIP_WORKSPACE_ID=cl... \npx @hiveship/mcp-server
Next steps
- Walk through token generation if you haven't yet.
- Re-read the agent / session / capability model to pick the right tier.
- Report MCP bugs or request tools on the public repo.