Skip to main content
Glama
README.md
# PairHarbor MCP server

Your PairHarbor cloud and workspaces as tools inside Claude Code, Claude
Desktop, or any MCP client. Authentication is an API token; the server is a
thin stdio wrapper over the public v1 API, so the same safety filters,
membership gates, and daily write limits apply as for any other client.

Published on npm as [`pairharbor-mcp`](https://www.npmjs.com/package/pairharbor-mcp).
Nothing runs on PairHarbor itself: the server is a small Node process on
your own machine that calls `https://pairharbor.com/api/v1/...` with your
token.

## Setup

1. Create a token: pairharbor.com → Settings → **Agents** → create an
   agent named after this machine → **New token**. Copy the `ph_...` value
   once; treat it like a password. A token acts as you, and task history
   records the agent's name.
2. Register the server with your MCP client. Node 20 or newer is required;
   `npx` fetches the package on first use.

   Claude Code, one command, with your token in place of `ph_...`:

   ```
   claude mcp add --scope user pairharbor -e PAIRHARBOR_TOKEN=ph_... -- npx -y pairharbor-mcp
   ```

   `--scope user` makes the server available in every project on the
   machine; without it, only in the folder the command was run in. `/mcp`
   lists it.

   To share the setup with a team instead, commit this as `.mcp.json` in
   the repository (see step 3 for the token); each person approves the
   server once when prompted.

   ```json
   {
     "mcpServers": {
       "pairharbor": {
         "command": "npx",
         "args": ["-y", "pairharbor-mcp"],
         "env": { "PAIRHARBOR_TOKEN": "ph_..." }
       }
     }
   }
   ```

   Claude Desktop takes the same block in `claude_desktop_config.json`.

3. Keep the token out of git. In a shared repo, reference an environment
   variable instead (`"PAIRHARBOR_TOKEN": "${PAIRHARBOR_TOKEN}"`) and set it
   in your shell profile or in the git-ignored `.claude/settings.local.json`:

   ```json
   { "env": { "PAIRHARBOR_TOKEN": "ph_..." } }
   ```

`PAIRHARBOR_URL` overrides the base URL (for example a local dev server).

### Claude Code plugin

The [`plugin/`](plugin) folder is the same server as a Claude plugin, with
two skills on top: `plan-project` (read a project, suggest who covers each
task, file the tasks once you agree) and `work-tasks` (take a task from
your queue, do it, report back). Claude Code asks for the token when the
plugin is enabled and keeps it in the system's secure storage, so nothing
goes into a config file.

```
claude plugin marketplace add AminHA1248/pairharbor-mcp
claude plugin install pairharbor@pairharbor
```

The plugin starts the server with `npx` pinned to an exact version
(`plugin/.mcp.json`); `npm version` moves that pin with each release.

### Claude Desktop bundle

`pairharbor.com/downloads/pairharbor-mcp.mcpb` is the same server as an
MCP Bundle: open it with Claude Desktop, paste the token into the install
dialog's "PairHarbor API token" field, done. It is generated at deploy
time by `mcp/scripts/build-mcpb.mjs` (`npm run build:mcpb` locally), which
stages `server.mjs` with its two runtime dependencies, lists the tools for
the install dialog, writes and validates the manifest (spec 0.2), and
packs. The bundle is unsigned.

### Working from source

`npm install`, then `PAIRHARBOR_TOKEN=ph_... node server.mjs` runs the
server from a checkout. Inside PairHarbor's own repository, where this
folder is `mcp/`, the checked-in `.mcp.json` does that
(`node mcp/server.mjs`), so changes take effect on the next Claude Code
start.

## Tools

| Tool | What it does |
| --- | --- |
| `whoami` | Which account the token belongs to |
| `get_my_cloud` | Read the account's cloud |
| `update_my_cloud` | Replace the cloud's skills (and title) |
| `add_skills` | Merge skills into the cloud, keeping the rest |
| `remove_skills` | Drop skills by name |
| `list_workspaces` | Public first (`kind: "public"`), then company workspaces (`kind: "company"`) |
| `get_workspace_usage` | A company workspace's plan and this month's usage: members, and agent task completions against the allowance |
| `list_workspace_projects` | A workspace's projects; `"public"` lists your own public projects (url, listed, skills, brief) |
| `post_workspace_project` | Post a project into a company workspace; optional terms (teamMin, teamMax, startsOn, endsOn) |
| `post_public_project` | Post a public project page from a skill list, with an optional brief shown on the page; unlisted unless `list: true` |
| `update_public_project` | Set or clear the brief on one of your public project pages |
| `delete_workspace_project` | Delete a project (poster or admin) |
| `list_my_tasks` | Tasks assigned to this account across workspaces (a worker's inbox) |
| `list_workspace_tasks` | A workspace's tasks, by project or status; with `"public"`, a public project's tasks by handle (all of them for its owner, open ones for anyone else) |
| `get_task` | One task with its audit trail |
| `create_task` | Create a task under a project, optionally assigned and with a dueOn date (defaults to the project end date). In `"public"`, under one of your own public projects (projectId = its handle) |
| `approve_task` | People only: approve an agent's proposal, optionally overriding the assignee |
| `claim_task` | Take an open task, in a company workspace you belong to or on any public project |
| `update_task` | Change status, add a progress or blocked-reason report, reassign or edit |
| `complete_task` | Mark done with a report and artifact links |
| `suggest_assignees` | Members ranked by coverage of a skill list |
| `wait_for_tasks` | Long-poll (up to 25s) until a task of yours changes, then the inbox |

## Tasks in the Public workspace

Public projects carry tasks too, with `workspaceId: "public"` and the
project's handle as `projectId`. The rules differ from a company
workspace because there is no membership: only the project's owner
creates, approves, edits and deletes; anyone with an account can list a
project's open tasks and claim one (at most five unfinished claims on
other people's projects); nobody is assigned by someone else. Reports,
artifacts and history are returned only to the owner and the assignee,
and other accounts appear as `owner` or `member-xxxxxx`, never by id.
Agents can complete 50 public tasks a month per project owner (402 with
`code: "quota"` after that); tasks people complete are not counted. A
start-to-finish run from Claude Desktop is at
https://pairharbor.com/docs#tutorial.

## Plan a project from Claude

With the server connected in Claude Code or Claude Desktop, planning is a
conversation covered by your subscription, no API key involved:

```
Plan the project "Mobile Rewrite" in my Acme workspace on PairHarbor.
Read its brief, skills and terms, suggest who covers each task, and show
me the plan. When I say "file them", create the tasks.
```

Claude reads the project (`list_workspace_projects`), asks the matcher
(`suggest_assignees`), and files tasks (`create_task`), one per person
when the project states a team size, each due on the project's end date.
Tasks filed this way are proposals until a member approves them on the
project's Tasks dialog, or live at once when the workspace runs unattended
mode.

## The worker: run your tasks on your own machine

`pairharbor-worker` is a loop that pulls the tasks assigned to you, hands
each to a handler, and reports the result back, all under the agent whose
token it runs with. It starts a task (in progress), runs the handler, then
completes it with the handler's report and artifact links, or marks it
blocked with the reason. Errors block the task rather than losing it.

```
export PAIRHARBOR_TOKEN=ph_agent_token
npx -p pairharbor-mcp pairharbor-worker --handler echo --once          # prove the loop with your inbox
npx -p pairharbor-mcp pairharbor-worker --handler claude-code            # poll every 60s, work coding tasks
npx -p pairharbor-mcp pairharbor-worker --handler android-emulator --workspace "Acme" --claim
```

Options: `--workspace <name or id>` limits the worker to one workspace;
`--claim` also takes open, unassigned tasks there that the handler
accepts; `--interval <seconds>` (default 60), `--once`, `--max <n>` per
pass, `--dry-run`, `--workdir <dir>`.

Between passes the worker long-polls `wait_for_tasks`, so new work starts
within about a second of being assigned; the interval is only the safety
net. A workspace admin can also turn on unattended mode (Members,
Automation) so tasks the worker or Claude creates go live without the
proposal step, and register webhooks that receive a signed POST per task
event (header `X-PairHarbor-Signature: sha256=<HMAC-SHA256 of the body>`).

Built-in handlers:

| Handler | What it does | Needs |
| --- | --- | --- |
| `echo` | Reports the task back, changes nothing | nothing |
| `claude-code` | Runs Claude Code headless in a repo checkout on a branch `pairharbor/task-<id>`, reports Claude's summary; `WORKER_PUSH=1` pushes and links the branch | Claude Code CLI, `WORKER_REPO` |
| `android-emulator` | Installs the APK on the attached emulator or device, launches the app, runs a monkey stress pass, reports crashes and screenshots | Android platform tools (adb), a running emulator; `WORKER_APK`, `WORKER_APP_ID` or the same in the task text |

A handler is an ES module: `export default { name, accepts(task), run({ task,
workdir, log, exec, env }) }` returning `{ report, artifacts?, blocked? }`.
Pass its path to `--handler` to use your own.

## Agents and unattended use

An agent is a machine you run, registered under Settings → Agents; its
tokens act as you. `list_my_tasks` is your inbox, `claim_task` /
`update_task` / `complete_task` the way a script on that machine works
through it, and every change is recorded under the agent's name. Two
rules apply to calls made through a token: a task created that way is a
proposal until a member approves it, and deleting a task needs a signed-in
session. Completing a task adds its skills to the assignee's cloud. The
agent's row in Settings ("Set up") prints the setup for Claude Desktop,
Claude Code and the worker.

A scripted planner (`pairharbor-pm-agent`, source in `examples/`) is also
in the package for teams that prefer a cron job; it calls the Anthropic
API with your own key rather than your subscription, so it is not the
recommended path.

There is deliberately no extraction tool: mapping a résumé or a project
description costs provider money and stays in the signed-in app. The tools
take ready-made skills, which Claude Code is perfectly capable of drafting.

## Publishing

This code is developed in PairHarbor's main repository, as its `mcp/`
folder, and released from there.
[github.com/AminHA1248/pairharbor-mcp](https://github.com/AminHA1248/pairharbor-mcp)
is the public copy of that folder: a GitHub Actions job copies the
committed files across on every push that changes them, one commit per run
(`node scripts/mirror-public.mjs --push` is the same step by hand). Issues
and pull
requests are welcome there; accepted changes are applied in the main
repository and arrive with the next copy.

GitHub Actions publishes to npm when a tag `mcp-v<version>` is pushed
(`.github/workflows/publish-mcp.yml`), using npm trusted publishing: no
token is stored anywhere, the job proves its identity to npm with a
short-lived GitHub OIDC token, and the account's 2FA stays enforced. The
same run then lists the version in the official
[MCP Registry](https://registry.modelcontextprotocol.io) as
`io.github.AminHA1248/pairharbor-mcp`. To release:

```
cd mcp
npm version patch --no-git-tag-version    # bumps package.json, say to 0.2.1
git commit -am "mcp 0.2.1"
git tag mcp-v0.2.1
git push origin main --tags
```

The workflow refuses a tag whose version differs from `package.json`.

The registry listing is `server.json`: name, one-line description (100
characters at most), the npm package and its `PAIRHARBOR_TOKEN` variable.
The registry stores that metadata only and proves ownership by reading
`mcpName` from the package on npm, so the two names must stay identical.
`npm version` copies the new version into `server.json` and into the
plugin's pinned `npx` command, raising the plugin's own version with it
(`scripts/sync-server-json.mjs`), and the workflow checks all three files
before it publishes anything. To change the listing text without a release, edit
`server.json` on `main` and start the workflow by hand (Actions, "Publish
pairharbor-mcp", Run workflow): that run skips npm and only updates the
registry.

Every tool declares a title and annotations (`readOnlyHint`, or
`destructiveHint` with `idempotentHint` where it applies). Clients use them
to decide which calls need a confirmation and directories require them, so
give a new tool one of `READ`, `ADD` or `CHANGE` from the top of
`server.mjs`.
Publishing by hand (`npm publish` from `mcp/`, with the browser 2FA
prompt) keeps working as a fallback.

`files` in `package.json` whitelists what ships (the server, the PM agent,
this README, the license); the lockfile and `node_modules` never do. The
Claude Desktop bundle is separate: it rebuilds on every site deploy.

TDQS

A3.7/5.0

Scored across 23 tools

Disambiguation4/5

Most tools map to a distinct resource+action (project vs task vs cloud vs workspace), and descriptions explicitly cross-reference near-neighbors like post_workspace_project vs post_public_project. The few soft overlaps are list_my_tasks vs list_workspace_tasks vs wait_for_tasks, and update_my_cloud vs add_skills/remove_skills, which descriptions disambiguate but an agent could still hesitate over.

Naming Consistency4/5

Strong verb_noun snake_case pattern throughout (get/list/post/update/delete/create/claim/approve/complete + resource), with resource prefixes grouping the surface well. Minor deviations: 'whoami' breaks the pattern, and 'post_' is used for projects while 'create_' is used for tasks.

Tool Count4/5

23 tools is on the heavy side but the surface spans four legitimately separate domains (skill cloud, workspaces, projects, tasks) with roughly 4-5 operations each. Every tool appears to earn its place; the count is only slightly over what feels tight.

Completeness4/5

Cloud (get/replace/add/remove), project (list/post/update/delete) and task (create/claim/approve/update/complete/get/list) lifecycles are well covered, plus a long-poll and assignee suggestion. Gaps: no delete_task and no MCP path to delete a public project (both deferred to the app), and no workspace creation/member management.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues