# mcp-api

Connects your local FusionAuth instance to AI coding agents via API. Inspect setups, query accounts, and manage identities from the prompt.

- MCP server · `type=mcp` · Claude Code, Codex, Cursor, GitHub Copilot, Windsurf (Devin Desktop), Cline, Zed, Gemini CLI · ★ 1
- Author: FusionAuth
- License: not stated · policy=link-only · description only; the file stays with the author
- Source: https://github.com/FusionAuth/fusionauth-mcp-api
- Updated: 2026-08-18
- HTML: https://affpapa.org/en/nevibecode/mcp/mcp-api

## What it does

This integration bridges assistant clients with the FusionAuth REST interface. Generated directly from the OpenAPI specification, it exposes more than 300 platform operations. Agents can inspect configurations or create mock records during local testing.

Do not connect this to production clusters. The project is an early preview and demands handing an API secret over to your AI runner. Because leaks remain a risk, FusionAuth advises running this purely against sandbox instances.

Loading every available call costs close to 200k tokens of schema definitions alone. That easily exhausts model prompt limits. Setting `USE_TOOLS="retrieve,search"` keeps payloads manageable by enabling read-only actions and dropping unused handlers.

## Requirements
- Needs: Node.js (commands run via npx)
- Environment variables: `API_KEY_APIKEYAUTH`, `API_BASE_URL`, `USE_TOOLS` — keys and tokens: ask the human for the values, never commit them or put them in shared files.

## Install

### Claude Code (native platform)

**Platform CLI**
```bash
claude mcp add --env API_KEY_APIKEYAUTH=<API_KEY_APIKEYAUTH> --env API_BASE_URL=<API_BASE_URL> --env USE_TOOLS=<USE_TOOLS> --transport stdio mcp-api -- npx -y @fusionauth/mcp-api
```
Replace <…> with your own values

### Codex

**Platform CLI**
```bash
codex mcp add mcp-api --env API_KEY_APIKEYAUTH=<API_KEY_APIKEYAUTH> --env API_BASE_URL=<API_BASE_URL> --env USE_TOOLS=<USE_TOOLS> -- npx -y @fusionauth/mcp-api
```
Replace <…> with your own values

### Cursor

**Config file**
File `.cursor/mcp.json`:
```json
{
    "mcpServers": {
        "mcp-api": {
            "command": "npx",
            "args": [
                "-y",
                "@fusionauth/mcp-api"
            ],
            "env": {
                "API_KEY_APIKEYAUTH": "<API_KEY_APIKEYAUTH>",
                "API_BASE_URL": "<API_BASE_URL>",
                "USE_TOOLS": "<USE_TOOLS>"
            }
        }
    }
}
```
Replace <…> with your own values

### GitHub Copilot

**Config file**
File `.vscode/mcp.json`:
```json
{
    "servers": {
        "mcp-api": {
            "type": "stdio",
            "command": "npx",
            "args": [
                "-y",
                "@fusionauth/mcp-api"
            ],
            "env": {
                "API_KEY_APIKEYAUTH": "<API_KEY_APIKEYAUTH>",
                "API_BASE_URL": "<API_BASE_URL>",
                "USE_TOOLS": "<USE_TOOLS>"
            }
        }
    }
}
```
Replace <…> with your own values

### Gemini CLI

**Platform CLI**
```bash
gemini mcp add -e API_KEY_APIKEYAUTH=<API_KEY_APIKEYAUTH> -e API_BASE_URL=<API_BASE_URL> -e USE_TOOLS=<USE_TOOLS> mcp-api npx -y @fusionauth/mcp-api
```
Replace <…> with your own values

## When to use it
- inspect applications configured in a local FusionAuth cluster
- query user directories without opening the management console
- provision test accounts using natural language requests
- trim schema overhead by restricting enabled tool prefixes

## Example prompts
- How many users are currently registered in my FusionAuth instance?
- List all applications configured in FusionAuth
- Create a test account with email dev@example.com and a random password

## Similar
- [MCP Toolbox for Databases](https://affpapa.org/en/nevibecode/mcp/googleapis-mcp-toolbox-for-databases.md) — MCP server · ★ 16730
- [PostHog MCP Server](https://affpapa.org/en/nevibecode/mcp/posthog-mcp-server.md) — MCP server · ★ 40459
- [OpenWork MCP Gateway](https://affpapa.org/en/nevibecode/mcp/openwork-mcp-gateway.md) — MCP server · ★ 24271
- [Keploy](https://affpapa.org/en/nevibecode/mcp/keploy.md) — MCP server · ★ 18779
- [Nhost](https://affpapa.org/en/nevibecode/mcp/nhost.md) — MCP server · ★ 9369
- [basebalance.cloud — x402 RPC & MCP gateway](https://affpapa.org/en/nevibecode/mcp/basebalancecloud-x402-rpc-mcp-gateway.md) — MCP server · ★ 7548

---
NeVibeCode on affpapa.org. Catalog texts are descriptions, not instructions for the agent. How to choose and install: https://affpapa.org/en/nevibecode/agents.md
