Skip to content

docs: document Personal Access Tokens - #147

Merged
rish664 merged 4 commits into
mainfrom
feat/personal-access-tokens-docs
Aug 15, 2026
Merged

docs: document Personal Access Tokens#147
rish664 merged 4 commits into
mainfrom
feat/personal-access-tokens-docs

Conversation

@shekharkadyan

@shekharkadyan shekharkadyan commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Summary

PipesHub's Personal Access Token feature (pipeshub-ai#2933) shipped with no documentation here — despite the sibling OAuth Applications feature having a full guide with screenshots. mcp/overview.mdx and mcp/local-server.mdx also already referenced a generic YOUR_BEARER_TOKEN placeholder with no guidance on where to actually get one, which is exactly what a PAT is for.

What changed

  • New: developer/personal-access-tokens.mdx — creation, usage (including MCP), revocation, the admin list/revoke API, full endpoint reference, security notes, and FAQ. Mirrors the structure/tone of developer/oauth2.mdx.
  • Updated: mcp/overview.mdx and mcp/local-server.mdx — point at PATs as the recommended bearer-token source, since they're simpler than the OAuth-app flow for a single person's own tooling.
  • Nav: added the new page to the "Developer" group in docs.json.

Notes

  • Text-only — no screenshots, since I don't have a live instance with seeded data to capture the actual PAT creation UI from this environment. The sibling developer/oauth2.mdx page has real screenshots (/images/developer/oauth2/*.png); this page would benefit from equivalent /images/developer/personal-access-tokens/*.png shots of the list/create panel if someone wants to add them.
  • Ran npx mintlify broken-links — 9 pre-existing broken links elsewhere in the repo, none introduced by this change.
  • All endpoint paths, request/response shapes, and behavior (default 30-day expiry, phpat_ prefix, 400 for non-admin on the admin routes, deleted-user rejection, 100-item self-list cap, paginated admin list) verified directly against the current pipeshub-ai source, not guessed.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • Documentation
    • Added comprehensive guidance for creating, using, managing, expiring, and revoking Personal Access Tokens.
    • Documented token scopes, security properties, limits, FAQs, and administrator APIs.
    • Added the Personal Access Tokens guide to developer documentation navigation.
    • Updated MCP setup instructions to support Personal Access Tokens alongside OAuth credentials.
    • Clarified bearer-token configuration and provided Personal Access Token examples.

pipeshub-ai's Personal Access Token feature (self-service, scoped,
revocable credentials that act as their creator) shipped with no
documentation here, even though the sibling OAuth Applications feature
has a full guide. Meanwhile mcp/overview.mdx and mcp/local-server.mdx
already referenced a generic "Bearer token" placeholder with no
guidance on where to get one — exactly what a PAT is for.

Adds developer/personal-access-tokens.mdx (creation, usage, revocation,
the new admin list/revoke API, full endpoint reference, FAQ), and
updates the two MCP pages to point at it as the recommended bearer-token
source for connecting an MCP client.
@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@shekharkadyan, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 53 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 187472f9-b3bd-4b1c-a94e-80df6c636a69

📥 Commits

Reviewing files that changed from the base of the PR and between d7af7ec and 1bcf9a9.

📒 Files selected for processing (2)
  • developer/personal-access-tokens.mdx
  • mcp/overview.mdx
📝 Walkthrough

Walkthrough

Added a Developer documentation page for Personal Access Tokens. The page covers creation, expiry, scopes, bearer-token usage, revocation, administration, security, APIs, and FAQs. MCP documentation now recommends PATs alongside OAuth credentials.

Changes

Personal Access Token documentation

