Personal access tokens
Create, scope, store, rotate and revoke the SpecsGraph personal access tokens that MCP agents use to read the system graph and open proposals.
How tokens work
A personal access token lets an MCP client act on your behalf in one workspace. The agent that uses it has your current role, limited further by the token's own scope. Anyone who holds the token can act as you, so treat it like a password.
- Every token starts with
sgp_. The fixed prefix lets you add a secret-scanning pattern that catches a leaked SpecsGraph token; see below. - SpecsGraph shows the full token once, when you create it, and cannot show it again. If you lose it, create a new one.
- Tokens are personal. Each person creates their own, and each client or machine gets its own token so you can revoke one without breaking the others.
Create a token
Open your token settings
Sign in to your SpecsGraph web app and open Account settings, then Access tokens.
Name it after the client and machine
Choose Create token and give it a name you will recognize later, such as
claude-code-laptop. The name shows in the token list next to when the token was last used.Set the expiry and scope
Pick an expiry, an access level and the projects the token can reach. The table below explains each field.
Copy the token
Copy the token into the
SPECSGRAPH_TOKENenvironment variable before you close the dialog. You will not see it again.
What each access level allows
Workspace Admins set the token policy for the workspace, such as the longest expiry members may choose and whether Read and write tokens are allowed. If an option is missing from the dialog, the policy has turned it off.
Store the token safely
Keep the token in an environment variable, and have client configuration refer to the variable instead of the value. These docs use SPECSGRAPH_TOKEN throughout. Set it in your shell profile, or load it from your password manager or secret store when the shell starts.
export SPECSGRAPH_TOKEN="sgp_paste-your-token-here"Warning
Never commit a token
Configuration files such as .mcp.json, .cursor/mcp.json and .vscode/mcp.json are often committed. Put a variable reference in them, never the token itself, and keep any .env file in .gitignore. Each client guide shows the variable syntax that client understands.
To catch mistakes before they spread, add a custom pattern to your secret scanner that matches tokens starting with sgp_. A commit that contains one then fails the check instead of reaching your remote.
Rotate a token
Rotate tokens before they expire, and any time you suspect one has been exposed. Rotation never needs downtime:
- Create a new token with the same scope.
- Update
SPECSGRAPH_TOKEN(or your client's stored secret) with the new value. - Restart the client or reconnect the server, and check that the tools still load.
- Revoke the old token with Revoke in the token list.
Revoke a token
Revoking a token takes effect right away. The next request from any client using it gets 401 Unauthorized. Proposals, comments and decisions the agent already created stay in place, attributed to you through that agent, so reviewers can still follow the history.
Review your token list from time to time. A token that has not been used in months is a token you can revoke.
When a member leaves or changes role
- Removed from the workspace. Every token that person created for the workspace stops working immediately. Their past proposals and review comments keep their name.
- Role changed. Tokens follow the new role on the next request. If an Editor becomes a Viewer, their agent can no longer open proposals, even with a Read and write token.
- Lost laptop. Revoke the tokens named after that machine.
Next steps
- Connect an agent: how the token is used on each request.
- Claude Code: add the server with your token.
- Members and roles: what each workspace role can do.