# The Writing AI and Agent Access | Lunafic

Source: https://lunafic.ai/docs/agent-access | Published: 2026-08-26T04:00:16.991Z | Updated: 2026-10-09T03:41:38.702Z | Author: Lunafic Team | Tags: Account & Help

> How the Lunafic writing AI thinks and drafts, and how to connect your own AI agent to your stories. Capabilities and limitations, plainly.

Lunafic has an MCP server. MCP stands for Model Context Protocol, an open standard that lets an AI app like Claude or ChatGPT use outside tools. When you connect Lunafic, the AI app can read and edit your worlds for you, while you talk to it in plain language.

This is separate from the writing AI that answers your replies inside a story. The MCP server is for building and managing worlds, like creating characters, writing endings or changing settings.

## What you need

- A Lunafic account. Agent access is open to every account.
- An AI app that supports remote MCP servers, like Claude custom connectors, or another app that lets you add a remote MCP server by address.
- The server address, https://api.lunafic.ai/api/mcp

## Connect with a token

- Create a token. **Open your account settings, go to Agent access, name the token and press Create token. Copy it right away, because it is shown once. It works like a password for the agent, and it expires after 30 days unless you pick a different length, from 1 to 365 days.**
- Add Lunafic in your AI app. **Open the connectors or MCP setting of your AI app and add a new remote server with the address above.**
- Paste the token. **When the app asks for a token or password, paste the token from step 1. It is sent as a Bearer token in the Authorization header.**
- Ask. **Talk to the agent like a person, for example List my worlds.**

The Agent access page also has a How to connect an agent guide with the address and a copy button.

## Connect with Claude or ChatGPT, no token to copy

Claude custom connectors and ChatGPT connectors sign in with OAuth. Add the server address as a connector, and the app opens a Lunafic page where you log in and approve the connection. After you approve, the connection appears in your Agent access list like any other token, and you can revoke it there. In ChatGPT, connectors need a paid ChatGPT plan and work on the website.

## The tools the agent can use

The server has 17 tools today. You do not call them yourself, the agent picks them from what you ask.

### Worlds

- **list_worlds. **Lists your worlds, Playable and Private, with title, status, genres and counters.
- **get_world. **Reads one world in full, with its settings, rules, starting choices, endings, scene image instructions and player roles.
- **create_world. **Creates a new world as a draft, Private or Playable, with genres, audience, maturity, languages, dialogue format, formality, authoring mode and rules.
- **update_world. **Changes any of those settings. It also publishes or unpublishes the world, promotes a Private world to Playable, sets the recommended player role, and edits starting choices, endings and scene images.

### Wiki, your characters and lore

- **list_scenarios. **Lists your projects, the worlds and the private stories, so the agent knows where to write.
- **get_world_bible. **Reads every entry and panel of a world, with the content and the Guarded flag of each panel.
- **search_entries. **Searches the entries of a world by keyword.
- **create_entry. **Creates an entry. Types are character, location, lore, species, faction, magic system, item, artifact, timeline, culture, religion, custom, and mc_template for a player role.
- **update_entry. **Changes the name, tagline, description, avatar, series, tags and aliases of an entry.
- **upsert_panel. **Creates or updates one panel by its title, like Speech Style, and can mark it Guarded.
- **import_brief. **Imports a whole set of entries and panels in one go, in the Lunafic Brief format. Running it again updates instead of duplicating.

### Your stories, read only

- **list_stories. **Lists your own stories, and can filter by name or by world.
- **get_story. **Shows one story with its chapters and the recap of each chapter.
- **read_chapter. **Reads a chapter one page at a time.
- **search_stories. **Finds a word or phrase across your own stories.

These four only read. The agent can never change a line of your stories, and it only sees stories you own.

### Pictures

- **upload_image. **Adds a character avatar or a scene image to your world from an image link.
- **create_upload_url. **Gives the agent a one-time upload link for a picture on your computer, valid for 15 minutes.

## Safety and limits

- It acts as you. **The agent only sees and changes your own worlds. It cannot see other people's private work.**
- Every write is recorded. **Agent changes show in the agent activity drawer in the Wiki, and you can revert one. A revert is recorded too, so you can undo it.**
- Guarded panels stay guarded. **An agent cannot write into a guarded panel of someone else's world.**
- Revoke any time. **Revoking a token in Agent access cuts the agent off right away. Your login password is never shared with the agent.**
- Rate limit. **Up to 60 requests per minute for your account.**
- Token abilities. **A token can hold read and write abilities for the Wiki and for projects.**

## What it cannot do yet

- It does not write story replies or chapters. The writing AI inside the story does that.
- It does not change your world cover. You set the cover in the Lunafic builder.
- It does not edit your stories. It can only read them.
- It does not handle billing, plans or account settings.

[See what you can build with it in Agent use cases.](/docs/agent-use-cases)

## Questions people ask

### Does Lunafic support MCP

Yes. Lunafic has a remote MCP server over Streamable HTTP at https://api.lunafic.ai/api/mcp, open to every account.

### Can I connect Claude or ChatGPT to Lunafic

Yes, any AI app that supports remote MCP servers can connect. Claude and ChatGPT connect through OAuth with no token to copy, and other apps use an agent token.

---

Read this on Lunafic: https://lunafic.ai/docs/agent-access
More from Lunafic: https://lunafic.ai/docs
What is Lunafic: https://lunafic.ai/ai-roleplay
AI characters you build stories with over long memories. You play as your character, the AI plays everyone else, and stories stay private by default.