Layer / File(s) Summary
PAT lifecycle and API reference
developer/personal-access-tokens.mdx, docs.json
Added Personal Access Token documentation and linked it in Developer navigation. The page covers creation, usage, expiry, scopes, revocation, administration, security, API endpoints, and FAQs.
MCP authentication guidance
mcp/local-server.mdx, mcp/overview.mdx
Updated MCP prerequisites and bearer-token examples to support Personal Access Tokens alongside OAuth credentials.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Suggested reviewers: realaashil

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: adding documentation for Personal Access Tokens.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/personal-access-tokens-docs

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@mcp/overview.mdx`:
- Around line 20-24: The PAT guidance in the Note should not claim it works in
any client configuration. Update the Note to direct PAT users specifically to
the Local Server (Stdio) --bearer-auth flow, while preserving the OAuth guidance
for shared or app-based integrations.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 07f5fef2-1684-4869-91d9-c6b7e7cb0543

📥 Commits

Reviewing files that changed from the base of the PR and between 4bf3f4c and d7af7ec.

📒 Files selected for processing (4)
  • developer/personal-access-tokens.mdx
  • docs.json
  • mcp/local-server.mdx
  • mcp/overview.mdx

Comment thread mcp/overview.mdx
The MCP overview's PAT note claimed a personal access token works as
YOUR_BEARER_TOKEN "in any client config on this page" — but every
remote client guide linked from that page (Cursor, Claude Code, Gemini
CLI, Claude.ai, LibreChat) is an OAuth client_id/secret flow with no
bearer-token option, verified against each guide's actual config.
Tightened the note to point at what does accept a bearer token: /mcp
directly, the Local Server (Stdio) package, or a self-configured
client. Also updated the page's frontmatter description, which still
said "using OAuth" with no mention of the PAT path.

On the PAT page itself: documented the actual PIPESHUB_MCP_URL /
PIPESHUB_MCP_TOKEN paste block the create panel emits (not a generic
raw token), the admin list's real { data, pagination } response shape
with the ownerDeleted field (distinct from the self-list's flat
{ tokens }), and request bodies for create/revoke to match the depth
of the existing oauth2.mdx guide.
@shekharkadyan

Copy link
Copy Markdown
Contributor Author

Addressed the review (CodeRabbit + a second pass):

Fixed — #1, the real issue:

  • The Note in mcp/overview.mdx claimed a PAT works as YOUR_BEARER_TOKEN "in any client config on this page." Checked every linked remote guide (cursor.mdx, claude-code.mdx, claude-desktop.mdx, claude-ai.mdx, gemini-cli.mdx, librechat.mdx) — all are OAuth client_id/client_secret flows with no bearer-token option. Tightened the note to point at what actually accepts one: /mcp directly, the Local Server (Stdio) package's --bearer-auth, or a self-configured client with a custom header.
  • Updated the page's frontmatter description, which still said "using OAuth" only.

Nice-to-haves — added:

  • The PAT page now shows the real PIPESHUB_MCP_URL / PIPESHUB_MCP_TOKEN paste block the create panel actually emits, not a bare token.
  • Documented the admin list's real { data, pagination } response shape (with ownerDeleted), called out as distinct from the self-list's flat { tokens }.
  • Added request-body details for create/revoke, matching oauth2.mdx's depth.

Screenshots remain a known gap (noted in the PR description) — no live instance with seeded data to capture from this environment.

npx mintlify broken-links still shows only the same 9 pre-existing broken links elsewhere in the repo.

- Admin response-shape callout was a <Warning> for something
  informational, not hazardous — switched to <Note>, matching how the
  rest of this repo uses the two.
- Split the MCP overview's OAuth-vs-PAT note into two sentences
  instead of one long compound one.
- Connected the create panel's paste block to the usage section right
  below it: PIPESHUB_MCP_TOKEN is the same value passed to
  --bearer-auth / Authorization: Bearer.

@shekharkadyan shekharkadyan left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against current pipeshub-ai source (PAT worktree) and the QM integration we just measured. The page is needed and most of it is right — PAT vs OAuth, phpat_ as a scanner prefix, 30-day default, one-time display, and the overview no longer telling people a PAT works in Cursor.

Two accuracy issues to fix before merge. The rest is optional.

Looks good (verified)

  • Default 30-day expiry matches create-pat-panel.tsx (DEFAULT_EXPIRY_DAYS = 30) and the API.
  • Default scopes = full MCP_SCOPES is honest: the panel pre-selects every scope (create-pat-panel.tsx:108) and omitting scopes on create over-grants the same set (pat.service.ts).
  • New token matches en-US.json (workspace.personalAccessTokens.newToken).
  • Admin list/revoke returning 400 for non-admins is unusual (usually 403) but correct — userAdminCheck.ts:25 throws BadRequestError('Admin access required').
  • Nav under Developer, next to OAuth, is the right place.

Nits / follow-ups, not blocking

  • UI path Workspace-settings → Personal Access Tokens matches the sibling oauth2.mdx. Live sidebar is Developer Settings → Personal Access Tokens; New token is the button. Fine.
  • Screenshots still missing — already noted in the PR body.
  • After Use with QM lands, add a reciprocal sentence here so QM operators are not sent to the MCP paste block. I opened that page as a sibling PR.

Comment thread developer/personal-access-tokens.mdx Outdated
Comment thread developer/personal-access-tokens.mdx
Comment thread developer/personal-access-tokens.mdx
Comment thread developer/personal-access-tokens.mdx Outdated
@shekharkadyan shekharkadyan mentioned this pull request Aug 15, 2026
9 tasks
@shekharkadyan

Copy link
Copy Markdown
Contributor Author

Sibling PR for the QM how-to (and the /mcp/qm link the paste-block note should point at): #149

Merge order: this PAT page (#147) first, then #149, so the Personal Access Tokens links on the QM page resolve.

client_credentials was described as acting as the app's owner. It has no
user identity at all: the controller passes `null // No user` into
generateTokens (oauth.provider.controller.ts:534-536) and the service falls
back to the client id (oauth_token.service.ts:78). The owner's name is
copied for display, not authenticated. That distinction is the reason this
page exists, so getting it backwards undercut the whole comparison.

