> ## Documentation Index
> Fetch the complete documentation index at: https://docs.guardway.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Tokens and Scopes

> Create a Guardway API token (gwp_) for Claude Code, Codex CLI, Cursor, VS Code, Devin Desktop and other MCP clients, and pick its scopes.

## What this is for

Every client except claude.ai and Claude Desktop connects to Guardway MCP with a Guardway API token, which starts with `gwp_`. The token's scopes decide which tools the client may call; your role decides what those tools may change.

## How to configure

Skip this for claude.ai and Claude Desktop.

**1. Create an API token**

In the dashboard, open **Settings → API tokens** and choose **Create token**. Give it a **Name** and pick its access. Under **API keys**, choose **Read and manage API keys** to make changes, **Read API keys** to only look, or **No access to API keys**. Under **Reports (read-only)**, tick the reports the client may read: **Usage & spend (read)**, **Audit log (read)** and **Setup status (read)**. Under **Policies**, choose **Read and change policies & guardrail rules** to let the client change them, **Read policies & posture** to only look, or **No access to policies**. **Members**, **Operations (alerts & anomalies)** and **Connections (providers & MCP servers)** are chosen the same way: no access, read, or read and change (see [Token scopes](#token-scopes)). Under **Endpoints & people**, choose **Read endpoints & people** or **No access to endpoints & people**. Under **Discovery**, choose **Read and refresh discovery** to let the client refresh cloud agents, **Read discovery** to only look, or **No access to discovery**. Under **FinOps**, choose **Read spend and change budgets** to let the client set budgets, **Read spend & budgets** to only look, or **No access to spend or budgets**. Under **Supply chain**, choose **Read the supply chain** or **No access to the supply chain**. Pick a **Lifetime** of 7, 14 or 30 days.

**2. Copy the token**

Copy the token: this is the only time it is shown. A good starting set for managing keys and reading reports is `keys:read` or `keys:write`, `usage:read`, `audit:read` and `policies:read`.

> [!NOTE]
>
> Only Owners and Admins can create API tokens. A token acts as the member who created it, with that member's current role, and expires after its lifetime. Rotate or revoke it in **Settings → API tokens**. Treat it like a password: keep it out of files you commit.

## Token scopes

Each tool needs a scope on the token. **Usage & spend** and **Audit log** are independent: pick either, both or neither. **Policies**, **Members**, **Operations (alerts & anomalies)**, **Connections (providers & MCP servers)**, **Endpoints & people**, **Discovery**, **FinOps** and **Supply chain** are one level each, chosen like API key access; read and change (or read and refresh) always includes read. **Endpoints & people** and **Supply chain** have no change level.

| Access in the dashboard | Scope | Tools it allows |
| - | - | - |
| **Read API keys** | `keys:read` | `list_api_keys`, `get_api_key` |
| **Read and manage API keys** | `keys:write` (includes `keys:read`) | the two above, plus `create_api_key`, `update_api_key`, `rotate_api_key`, `revoke_api_key` |
| **Usage & spend (read)** | `usage:read` | `get_usage_report`, `get_security_activity` |
| **Audit log (read)** | `audit:read` | `search_audit_log` |
| **Read policies & posture** | `policies:read` | `get_policy_posture`, `get_policy`, `get_effective_policy`, `list_mcp_servers`, `get_guardrails_config` |
| **Read and change policies & guardrail rules** | `policies:write` (includes `policies:read`) | the read tools above, plus `create_policy`, `update_policy`, `create_guardrail_rule`, `update_guardrail_rule`, `set_mcp_tool_enabled` |
| **Read members & invitations** | `members:read` | `list_members` |
| **Read and manage members & invitations** | `members:write` (includes `members:read`) | `list_members`, plus `invite_member`, `change_member_role`, `remove_member`, `revoke_invitation`, `resend_invitation` |
| **Read alerts, anomalies & gateway health** | `ops:read` | `list_anomalies`, `get_anomaly`, `list_alert_rules`, `get_gateway_health`, `get_config_history` |
| **Read and act on alerts & anomalies** | `ops:write` (includes `ops:read`) | the read tools above, plus `acknowledge_anomaly`, `resolve_anomaly`, `rebaseline_anomaly`, `create_alert_rule`, `update_alert_rule`, `test_alert_rule` |
| **Read providers & MCP servers** | `connections:read` | `list_providers`, `get_provider`, `list_mcp_servers` |
| **Read and change providers & MCP servers** | `connections:write` (includes `connections:read`) | the read tools above, plus `create_provider`, `update_provider`, `request_provider_secret`, `create_mcp_server`, `update_mcp_server`, `request_mcp_server_secret`, `discover_mcp_tools` |
| **Read endpoints & people** | `endpoints:read` | `get_ai_fleet_overview`, `list_people`, `get_person`, `list_endpoints`, `get_endpoint`, `list_ai_sessions`, `get_ai_session`, `get_shadow_ai_report` |
| **Setup status (read)** | `setup:read` | `get_setup_status`, `get_onboarding_plan`, `list_setup_goals`, `list_setup_steps`, `check_steps`, `search_docs` (also opens `get_ai_control_policy`) |
| **Get Started plan (change)** | `setup:write` (includes `setup:read`) | the `setup:read` tools above, plus `save_onboarding_plan` and `update_onboarding_plan_step` — save and change the Get Started plan |
| **Read prompt previews** | `prompts:read` | `get_session_prompts`, `get_event_prompts` (the text of AI prompts and responses; only while the token's creator is an Owner or Admin) |
| **Read discovery** | `discovery:read` | `get_ai_inventory_summary`, `list_ai_repos`, `get_repo_ai_findings`, `list_cloud_agents`, `get_cloud_agent`, `list_agent_findings` |
| **Read and refresh discovery** | `discovery:write` (includes `discovery:read`) | the read tools above, plus `refresh_cloud_agents` (which also needs the Owner or Admin role) |
| **Read spend & budgets** | `finops:read` | `get_spend_summary`, `get_budget_status` |
| **Read spend and change budgets** | `finops:write` (includes `finops:read`) | the above, plus `set_budget` (which also needs the Owner or Admin role) |
| **Read the supply chain** | `supply-chain:read` | `list_supply_chain_items`, `get_supply_chain_item`, `get_ai_control_policy`, `list_unmanaged_mcp_servers` |

`whoami` works with any token, and lists what the token can do in each area. A token with **Read providers & MCP servers** but not **Read policies & posture** sees MCP servers, and the tools it discovers, without tool names. Password resets are never open to a token, and no token can scan a repository. When Claude checks your organization's setup, it sees how many machines are enrolled and reporting, as counts only: who uses them and their hostnames need **Read endpoints & people**, and IP addresses are never shown.

claude.ai and Claude Desktop have no token scopes: they can use every tool except the prompt previews, which you switch on per connector (see [Prompt previews](https://docs.guardway.ai/guardway-mcp/tools.md#prompt-previews)), and what they can do follows your role. A Read Only member can only read, and the Owner-only team changes above still need the Owner.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.