Home

AI Integration

MCP Server โ€” Connect Your Series to AI Assistants

superhero.pw ships a Model Context Protocol (MCP) server: 13 tools so Claude, Cursor, and other AI assistants can read your series, pull scripts, list palettes, and log notes and references โ€” organization-scoped and bearer-token authenticated.

superhero.pw includes a native Model Context Protocol server โ€” the standard way AI assistants talk to software. Point Claude Desktop, Cursor, or any MCP client at https://api.superhero.pw/api/mcp, and the assistant can read your series structure, pull a full episode script, browse your palette library, and log ideas to your Notes and References โ€” all with your account’s permissions, scoped to your active organization.

No screen scraping, no copy-paste. Your script lives where your assistant can work on it.


Why this matters for series storytellers

Writers already use AI โ€” for drafting, critiquing, continuity checks, pitch documents. The problem is context: an assistant without your workspace reads from your memory, not from your story. The superhero.pw MCP server closes that gap.

Ask your assistant things like:

  • “List my series and show me what’s in production.”
  • “Pull the full script for Season 2, Episode 5 and flag scenes where Elias’ motivation contradicts his act-one setup.”
  • “Summarize my writing velocity and list the pages still missing drafts.”
  • “Log this idea to my Notes: the storm scene should echo the cold open of Episode 1.”
  • “Save a reference โ€” this shot composition from Blade Runner 2049 for the rooftop chase.”

The assistant answers from your actual scripts, arcs, and notes โ€” not a guess.


The 13 MCP tools

Tool What it does
list_series List your series (stories in production)
get_series Series details โ€” seasons, structure, metadata
list_projects List projects (books / episodes) in a series
get_project Project details โ€” pages, status, structure
get_script Full script for a project, exported as Fountain or Markdown
get_page A single page โ€” content, status, revisions
list_palettes Browse your palette library
get_palette Palette details โ€” colors, seed, notes
list_notes Search and list notes and scraps
get_note Read a specific note
add_note Capture a new idea, snippet, or thought
list_references Browse visual and story references
add_reference Save a new reference

Eleven of thirteen tools are read-only (annotated with readOnlyHint for client-safe behavior). The two write tools โ€” add_note and add_reference โ€” capture inspiration without touching your drafts.


Getting started

1. Log in with the CLI

The login CLI issues the same session token your browser uses โ€” better-auth bearer tokens. Password or emailed one-time code:

cd api
npm run mcp:login      # interactive: API URL, then password or emailed OTP
npm run mcp:whoami     # confirm user + active organization scope
npm run mcp:logout     # revoke locally stored credentials

Credentials are stored in ~/.superheropw/mcp-credentials.json (mode 0600, directory 0700). Tokens refresh while in use; if one expires, run npm run mcp:login again.

2. Point your MCP client at the API

Generic MCP client config:

{
  "mcpServers": {
    "superheropw": {
      "url": "https://api.superhero.pw/api/mcp",
      "headers": { "Authorization": "Bearer <token from mcp:login>" }
    }
  }
}

The transport is streamable HTTP (POST for JSON-RPC, GET for the optional SSE stream). No separate process to run โ€” the MCP server lives inside the superhero.pw API.


Security and scope

  • Same authentication as everything else. Requests must carry a better-auth bearer session token; unauthenticated traffic gets 401 with a WWW-Authenticate challenge and /.well-known/oauth-protected-resource discovery.
  • Organization-scoped. Every tool call executes in your active organization’s context โ€” the same route โ†’ service โ†’ repository layering as the web app. You only ever see what your account can see.
  • Read-only by default. 11 of 13 tools carry readOnlyHint: true; only add_note and add_reference write, and they only ever append.
  • No drafts at risk. Scripts, pages, palettes, and series are never modified by MCP clients.

Frequently asked questions

What is the superhero.pw MCP server?

A Model Context Protocol server mounted on the superhero.pw API at /api/mcp. It exposes 13 tools โ€” series, projects, scripts, pages, palettes, notes, and references โ€” so MCP-compatible AI assistants can read your workspace and log captures with your account’s permissions.

How do I connect Claude to superhero.pw?

Log in with npm run mcp:login (in the API directory) to get a bearer token, then add the superheropw server to your Claude Desktop MCP config pointing at https://api.superhero.pw/api/mcp with the token in the Authorization header. Full steps are in the Getting started section above.

Does the MCP server cost extra?

No. The MCP server is included in every superhero.pw plan, including the free 30-day trial. Tool calls run against your workspace and count like normal app usage.

Is my writing data safe?

Yes. All requests are bearer-token authenticated and scoped to your active organization โ€” the same access model as the web app. 11 of 13 tools are strictly read-only, and the two write tools can only append notes and references. Nothing can modify or delete your scripts.

Which AI assistants support MCP?

Any client that speaks the Model Context Protocol: Claude Desktop, Claude Code, Cursor, Cline, and others. If your client supports streamable HTTP MCP servers, it works โ€” you provide the URL and a bearer token from npm run mcp:login.

What can my assistant do once connected?

Read series structure and episode status, pull full scripts in Fountain or Markdown, inspect individual pages, browse palettes, search notes, and add ideas or references. It cannot modify drafts โ€” capture-style writes only.