# createAPIKey

Creates an API key. You can optionally specify a unique Id for the key, if not provided one will be generated. an API key can only be created with equal or lesser authority. An API key cannot create another API key unless it is granted to that API key. If an API key is locked to a tenant, it can only create API Keys for that same tenant.

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

## Facts

- Tool: `createAPIKey`
- 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: Write (Medium 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": "createAPIKey",
    "arguments": {}
  }
}
```

## Why createAPIKey is rated Medium

This tool creates new API keys, which are credentials that grant programmatic access to the FusionAuth system. While the creation itself is reversible (keys can be deleted), the tool enables persistent authentication tokens that could be misused if generated maliciously or with excessive permissions.

From the tool's own definition: "Creates an API key"

## Use case

AI agents use createAPIKey to create or update resources in Fusionauth, usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Fusionauth environment.

## 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": {
    "createAPIKey": {
      "limits": [
        {
          "counter": "createapikey_rate",
          "window": "minute",
          "max": 30,
          "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
