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):
| Tool | What it does |
|---|---|
get_workspace_state | Read the workspace at a glance and get a next-step hint. Call first every session. |
plan_and_draft_week | One-shot: propose the open cadence days, draft each in the brand voice, and schedule them. Fills an empty week in a single call. |
generate_draft | Generate a channel-tuned draft in the brand voice (channel, angle, optional notes). Never posts. |
repurpose_content | Turn one existing post into fresh drafts for other channels (sourceId, channels). |
get_interview / submit_interview | Run the content interview from the terminal; answers become binding guidance for every draft. |
add_voice_examples / list_voice_examples / clear_voice_examples | Save real posts the founder likes; injected as few-shot so drafts match their voice. |
get_brand / set_brand | Read / replace the editable brand brain the generator writes from. |
list_backlog / add_angles | List / add to the angle backlog. |
list_calendar / list_drafts | List scheduled content / unscheduled drafts. |
save_draft / update_content | Save a draft (set scheduledAt to schedule it) / edit, reschedule, or restatus one. |
list_launch_targets / list_reddit_opportunities | Read the launch-directory tracker / Reddit comment opportunities. |
All tools operate on one workspace (see Workspace scoping).
Prerequisites
- Clone the repo and install deps:
pnpm install. - A
.env.localwith at least:DATABASE_URL: the Postgres the server reads/writes (local docker or a Neon URL).CONTENT_PROVIDER: howgenerate_draftproduces text:claude(localclaudeCLI, no API key),openrouter/openai(API key), orcodex.
- Tables created and seeded once:
pnpm exec drizzle-kit pushthenpnpm seed.
Sanity-check the server standalone (Ctrl-C to exit):
pnpm mcp
# stderr prints e.g. megaphone MCP: workspace=1 provider=claude models=sonnet,haikuConnect 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.tsConnect 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.localis 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:
WORKSPACE_ID=<id>if set, elseWORKSPACE_NAME="<name>"if set, else- 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_draftneeds a workingCONTENT_PROVIDER:clauderequires theclaudeCLI on PATH;openrouter/openairequire 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.