Developers

Musael MCP server

Connect an MCP client to a writer's Musael projects. The server speaks Streamable HTTP and accepts OAuth sign-in or a personal access token.

Server

Server URL
https://app.musael.com/api/mcp
Transport
Streamable HTTP, stateless JSON responses. Send JSON-RPC messages with POST; GET and DELETE answer 405.
Server name
musael

Authentication

Every request needs the header Authorization: Bearer <token>. Without a token, or with a revoked, expired or wrong one, the server answers 401 with a WWW-Authenticate header that points to its OAuth metadata.

OAuth sign-in

For ChatGPT, Claude, Cursor, VS Code and other clients that connect by signing in. The client discovers everything from the 401 response, following the MCP authorization specification:

  • Protected resource metadata (RFC 9728): https://app.musael.com/.well-known/oauth-protected-resource/api/mcp
  • Authorization server metadata (RFC 8414): https://app.musael.com/.well-known/oauth-authorization-server
  • Dynamic client registration (RFC 7591): public clients only, without a secret; redirect addresses in HTTPS, HTTP on loopback only, or an app scheme.
  • Authorization code with PKCE (S256 only). The writer signs in, chooses Read only or Read and add and the projects, then allows or cancels.
  • Access tokens last one hour; refresh tokens last 90 days and change at every use.
  • Scopes: read and suggest (shown to the writer as Read and add).

Personal access token

For clients configured by hand, such as Codex, Claude Code or a script. The writer creates the token in Musael under Settings → Connected apps, choosing a name, the projects, the access and when it expires.

  • Tokens start with sti_ and are shown once; Musael keeps only a hash of them.
  • An account can have up to 20 active tokens. Revoke turns a token off at once.
  • Send it in the Authorization header. Never put it in the URL.

Access and limits

  • Each call acts as the writer who connected, inside the access they have at that moment, on the projects chosen for the connection.
  • No tool changes or deletes the writer's text. The tools that add create new acts, chapters, scenes or World entries; suggest_edit leaves a proposal that the writer accepts or rejects in Musael.
  • Every tool is always listed. A tool the plan or the connection does not allow answers with the reason and does nothing.
  • Up to 300 calls every five minutes per token. Answers longer than 200,000 characters are cut, with a note to read one chapter or scene at a time.

Tools

15 tools. Reading the text of the book and proposing edits come with the Press plan.

ToolWhat it doesPlanAccess
list_projectsThe projects this connection can see, with their workspace, the writer's role, scenes and last change. Use it first: every other tool needs a project id.Every planRead
get_profileThe connected Musael account: an id that never changes, the name and the email.Every planRead
get_outlineThe structure of a project: books, acts, chapters with synopsis, scenes in reading order with status, POV and words, and the open tasks.Every planRead
create_projectA new project from an idea, with acts, chapters, empty scenes with synopsis and World entries.Every planRead and add
add_to_planNew acts, chapters and scenes in an existing project.Every planRead and add
add_world_entriesNew characters, places, objects and factions. A name that already exists is left as it is.Every planRead and add
read_sceneOne scene as Markdown, with its chapter, status, POV, place and synopsis.PressRead
read_chapterEvery scene of a chapter, in order, as Markdown.PressRead
search_projectWords in the scenes and the World, with short excerpts.PressRead
list_worldThe entries of the World by kind, with other names, tags and the start of their notes.PressRead
get_world_entryOne World entry in full: notes, relationships, recorded facts and the scenes that mention it.PressRead
get_timelineThe World's events in story order with the scene that shows each one, marking those told out of order.PressRead
get_style_reportThe app's style report on a scene, made by fixed rules without AI.PressRead
get_reader_statsReaders of the published book chapter by chapter, for the owner and editors.PressRead
suggest_editA proposed replacement for a passage, or a comment on it. The text changes only if the writer accepts it.PressRead and add

Scroll sideways to see the whole table.

Examples

Set MUSAEL_TOKEN to a personal access token. After initialize, send notifications/initialized, then list or call the tools.

Initialize

curl https://app.musael.com/api/mcp \
  -H "Authorization: Bearer $MUSAEL_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2025-06-18","capabilities":{},"clientInfo":{"name":"example","version":"1.0.0"}}}'

List the tools

curl https://app.musael.com/api/mcp \
  -H "Authorization: Bearer $MUSAEL_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","method":"notifications/initialized"}'

curl https://app.musael.com/api/mcp \
  -H "Authorization: Bearer $MUSAEL_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":2,"method":"tools/list"}'

Call a tool

curl https://app.musael.com/api/mcp \
  -H "Authorization: Bearer $MUSAEL_TOKEN" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"list_projects","arguments":{}}}'

Codex

# ~/.codex/config.toml
[mcp_servers.musael]
url = "https://app.musael.com/api/mcp"
bearer_token_env_var = "MUSAEL_TOKEN"

Claude Code

claude mcp add --transport http --scope user musael https://app.musael.com/api/mcp --header "Authorization: Bearer $MUSAEL_TOKEN"

Without a token

HTTP/2 401
www-authenticate: Bearer realm="Musael", resource_metadata="https://app.musael.com/.well-known/oauth-protected-resource/api/mcp"

{"error":"TOKEN_INVALID"}