Wraith

Ghost’s publishing model, rebuilt on Phoenix LiveView.

Members, newsletters, paid tiers, comments and eighteen themes, as you would expect from a Ghost-style platform. Then the parts that are Wraith’s own: widgets readers use together in real time, one table on DynamoDB or Postgres, and an MCP server that lets an agent run the whole site.

$ git clone https://github.com/bmalum/wraith.git
$ cd wraith && mix setup
$ mix phx.server
# then open localhost:4000/admin/setup

Needs Elixir 1.17 or newer and Erlang/OTP. Development uses an in-memory store, so there is no database to set up.

A post in the Paper theme: Writing at 2 a.m., with a feature image and a live counter widget
A post with a live counter, in the default Paper theme.

Posts that stay live.

Put a counter, a poll, reactions or a countdown in a post with one line of Markdown. Every reader of the page shares the widget’s state, so a vote in one tab shows up in every other open tab at once.

{{widget poll question="Tabs or spaces?" options="Tabs|Spaces" id=tabs}}

Widgets are Lua. You write them in the admin next to a live preview, every save is a version you can roll back to, and they run in a sandbox: no file access, network only to hosts you allow, 250 ms per call and 64 KB of state.

A counter reading 0, labelled Readers who agree, and a poll asking Tabs or spaces with three options
The counter and poll from the demo post, in the Paper theme.

A whole widget: a clap button every reader shares.

function init(props) return { claps = 0 } end
function render(state, props, meta)
  return '<button class="w-btn" ' .. wraith.action("clap") .. '>👏 '
      .. wraith.format(state.claps) .. '</button>'
end
function handle(state, event, payload, meta)
  if event == "clap" then state.claps = state.claps + 1 end
  return state
end

An agent can run the whole site.

Everything the admin can do is an MCP tool, 53 of them: drafting and publishing posts, sending newsletters, managing members, writing and testing widgets, changing the theme. Connect Kiro CLI, Claude or Cursor to /mcp with an Admin key. Tools respect staff roles, and a Content key gets 6 read tools that see only what the public site shows.

kiro-cli mcp add --name wraith \
  --url https://your-site/mcp \
  --header "Authorization: Bearer <admin key>"

Inside the admin, the agent studio runs a Kiro agent on a Lambda MicroVM with the same tools. You watch the transcript and approve each change before it is made. Without a MicroVM configured it runs a scripted offline agent, so the flow works on a laptop too.

Every tool, with its arguments

The MCP catalogue, generated from Wraith.Tools.
AreaExamplesTools
Posts, pages, newslettersposts_list, post_get, post_revisions13
Widgetswidgets_list, widget_get, widget_docs11
Membersmembers_list, member_get, member_create8
Site, settings, themessite_info, settings_get, settings_update6
Authorsauthors_list, author_create, author_update4
Tagstags_list, tag_upsert, tag_delete3
Uploadsuploads_list, upload_from_url, upload_base643
API keysapi_keys_list, api_key_create, api_key_delete3
Commentscomments_list, comment_moderate2

Coming from Ghost.

Export your site in Ghost under Settings, Labs, Export, and upload the file in Wraith’s admin under Integrations. Existing slugs and emails are skipped, so you can run the import again.

Comes across

  • Posts and pages, with their HTML turned into Markdown.
  • Tags and authors. Authors set a new password by mail.
  • Members, with their status and labels.
  • The Content API, in Ghost’s JSON shape. A front-end written against it needs a new key and little else.

Not there yet

  • Ghost themes. Handlebars templates don’t run; Wraith themes are Phoenix components.
  • Stripe links. Paid members keep their status, but billing has to be connected again.
  • Ghost Admin API clients. The JSON is Ghost-shaped, the authentication is a Bearer key, not Ghost’s signed tokens.
  • ActivityPub and the social web.

One table, three databases.

Wraith keeps everything in a single table with one secondary index. Run it on DynamoDB, PostgreSQL or Aurora DSQL; development uses an in-memory store. The adapters are small, and the same test suite runs against each one. mix wraith.table creates the table on any of them.

StoreGood for
MemoryDevelopment and tests, the default in dev. Nothing persists.
DynamoDBAWS with no database server to run. A TTL clears expired sessions.
PostgreSQLAny Postgres you already operate. One items table, JSON per row.
Aurora DSQLServerless and Postgres-compatible, with an IAM token per connection.