Megaphone

Connect to the MCP server

Drive the Megaphone console from a terminal AI client over a local stdio MCP server.

Megaphone ships a local MCP server so your terminal AI client can drive the content console (generate drafts, read the calendar/backlog/launch tracker, and save content) without opening the web UI.

It is a stdio server (runs locally, talks over stdin/stdout) against the same Postgres the app uses. It is not a hosted remote MCP.

Tools

A selection of the most-used tools (28 in total; the server advertises the full list):

ToolWhat it does
get_workspace_stateRead the workspace at a glance and get a next-step hint. Call first every session.
plan_and_draft_weekOne-shot: propose the open cadence days, draft each in the brand voice, and schedule them. Fills an empty week in a single call.
generate_draftGenerate a channel-tuned draft in the brand voice (channel, angle, optional notes). Never posts.
repurpose_contentTurn one existing post into fresh drafts for other channels (sourceId, channels).
get_interview / submit_interviewRun the content interview from the terminal; answers become binding guidance for every draft.
add_voice_examples / list_voice_examples / clear_voice_examplesSave real posts the founder likes; injected as few-shot so drafts match their voice.
get_brand / set_brandRead / replace the editable brand brain the generator writes from.
list_backlog / add_anglesList / add to the angle backlog.
list_calendar / list_draftsList scheduled content / unscheduled drafts.
save_draft / update_contentSave a draft (set scheduledAt to schedule it) / edit, reschedule, or restatus one.
list_launch_targets / list_reddit_opportunitiesRead the launch-directory tracker / Reddit comment opportunities.

All tools operate on one workspace (see Workspace scoping).

Prerequisites

  1. Clone the repo and install deps: pnpm install.
  2. A .env.local with at least:
    • DATABASE_URL: the Postgres the server reads/writes (local docker or a Neon URL).
    • CONTENT_PROVIDER: how generate_draft produces text: claude (local claude CLI, no API key), openrouter/openai (API key), or codex.
  3. Tables created and seeded once: pnpm exec drizzle-kit push then pnpm seed.

Sanity-check the server standalone (Ctrl-C to exit):

pnpm mcp
# stderr prints e.g.  megaphone MCP: workspace=1 provider=claude models=sonnet,haiku

Connect from Claude Code

The repo already registers the server in .mcp.json, so from the repo directory:

claude          # then run /mcp and approve "megaphone"

Or add it explicitly anywhere:

claude mcp add megaphone -- node_modules/.bin/tsx scripts/mcp-server.ts

Connect from another MCP client

Any stdio-capable client (Cursor, Windsurf, VS Code, custom hosts) uses the same command. Point it at the repo directory and run:

  • Command: node_modules/.bin/tsx
  • Args: scripts/mcp-server.ts
  • Working dir: the megaphone repo root (so .env.local is found)

Example client config (Cursor .cursor/mcp.json, Windsurf mcp_config.json, etc.):

{
  "mcpServers": {
    "megaphone": {
      "command": "node_modules/.bin/tsx",
      "args": ["scripts/mcp-server.ts"],
      "cwd": "/absolute/path/to/megaphone",
      "env": {}
    }
  }
}

If your client does not set cwd, pass the DB + workspace via env instead, e.g. { "DATABASE_URL": "postgresql://…", "CONTENT_PROVIDER": "openrouter", "OPENROUTER_API_KEY": "sk-or-…" }.

Workspace scoping

Megaphone is multi-workspace. The MCP session operates on a single workspace, resolved once at startup:

  1. WORKSPACE_ID=<id> if set, else
  2. WORKSPACE_NAME="<name>" if set, else
  3. the newest workspace (a default is created + seeded if the DB has none).

Set it per client via the env block, e.g. { "WORKSPACE_NAME": "Acme" }, to make the terminal act on a specific workspace.

Notes

  • generate_draft needs a working CONTENT_PROVIDER: claude requires the claude CLI on PATH; openrouter/openai require the matching API key in the env.
  • Nothing here posts to any external platform; every tool returns a draft or data for you to review.