Skip to content

Sleeper Hit makes produced episodes: the script, the voices and the mix.

Sleeper Hit Docs

MCP server reference

The MCP server as reference: the two remote surfaces, the workflow map and gates, and where the tool list comes from. To connect a client, see Connect a client.

View as Markdown
On this page (9 sections)

Sleeper Hit Studio is a story-creation and production workspace. Its authenticated MCP connector can start from a premise, notes, research, source material, or an existing screenplay and carry the work through development, writing, performance, coverage, rendering, packaging, and publishing.

Machine-readable capability manifest (no account or credential needed to read it):

https://sleeperhit.studio/capabilities.json

It covers both MCP connectors, the Story API, and the CLI, and states the auth requirement and required scopes for every capability.

To connect a client, start at Connect a client — the per-client steps (Claude, ChatGPT, Codex, Cursor, VS Code, Windsurf, Gemini, OpenCode, and anything that takes a URL and headers) in one place (BL-6056). Everything below is this connector's reference: the two remote surfaces, the workflow map and its gates, and where a client's tool list comes from.

No Sleeper Hit account yet?

Anyone 18 or older can sign up at https://sleeperhit.studio/signup, where they confirm their age and accept the Terms of Service and Privacy Policy; an agent cannot create an account or accept the Terms for its user. Everything creative (projects, Series Bibles, screenplays, table reads, pitch decks, publishing) needs an account; public discovery and every documentation surface do not. Hand the human the link that matches them, then stop:

Preferred: remote OAuth

The preferred modern connector is the OAuth-protected Streamable HTTP server:

https://sleeperhit.studio/mcp

If you are an agent connecting a user to Sleeper Hit

You cannot complete the app's browser OAuth from inside a chat or a sandboxed shell: the browser cannot reach your sandbox's callback, so your user approves and no token arrives. Do not run that browser login yourself, and do not retry it. A device sign-in needs no callback and does finish inside a sandbox: sleeperhit login --no-browser in the CLI prints a code and a URL for your user to approve in their own browser, then polls and saves the key, so it works when your user can approve while you keep running. With no CLI to run, those are two plain calls you make yourself, neither needing a key: POST https://sleeperhit.studio/api/auth/device/code with {"client_id":"sleeperhit-cli","scope":"story:read credits:read artifact:read story:write source:write source:read artifact:publish publishing:read publishing:write publishing:publish"} answers a user_code and a verification_uri to hand your user, and polling POST https://sleeperhit.studio/api/v1/device/credential with its device_code every interval seconds returns the key. Name the scopes you will use in scope, as that call does: a request that sends only client_id is approved as a read-only key (every read, no write), so your first create is refused insufficient_scope. That scope carries what the workflows beside it finish and publish with, not only the first flow's reads and writes: refine, finalize, sharing a table read, casting a voice or a portrait and the other finish calls need artifact:publish, and a show's setup, its episodes and its releases need publishing:read, publishing:write and publishing:publish. A journey that reaches further — connecting a publishing destination, a show's analytics, an app sign-in — names those scopes in the same scope string, because the approval page lists each one before your user approves and GET /api/v1/capabilities names them all. A sandbox cannot reconnect a browser OAuth connector or open the Developers page, so the way back from an insufficient_scope refusal is a NEW device sign-in naming the missing scope, never a retry of the call that was refused: GET /api/v1/account/credential reads back what the key you hold carries. Otherwise ask your user to do the one-time sign-in in their app:

  • Codex: They run codex mcp login sleeperhit in their own terminal, outside the agent sandbox, approve in the browser, then start a new Codex session so the tools load.
  • Claude Code: They run /mcp, choose sleeperhit, then Authenticate.
  • ChatGPT: They choose Connect on the app, then Authorize.

After that the app renews access by itself. The app loads its tool list when a session starts, so if the tools don't appear, ask your user to start a new session.

If your user can't do a browser sign-in, they can create an API key at https://sleeperhit.studio/dashboard/developers (Dashboard → Developers), set it as SLEEPERHIT_API_KEY and add it as a bearer token: codex mcp add sleeperhit --url https://sleeperhit.studio/mcp --bearer-token-env-var SLEEPERHIT_API_KEY. Never ask your user to paste a key into the chat.

Claude Code takes the same key as a header: claude mcp add --transport http sleeperhit https://sleeperhit.studio/mcp --header "Authorization: Bearer $SLEEPERHIT_API_KEY". Every client's setup: https://sleeperhit.studio/docs/connect

Verify with the whoami tool (or sleeperhit whoami in a terminal). It answers source: "oauth", or source: "api_key" with the key's scopes. A key for the flow below needs story:read and credits:read — the guidance and the balance every agent reads first — plus artifact:read for the job and artifact reads that follow, story:write with source:write to create and generate, and source:read to poll a URL or PDF source until it is ready.

API key

