# AINPCEngine MCP server

> Lets AI agents create, manage, and interact with NPCs that feature persistent memory, dynamic personalities, and voice capabilities.

- Repository: https://github.com/jyswee/ainpc-cli
- Page: https://hostedmcp.org/servers/jyswee/ainpc-cli
- Transport: stdio, remote
- Stars: 1
- Latest version: 1.5.4

## Install

### Claude Code

```sh
claude mcp add --env 'AINPC_API_KEY=<YOUR_AINPC_API_KEY>' ainpc-cli -- npx -y ainpc-cli
```

### Cursor (`~/.cursor/mcp.json`)

```json
{
  "mcpServers": {
    "ainpc-cli": {
      "command": "npx",
      "args": [
        "-y",
        "ainpc-cli"
      ],
      "env": {
        "AINPC_API_KEY": "<YOUR_AINPC_API_KEY>"
      }
    }
  }
}
```

### VS Code (`.vscode/mcp.json`)

```json
{
  "servers": {
    "ainpc-cli": {
      "type": "stdio",
      "command": "npx",
      "args": [
        "-y",
        "ainpc-cli"
      ],
      "env": {
        "AINPC_API_KEY": "<YOUR_AINPC_API_KEY>"
      }
    }
  }
}
```

### VS Code CLI

```sh
code --add-mcp '{"name":"ainpc-cli","type":"stdio","command":"npx","args":["-y","ainpc-cli"],"env":{"AINPC_API_KEY":"<YOUR_AINPC_API_KEY>"}}'
```

### Claude Desktop (`claude_desktop_config.json`)

```json
{
  "mcpServers": {
    "ainpc-cli": {
      "command": "npx",
      "args": [
        "-y",
        "ainpc-cli"
      ],
      "env": {
        "AINPC_API_KEY": "<YOUR_AINPC_API_KEY>"
      }
    }
  }
}
```

### Codex

```sh
codex mcp add ainpc-cli --env 'AINPC_API_KEY=<YOUR_AINPC_API_KEY>' -- npx -y ainpc-cli
```

### Codex config.toml (`~/.codex/config.toml`)

```toml
[mcp_servers.ainpc-cli]
command = "npx"
args = ["-y", "ainpc-cli"]

[mcp_servers.ainpc-cli.env]
AINPC_API_KEY = "<YOUR_AINPC_API_KEY>"
```

### Gemini CLI

```sh
gemini mcp add -s user -e 'AINPC_API_KEY=<YOUR_AINPC_API_KEY>' ainpc-cli npx -- -y ainpc-cli
```

### Gemini settings.json (`~/.gemini/settings.json`)

```json
{
  "mcpServers": {
    "ainpc-cli": {
      "command": "npx",
      "args": [
        "-y",
        "ainpc-cli"
      ],
      "env": {
        "AINPC_API_KEY": "<YOUR_AINPC_API_KEY>"
      }
    }
  }
}
```

## Environment variables

| Name | Required | Secret | Description |
|---|---|---|---|
| `AINPC_API_KEY` | yes | yes | AINPCEngine API key (npk_...). Get one with `ainpc signup` — 7-day free trial. |
| `AINPC_BASE_URL` | no | no |  |
| `AINPC_GAME_ID` | no | no | Game slug to scope NPC tools to. |

## FAQ

### What can the AI agent do with this server?

The server provides 49 tools for AI agents to perform NPC CRUD operations, dialogue, game events, persona generation, and manage studio accounts.

### Do the NPCs have memory?

Yes, the NPCs feature persistent memory, allowing them to remember players, names, debts, favors, and grudges across different sessions.

### How do I install the CLI?

You can install the CLI globally using the npm command: npm install -g ainpc-cli.

### Can I use this with web-based agents like Claude Web?

Yes, you can use the remote SSE connection for Claude Web and other web-based agents without needing a local installation.
