npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

trlabs-pm-mcp

v0.5.0

Published

MCP server to read TR Labs PM (Northstar) Client Requests from any MCP client via a personal access token.

Readme

trlabs-pm-mcp

A Model Context Protocol server that lets any MCP-compatible AI client (Claude Code, Claude Desktop, Cursor, Codex, Gemini CLI) read your TR Labs PM (Northstar) Client Requests over a personal access token.

It runs locally over stdio and calls your PM instance's /api/mcp/v1/* endpoints with Authorization: Bearer <PM_TOKEN>. Everything is scoped to what your token's user can see — you only ever read your own projects' CRs.

Requirements

  • Node 18+ (for npx and built-in fetch).
  • A PM account on https://pm.trlabs.my (or your own self-hosted Northstar instance).
  • A personal access token — create one at https://pm.trlabs.my/settings/api-tokens (Settings → API access). The token is shown once; copy it immediately.

Environment variables

| Variable | Required | Default | Notes | |----------|----------|---------|-------| | PM_TOKEN | yes | — | Your pmk_… token. The server exits if it's missing. | | PM_BASE_URL | no | https://pm.trlabs.my | Point this at your own instance if self-hosting. |

Setup per client

The server command is always npx -y trlabs-pm-mcp with PM_TOKEN in the environment. Pick your client below.

Claude Code

claude mcp add --transport stdio --env PM_TOKEN=pmk_your_token --scope user trlabs-pm -- npx -y trlabs-pm-mcp
  • --scope user makes it available across all your projects. Use --scope local (default) to keep it to the current project only.
  • Add --env PM_BASE_URL=https://your-instance if self-hosting.
  • Verify with claude mcp list or the /mcp command inside a session — look for trlabs-pm connected with the read_cr tool.

Or edit the JSON directly (.mcp.json for project scope, ~/.claude.json for user scope). Claude Code supports ${VAR} expansion so you can keep the token in your shell env instead of the file:

{
  "mcpServers": {
    "trlabs-pm": {
      "type": "stdio",
      "command": "npx",
      "args": ["-y", "trlabs-pm-mcp"],
      "env": {
        "PM_TOKEN": "${PM_TOKEN}",
        "PM_BASE_URL": "${PM_BASE_URL:-https://pm.trlabs.my}"
      }
    }
  }
}

Claude Desktop

Edit claude_desktop_config.json (macOS: ~/Library/Application Support/Claude/, Windows: %APPDATA%\Claude\), then restart Claude Desktop:

{
  "mcpServers": {
    "trlabs-pm": {
      "command": "npx",
      "args": ["-y", "trlabs-pm-mcp"],
      "env": { "PM_TOKEN": "pmk_your_token" }
    }
  }
}

Cursor

Edit ~/.cursor/mcp.json (global) or .cursor/mcp.json (project):

{
  "mcpServers": {
    "trlabs-pm": {
      "command": "npx",
      "args": ["-y", "trlabs-pm-mcp"],
      "env": { "PM_TOKEN": "pmk_your_token" }
    }
  }
}

Codex CLI

Edit ~/.codex/config.toml:

[mcp_servers.trlabs-pm]
command = "npx"
args = ["-y", "trlabs-pm-mcp"]
env = { PM_TOKEN = "pmk_your_token" }

Gemini CLI

Edit ~/.gemini/settings.json:

{
  "mcpServers": {
    "trlabs-pm": {
      "command": "npx",
      "args": ["-y", "trlabs-pm-mcp"],
      "env": { "PM_TOKEN": "pmk_your_token" }
    }
  }
}

The read_cr tool

Once connected, your AI can call read_cr:

  • read_cr({ requestId }) → a single Client Request with its full detail (status, priority, description, client expectation, category, phase, branch, decisions, comments, project).
  • read_cr({ projectId }) → a list (up to 100) of the project's CRs as lightweight summaries.
  • Provide one or the other; requestId wins if both are given.

Errors (invalid token, no access, unreachable) come back as readable tool errors, not hangs. A 404 is returned for both "not found" and "no access" so the tool never reveals whether a CR you can't see exists.

Security

  • Your token is only ever sent to your PM_BASE_URL over HTTPS. It is never logged.
  • The server writes only to stderr; stdout is reserved for the MCP protocol.
  • Revoke a token any time at https://pm.trlabs.my/settings/api-tokens — it stops working immediately.
  • Treat pmk_… like a password. Prefer the ${PM_TOKEN} env-expansion form (Claude Code) over hardcoding it in a file that might be committed.

Troubleshooting

  • PM_TOKEN required on startup — the env var isn't set in your client config.
  • Every call returns "invalid or missing token" — the token is wrong or revoked; mint a new one.
  • "PM API unreachable"PM_BASE_URL is wrong or the instance is down.
  • npx not found (Windows) — ensure Node.js is installed and on PATH.

License

MIT