/mcp also takes a Sleeper Hit API key as the bearer token, for a user who can't do a browser sign-in. The key keeps its own scopes, and every call is checked, rate-limited and logged by the Story API, as an OAuth connection's calls are. A writer creates it at https://sleeperhit.studio/dashboard/developers (Dashboard → Developers) and sets it as SLEEPERHIT_API_KEY; it never goes into a chat. The bearer-token config for each client, and the steps for the key itself, are written once on Connect a client.

Never paste the key into a chat. A key for the documented first flow needs story:read, credits:read, artifact:read, story:write, source:write and source:read: whoami confirms the connection, get_agent_guidance and get_credits read the story and the balance, every job poll after them reads the artifact, and get_source reads back the URL or PDF source it added until that source is ready. A key with only the two write scopes is refused on those first three calls — 403 insufficient_scope, with the scopes it is missing in the body and a hint that says where to add them. Every client's setup, and every 401's hint, says the same: https://sleeperhit.studio/docs/connect. WHEN THE WORK ENDS IN A FINISHED ARTIFACT, IT NEEDS artifact:publish TOO (BL-6542): finalizing the durable MP3/MP4, rendering the video, casting the voices and portraits, and scoring the picture are all artifact:publish calls — POST /api/v1/artifacts/{artifactId}/finalize, POST /api/v1/story-projects/{projectId}/cast-film, POST /api/v1/story-projects/{projectId}/cast-voice/design, POST /api/v1/story-projects/{projectId}/mood-board/render-frames — so an agent signed in with the six reads and writes alone reaches the finish step with a key that is refused 403 insufficient_scope, after the generation it was finishing has already been paid for. Ask for artifact:publish in the same scope string you name the others — the device call above takes any scope the API offers, and the approval page lists each one before your user approves — or, if the agent needs the whole API, name every scope the server publishes (GET /api/v1/capabilities, or sleeperhit login --no-browser with no --scopes, which asks for all of them). A grant that names no scopes at all is the one thing that does not help here: it mints the read-only preset, every read and no write. The six are the minimum for the read/create/generate flow on purpose — artifact:publish spends credits, so it is not in the preset a writer narrows to by default, and that is exactly why an agent finishing an artifact has to ask for it by name.

The two remote surfaces

EndpointRoleAuthentication
https://sleeperhit.studio/mcpFull private creation and productionOAuth, or a Sleeper Hit API key as the bearer token
https://sleeperhit.studio/api/mcpPublic creator/story discovery onlyNone; read-only

Do not point a creation workflow at /api/mcp. It intentionally contains no private-account or generation tools.

Workflow map

