# NovelAI MCP server for Claude Code, Cursor and VS Code | AniworldAI

> Source: https://novelai.aniworldai.org/en/mcp · Markdown version of the page for AI agents and LLMs

MCP · Streamable HTTP

# NovelAI over MCP: Claude Code, Cursor and VS Code

The AniworldAI MCP server gives agents NovelAI tools: draw an image, check a job, get the file or a link. It connects with a URL and a key in a header, the same key as for the OpenAI SDK and SillyTavern.

 [See plans](https://novelai.aniworldai.org/en/pricing)

No card needed: 3 NovelAI images and 3 on Qwen-Image and FLUX, valid 7 days. The key appears here and in Telegram. [API documentation (Swagger)](https://novelai.api.aniworldai.org/docs)

## URL and authorization

MCP URL `https://novelai.api.aniworldai.org/mcp` 

-   Transport: Streamable HTTP.
-   Authorization — the `Authorization: Bearer YOUR_KEY` header, the key without “api:”.
-   You need a client that lets you set a header. The server doesn’t support OAuth sign-in yet, so claude.ai and ChatGPT connectors, which require OAuth, won’t connect.

## Claude Code

bash

```
claude mcp add --transport http novelai https://novelai.api.aniworldai.org/mcp --header "Authorization: Bearer YOUR_KEY"
```

By default the server is visible only to you and only in the current project; add `--scope user` for all projects. Don’t put the key into a shared project `.mcp.json`: everyone with the repository would see it.

## Cursor

The `~/.cursor/mcp.json` file (for all projects) or `.cursor/mcp.json` in a project:

JSON

```
{
  "mcpServers": {
    "novelai": {
      "url": "https://novelai.api.aniworldai.org/mcp",
      "headers": {
        "Authorization": "Bearer YOUR_KEY"
      }
    }
  }
}
```

To keep the key out of the file, write `"Bearer ${env:NOVELAI_KEY}"` and set the `NOVELAI_KEY` environment variable.

## VS Code

The `.vscode/mcp.json` file in a project. VS Code asks for the key when the server starts, so it doesn’t end up in the file:

JSON

```
{
  "servers": {
    "novelai": {
      "type": "http",
      "url": "https://novelai.api.aniworldai.org/mcp",
      "headers": {
        "Authorization": "Bearer ${input:novelai-key}"
      }
    }
  },
  "inputs": [
    {
      "type": "promptString",
      "id": "novelai-key",
      "description": "NovelAI API key",
      "password": true
    }
  ]
}
```

## Tools

-   `generate_image`: draw an image from a prompt;
-   `get_job`: job status;
-   `get_image`: the finished image as PNG;
-   `get_image_link`: a temporary link to the image;
-   `cancel_job`: cancel a job before it is sent to NovelAI;
-   `get_account`: remaining quota, images per day on your plan, how many are used and when the whole limit comes back;
-   `get_models`: the model list.

## Check without a client

MCP Inspector in command-line mode lists the tools:

bash

```
npx @modelcontextprotocol/inspector --cli https://novelai.api.aniworldai.org/mcp --transport http --header "Authorization: Bearer YOUR_KEY" --method tools/list
```

Questions

## FAQ

Does it work in claude.ai or ChatGPT?

Not yet: their connectors require OAuth sign-in, and our server takes the key in a header. Connect from Claude Code, Cursor, VS Code and other clients that let you set a header.

Is it the same key as for SillyTavern?

Yes, one key for every format. In MCP it goes into the Authorization: Bearer header without the api: prefix.

How does the agent get the image?

generate\_image creates a job; the agent fetches the finished image as a PNG file (get\_image) or a temporary link (get\_image\_link).

Guides

## Every use case, step by step

[

### NovelAI API: Python, JavaScript and curl examples

For those who write code: URLs, examples in Python, JavaScript and curl, and the docs.

](https://novelai.aniworldai.org/en/api)[

### NovelAI in SillyTavern: setup with screenshots

Standard method and sillyimages: separate instructions, screenshots and copyable settings.

](https://novelai.aniworldai.org/en/sillytavern)[

### NovelAI in TAVO

TAVO’s built-in generator: API URL, key, models, your own style, image by link for presets and Smart expand.

](https://novelai.aniworldai.org/en/tavo)[

### NovelAI API pricing

Plus, Duke and Emperor for 30 days: how many NovelAI, Qwen-Image and FLUX images each includes, renewal and plan changes.

](https://novelai.aniworldai.org/en/pricing)[

### NovelAI from Russia: pay by SBP, no VPN

Pay by SBP, crypto or Telegram Stars, works without a VPN, no NovelAI account needed.

](https://novelai.aniworldai.org/en/russia)[

### Characters’ look from avatars

The “Images by Not\_Found” plugin for TAVO: how to take the characters’ look from avatars, one model and five steps.

](https://novelai.aniworldai.org/en/refs)[

### Images in TAVO: the fastest way

The fastest way: NovelAI images in TAVO in nine steps, with screenshots and arrows.

](https://novelai.aniworldai.org/en/fast)[

### Setup help

Answer one to three questions and get the guide for your case.

](https://novelai.aniworldai.org/en/help)[

### TAVO preset: an image in every reply

A preset in one click: the text model inserts an image into every reply itself, with no plugins.

](https://novelai.aniworldai.org/en/preset)[

### NovelAI images in your roleplay chats

TAVO and SillyTavern. No VPN and no NovelAI account. Three images are free.

](https://novelai.aniworldai.org/en)
