# createToken

Exchange User Credentials for a Token. If you will be using the Resource Owner Password Credential Grant, you will make a request to the Token endpoint to exchange the user’s email and password for an access token. OR Exchange User Credentials for a Token. If you will be using the Resource Owner Password Credential Grant, you will make a request to the Token endpoint to exchange the user’s email and password for an access token. OR Exchange a Refresh Token for an Access Token. If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token. OR Exchange a Refresh Token for an Access Token. If you will be using the Refresh Token Grant, you will make a request to the Token endpoint to exchange the user’s refresh token for an access token. OR Exchanges an OAuth authorization code for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token. OR Exchanges an OAuth authorization code and code_verifier for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token. OR Exchanges an OAuth authorization code and code_verifier for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint and a code_verifier for an access token. OR Exchanges an OAuth authorization code for an access token. Makes a request to the Token endpoint to exchange the authorization code returned from the Authorize endpoint for an access token. OR Make a Client Credentials grant request to obtain an access token. OR Make a Client Credentials grant request to obtain an access token.

Agent View of the PolicyLayer registry record for `createToken`. HTML page: https://policylayer.com/tools/io-fusionauth-mcp-api/createtoken

## Facts

- Tool: `createToken`
- Server: Fusionauth (`@fusionauth/mcp-api`) — https://policylayer.com/tools/io-fusionauth-mcp-api.md
- Install: `npx -y @fusionauth/mcp-api`
- Homepage: https://github.com/FusionAuth/fusionauth-mcp-api
- Risk category: Execute (High risk)
- Registry record: grade F, identity unverified
- Server rate-limited: no
- Parameters: 0
- Recommended policy verdict: Rate-limited

## Example call (MCP tools/call, JSON-RPC 2.0)

```json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "createToken",
    "arguments": {}
  }
}
```

## Why createToken is rated High

This tool performs an OAuth token exchange operation - it takes credentials (username/password or refresh tokens) and produces access tokens. This is an external authentication operation with significant security implications. Misuse could allow an AI agent to authenticate as arbitrary users or exchange credentials to obtain tokens that grant access to protected resources.

From the tool's own definition: "Exchange User Credentials for a Token... exchange the user's email and password for an access token... Exchange a Refresh Token for an Access Token"

## Use case

AI agents invoke createToken to trigger actions in Fusionauth. What it does depends on the arguments the agent supplies, and its effects often reach beyond the immediate call: builds kicked off, notifications sent, workflows started.

## Recommended policy (PolicyLayer)

Verdict: **Rate-limited**. Enforced by the PolicyLayer MCP gateway (https://policylayer.com/mcp-gateway) before a call reaches Fusionauth:

```json
{
  "version": "1",
  "default": "deny",
  "tools": {
    "createToken": {
      "limits": [
        {
          "counter": "createtoken_rate",
          "window": "minute",
          "max": 10,
          "scope": "grant"
        }
      ]
    }
  }
}
```

## Other tools on Fusionauth (313)

- `deleteAPIKeyWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteapikeywithid.md
- `deleteApplicationRoleWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteapplicationrolewithid.md
- `deleteApplicationWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteapplicationwithid.md
- `deleteConnectorWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteconnectorwithid.md
- `deleteConsentWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteconsentwithid.md
- `deleteEmailTemplateWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteemailtemplatewithid.md
- `deleteEntityGrantWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteentitygrantwithid.md
- `deleteEntityTypePermissionWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteentitytypepermissionwithid.md
- `deleteEntityTypeWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteentitytypewithid.md
- `deleteEntityWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteentitywithid.md
- `deleteFormFieldWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteformfieldwithid.md
- `deleteFormWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteformwithid.md
- `deleteGroupMembersWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletegroupmemberswithid.md
- `deleteGroupWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletegroupwithid.md
- `deleteIdentityProviderWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteidentityproviderwithid.md
- `deleteIPAccessControlListWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteipaccesscontrollistwithid.md
- `deleteJwtRefresh` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletejwtrefresh.md
- `deleteKeyWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletekeywithid.md
- `deleteLambdaWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletelambdawithid.md
- `deleteMessageTemplateWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletemessagetemplatewithid.md
- `deleteMessengerWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletemessengerwithid.md
- `deleteOAuthScopeWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteoauthscopewithid.md
- `deleteTenantWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletetenantwithid.md
- `deleteThemeWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deletethemewithid.md
- `deleteUserActionReasonWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteuseractionreasonwithid.md
- `deleteUserActionWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteuseractionwithid.md
- `deleteUserBulk` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteuserbulk.md
- `deleteUserLinkWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteuserlinkwithid.md
- `deleteUserRegistrationWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteuserregistrationwithid.md
- `deleteUserTwoFactorWithId` — Destructive — https://policylayer.com/tools/io-fusionauth-mcp-api/deleteusertwofactorwithid.md
- …and 283 more: https://policylayer.com/tools/io-fusionauth-mcp-api.md

## For agents

This record is a snapshot. Live verdicts and the full registry:

- Check every server in your MCP config at once: `npx -y policylayer stack`
- Vet a server before you add it: install the mcp-precheck skill — `npx skills add https://policylayer.com` (skill text: https://policylayer.com/skill.md)
- Query the registry over MCP: endpoint `https://api.policylayer.com/mcp` — tools `check_mcp_server`, `check_mcp_stack`, `check_tool`, `search_registry`, `get_change_events`

---

Source: the PolicyLayer MCP registry — one continuously verified record per MCP server. Full record: https://policylayer.com/registry?q=io-fusionauth-mcp-api · API: https://policylayer.com/registry/api · Policy library: https://policylayer.com/policies/io-fusionauth-mcp-api