The authenticated tool catalog is grouped so agents can decide what to call next. This list is generated from MCP_WORKFLOW_GROUPS in packages/shared/src/mcp-onboarding.ts — the same groups get_agent_guidance hands an assistant — when this page renders, so a group reaches it the day it joins the connector. The marker below is where that list goes; do not type one here by hand (BL-4356: this section's own copy stopped at 11 of 16 groups).

  1. Orientation and account — Confirm the connected identity and load live backend guidance before choosing a workflow. Start with whoami → get_capabilities → get_agent_guidance (no Studio Credits).
  2. Report a problem — When a Sleeper tool fails in a way the user did not cause, or the user says something is broken, offer report_issue; never ask them to paste errors, links or ids: the report captures them itself. The writer's own reports, and the team's reply, are one read away. Start with report_issue (no Studio Credits).
  3. Credits and usage — Check the available Studio Credit balance before any generation or rendering work. Start with get_credits (no Studio Credits).
  4. Your data: download it, or delete the account — Only when the writer asks: build "Download my data" and hand them the link; or show what deleting removes and the credit balance, schedule the deletion, or cancel it. Start with get_account_export → get_account_deletion (no Studio Credits).
  5. Connected products (business) — For a business organization: connect the systems the team works in — Notion and Linear can be connected today, and list_integrations names every product this account can connect. Choose what each brings in, feed a project's seasons from them, and review what they find. Read-only connections; nothing joins a season until someone keeps it. Start with list_integrations → get_integration_walkthrough (no Studio Credits).
  6. Projects and source material — Create or resume a project and ground it in notes, URLs, PDFs, research, or an existing script. Start with list_projects → create_project (reads before it spends).
  7. Product videos from app recordings — Make videos of a software product: recordings (captures) of the app following a tour per feature, then a video made from the captures alone; the product Bible those recordings are written from and its one product coverage pass come after them. Start with get_project → get_series_bible → list_app_captures (reads before it spends).
  8. Strategy: watches, opportunities, pursuits and contacts — The writer's career strategy outside any project: recurring watches that find opportunities, pursuits with action items, and contacts. Start with list_opportunity_watches → list_opportunities → list_pursuits (no Studio Credits).
  9. Research notes: what an episode knows — An episode's research notes (the Notes tab's Research page): list them, search their words, read one with its body, and start, edit or delete one. Start with list_research_notes → search_research_notes (no Studio Credits).
  10. Series Bible and development — Establish canon, format, characters, world, episode architecture, and foundational coverage. Start with get_series_bible → get_mood_board → get_cast_canon (priced before it runs).
  11. Planning and screenwriting — Create a reviewable plan, generate an installment, inspect real pages, and revise the same artifact — and read the writer's notices (a show episode held or failed, a renewal or auto top-up that failed, a refunded payment, a login that stopped signing in) with list_notifications and mark_notifications_read, or GET and POST /api/v1/notifications. Start with create_plan → get_plan (priced before it runs).
  12. Pitch deck rendering — Approve a pitch deck plan into a priced 480p render, review and choose takes chapter by chapter, then finish the deck at 720p (or 1080p) and export it. Start with create_plan → get_plan → create_job → get_pitch_deck_chapters (priced before it runs).
  13. Trailer rendering — Approve a trailer plan into a priced 480p render, review and choose takes, then finish the cut at 720p (or 1080p) and export it. Start with plan_trailer → get_trailer_beats → quote_approve_trailer_plan → approve_trailer_plan (priced before it runs).
  14. Table reads and audio — Cast, perform, score, add effects, and create durable audio from a screenplay-backed table read. Start with get_cast → get_table_read_script (priced before it runs).
  15. Video rendering — Direct theater motion and render a durable video from a reviewed artifact. Start with get_artifact → direct_theater_motion_beat (priced before it runs).
  16. Coverage and revision — Read existing coverage first, request analysis when needed, and revise before final packaging. Start with get_coverage → get_brand_coverage (priced before it runs).
  17. Seasons and automation — Operate controlled multi-installment season workflows. Start with list_season_runs (priced before it runs).
  18. Shows — Set up and run a show: a podcast that makes its own episodes from what its sources give (a feed, a topic in the news, Hacker News, a site, a repository), on its schedule, within spending caps the user agrees, after a preview the user hears, each episode credited in its show notes. Or read one an outside app makes under its standing approval. The user owns the show, its episodes and its feed. Start with create_project → save_series_bible → get_show → set_up_show → check_show_sources → quote_make_show_episode → make_show_episode → set_show_state (priced before it runs).
  19. Publishing and analytics — Prepare destinations and releases, then publish only after the user approves the exact externally visible action. Start with list_publishing_series → list_publishing_releases (reads before it spends).

The server attaches workflow metadata and MCP annotations to every authenticated tool. These are navigation hints, not authorization; OAuth or API key scopes and Story API handlers remain the enforcement boundary.

The annotations follow one rule, held by tests/unit/mcp-onboarding-annotations.test.ts:

  • Read-only (readOnlyHint: true): every get_ and list_ tool, plus whoami, background_activity and screenplay_draft_status. They change nothing and spend nothing, so a client can run them without asking.
  • Additive (destructiveHint: false): a short, pinned list of writes that only add something new and spend no Studio Credits. Examples are a new project, a source, a plan, a coverage report, a draft written into an empty episode, or a new sound cue. Each entry carries its reason in packages/shared/src/mcp-onboarding.ts.
  • Reversible settings (destructiveHint: false, idempotentHint: true, except a move, which is reversible but not idempotent): a pinned list of free changes that set an absolute value or choose among existing items, so they change back by being made again. Examples are a deck's look, a chosen take, an earlier cut restored, a cast voice, a voice's name, or a timeline clip's level and fades. They remove nothing and replace no text the writer wrote.
  • Destructive (destructiveHint: true): every other write. This includes anything that deletes, overwrites something saved, publishes or schedules outward, or spends credits, and every tool the server makes the user confirm. It's the MCP default, so a new tool is destructive until it is argued onto the additive list. Claude asks before every destructive call.

These are live post-creation controls over the same project and artifact lifecycle, not a separate demo catalog.

Workflow gates

  • Begin with identity, live agent guidance, and credits.
  • Attach user-provided source material before development.
  • For screenplay and series work, strongly encourage a complete Series Bible and review its development/visual readiness before generation.
  • Show the exact plan and quote before creating a credit-reserving job.
  • Poll async work with the matching get_* or list_* tool named in guidance.
  • Read existing screenplay coverage before requesting another report, then apply a focused revision pass before finalization or pitch packaging.
  • Distinguish live previews from durable finalized MP3/MP4 artifacts.
  • Never publish, schedule, share, cancel, delete, or make another externally visible change without explicit user intent.

Source of truth

  • Live availability: GET /api/v1/capabilities
  • Backend guidance and workflow navigation: GET /api/v1/agent-guidance
  • Full machine-readable tool map: https://docs.sleeperhit.studio/docs/mcp-tools.json
  • Client setup guide: https://docs.sleeperhit.studio/connect
  • Shared onboarding/workflow manifest (monorepo source): packages/shared/src/mcp-onboarding.ts

License

MIT. See LICENSE.