Auth & security
The DFL MCP never has its own “god mode” view of the data. Every request runs as you. This page explains how that works so you know exactly what an AI assistant can — and can’t — do on your behalf.
The auth flow
Section titled “The auth flow”-
Your DFL login.
dfl-auth loginprompts for your DFL email and password. Supabase returns a JWT access token and a refresh token. -
Bearer on every call. Your client sends
Authorization: Bearer <access_token>with each MCP request. The endpoint validates the JWT’s signature and expiry. -
Per-session Supabase client. The endpoint builds a Supabase client using your JWT for the lifetime of that session — not a service key. So every read and write is executed with your identity.
-
RLS decides. PostgreSQL Row-Level Security policies and your IAM role determine which rows you can see and which mutations you can make.
dfl-auth login ──▶ DFL email/password (Supabase) ──▶ JWT (access + refresh) │ client ── Authorization: Bearer <JWT> ──▶ MCP endpoint ─┤ ▼ Supabase client bound to YOUR JWT ▼ RLS + your IAM role = what you can doTwo ways to sign in
Section titled “Two ways to sign in”| Way | For | How |
|---|---|---|
Bearer token (dfl-auth login) | Scripts, agents and developer clients that cannot use the browser consent page. Works on every domain, the Board too. | You load your JWT into the client or script. See For scripts. |
| OAuth (browser sign-in and consent) | People and clients that cannot take a pasted token, such as the ChatGPT desktop app. One connector, https://mcp.devfellowship.com/mcp, reaches every domain, the Board included (scopes board.read, board.write). | See Connect the DFL MCP. Revoke at learn.devfellowship.com/oauth/grants. |
An OAuth token is still your own user token: PKCE S256 only, valid for at most one hour, issued for the one connector, and checked by RLS as you.
Global fleet prerequisite
Section titled “Global fleet prerequisite”Use your existing global DFL login. The fleet MCPs accept the same current Supabase user JWT. They do not require a separate account or a token collected from a browser session.
If this PC does not have the global DFL login yet, configure the client once:
npx @devfellowship/dfl-auth configurenpx @devfellowship/dfl-auth loginUse your own DFL email and password in the CLI prompts. The current login prompt
shows the password while you type; use a private terminal. These commands keep
the existing global human workflow under ~/.dfl-mcp/.
Load the current global JWT into the client environment
Section titled “Load the current global JWT into the client environment”The existing global login stores access_token in
~/.dfl-mcp/credentials.json. Load that token into DFL_MCP_JWT when you start
your MCP client. The command below reads the existing credential in memory;
it does not print it or create another credential file.
On macOS, Linux or WSL, in Bash or Zsh:
export DFL_MCP_JWT="$(node -e 'const fs=require("node:fs");const path=require("node:path");const os=require("node:os");const c=JSON.parse(fs.readFileSync(path.join(os.homedir(),".dfl-mcp","credentials.json"),"utf8"));process.stdout.write(c.access_token);')"codex# Or run claude instead.unset DFL_MCP_JWTOn Windows PowerShell:
$credentialPath = Join-Path ([Environment]::GetFolderPath("UserProfile")) ".dfl-mcp/credentials.json"$env:DFL_MCP_JWT = (Get-Content -Raw $credentialPath | ConvertFrom-Json).access_tokentry { codex # Or run claude instead.} finally { Remove-Item Env:DFL_MCP_JWT -ErrorAction SilentlyContinue}The same JWT can authenticate multiple fleet endpoints. Each endpoint has its own MCP transport session. Browser SSO does not automatically authenticate a separate MCP transport.
What you can see and change
Section titled “What you can see and change”Because the MCP acts as you under RLS:
- You see your data and anything your role is allowed to read.
- You can mutate only what your role permits.
- A
403 Forbiddenmeans your permissions don’t allow it — the MCP is faithfully enforcing your access, not malfunctioning.
Where your credentials live
Section titled “Where your credentials live”| Path | Contents | Notes |
|---|---|---|
~/.dfl-mcp/project.json | Supabase project config | Written by dfl-auth configure |
~/.dfl-mcp/credentials.json | access_token, refresh_token, expires_at | Written by dfl-auth login; auto-refreshed |
Token lifetime & refresh
Section titled “Token lifetime & refresh”Access tokens are short-lived by design. Refresh without re-doing the browser login:
- CLI:
npx @devfellowship/dfl-auth refresh - JS/TS:
getValidAccessToken()from@devfellowship/dfl-authauto-refreshes
A future expiry does not prove a live session
Section titled “A future expiry does not prove a live session”The current dfl-auth status command checks the stored expiry time only.
A revoked session can still display Active with hours remaining. The current
login and refresh commands can also skip renewal while that time is valid.
If a fleet endpoint returns 401, obtain a fresh global login:
npx @devfellowship/dfl-auth logoutnpx @devfellowship/dfl-auth loginlogout removes the local stored credential; it does not revoke every existing
session. login then prompts for your DFL email and password. Reload the new
access_token into DFL_MCP_JWT and restart the MCP client. Existing client
processes and manually copied headers keep their old token until you update them.
Confirm recovery with an authenticated tool call. A stored expiry time, configuration entry or HTTP status alone does not establish the caller’s usable session.
Transport security
Section titled “Transport security”- Fleet MCP endpoints use HTTPS.
- MCP calls require the current caller’s credential.
- Keep actual tokens out of client configuration, prompts, screenshots and shared links.