Inside Cursor, run:
/agentstack-init
Flow:
- The plugin prints a short
user_code(e.g.ABCD-1234) and a verification URL. - A browser tab opens at
https://agentstack.tech/activate?user_code=ABCD-1234. - Sign in (if you are not already) and click Approve. The requested scopes are shown — you can uncheck any you do not want to grant.
- The plugin receives
access_token+refresh_tokenand writes the Bearer into~/.cursor/mcp.json. Cursor detects the change automatically.
No copy-pasting. No manual config. The refresh token is rotated by the sessionStart hook on every Cursor launch.
{
"mcpServers": {
"agentstack": {
"type": "streamable-http",
"url": "https://agentstack.tech/mcp",
"headers": {
"Content-Type": "application/json",
"Authorization": "Bearer eyJhbGciOi..."
},
"tools": { "enabled": true, "autoDiscover": true }
}
}
}device/authorize failed— check your network; corporate proxies must allowhttps://agentstack.tech.- Browser does not open — copy the URL from the terminal manually.
expired_token— the 10-minute approval window lapsed. Re-run/agentstack-init.- Refresh repeatedly fails — run
/agentstack-loginto start a fresh flow.
If Node is not on PATH but Cursor is, you can install the MCP server by clicking a deep link:
cursor://anysphere.cursor-deeplink/mcp/install?name=agentstack&config=<BASE64>
Where <BASE64> is the base64 of:
{
"type": "streamable-http",
"url": "https://agentstack.tech/mcp",
"headers": { "Authorization": "Bearer <PASTE_BEARER>" },
"tools": { "enabled": true, "autoDiscover": true }
}Visit https://agentstack.tech/me/keys → Create scoped key to get a Bearer without a terminal.
Not recommended — kept for air-gapped or scripted environments.
- Create a scoped API key at
https://agentstack.tech/me/keys(pickservice_caps=mcp.executeplus whatever you need). - Paste it into
~/.cursor/mcp.json:
{
"mcpServers": {
"agentstack": {
"type": "streamable-http",
"url": "https://agentstack.tech/mcp",
"headers": {
"Content-Type": "application/json",
"X-API-Key": "ask_XXXXXXXXXXXXXXXX"
},
"tools": { "enabled": true, "autoDiscover": true }
}
}
}- Restart Cursor if the MCP tab does not refresh automatically.
Security: keys starting with
ask_are secrets. The plugin'sbeforeShellExecutionhook will block commands that contain them as plaintext. Store them only in~/.cursor/mcp.jsonor in your OS keyring.
/agentstack-capability-matrix— see what the MCP can do (live list fromGET https://agentstack.tech/mcp/actions)./agentstack-scaffold-auth— drop in login + register + session gating./agentstack-scaffold-backend— RBAC + buffs + payments + admin in one pass./agentstack-diagnose— single status table for MCP, tokens, hooks, errors.
curl -X POST https://agentstack.tech/mcp \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $BEARER" \
-d '{"tool":"agentstack.execute","params":{"steps":[{"action":"projects.get_projects"}]}}'You should receive a list of projects. The response header X-Trace-Id is the correlation id you can quote when filing a bug.