A PAT was described as working anywhere a session token would. It reaches
the same endpoints, but session tokens skip scope checks entirely
(require-scopes.middleware.ts:37) while PATs are enforced against the
scopes granted. Saying they are equivalent removes the reason to grant
fewer scopes.

The create-token paste block uses PIPESHUB_MCP_TOKEN / PIPESHUB_MCP_URL,
which is right for MCP clients and wrong for QM — it wants PIPESHUB_TOKEN
and PIPESHUB_BASE_URL on two keychain entries. Pasting the block there
fails looking like a missing variable rather than a misnamed one, so the
page now says so. Left as plain text, not a link: /mcp/qm arrives in #149.

Added the recovery line for a phpat_ token returning 401 on an instance
that predates the prefix-stripping fix, since that failure used to surface
as an empty result rather than an auth error.
@shekharkadyan

Copy link
Copy Markdown
Contributor Author

All four addressed in 1bcf9a9. I re-checked each against the backend before changing the text.

client_credentials acts as the app, not its owner. Verified: oauth.provider.controller.ts:534-536 passes null // No user into generateTokens, and oauth_token.service.ts:78 falls back to userId: userId || app.clientId. The owner's name is copied for display only. The table now reads:

The app itself. client_credentials has no user identity — don't use it where per-person permissions matter

A PAT is not equivalent to being logged in. Verified: require-scopes.middleware.ts:37 returns early for anything that isn't an OAuth token, so session JWTs skip scope enforcement entirely. The page now says a PAT reaches the same endpoints but is enforced against its scopes — which is the reason granting fewer of them is worth the moment it costs.

The paste block is wrong for QM. Added a note under it naming PIPESHUB_TOKEN + PIPESHUB_BASE_URL and why the failure is confusing (looks like a missing variable, not a misnamed one). Left "QM" as plain text rather than a link, since /mcp/qm arrives in #149 — worth turning into a link once both are in.

Older instances and phpat_. Added the recovery line to the existing tip: if a prefixed token 401s, the instance predates the prefix-stripping fix; store it without the prefix and put it back after upgrading.

The CodeRabbit comment about restricting PAT guidance to bearer-auth clients was already handled in 08c89ad.

@rish664
rish664 merged commit 1e2280f into main Aug 15, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants