The blog API, SDK and MCP: connect your other tools

Your blog should work with your other tools. Khalid has one blog API, a way for programs to talk to it, and everything else uses it: the admin, the command line and AI agents.

What the blog API does for you #

  • Show posts anywhere. The Content API gives your posts to a website, an app or another site builder.
  • Automate the work. The Admin API creates, edits and publishes posts from your own scripts.
  • Let AI agents help. The MCP server lets an AI assistant that speaks MCP, the Model Context Protocol, use your blog through the same API, with the same checks.
  • React when things happen. Webhooks tell your other tools when a post is published, a form is sent or a subscriber joins.
  • Stay in control. Each API key has a scope, keys are stored only in a scrambled form, and you can revoke a key at any time.

How it works #

Make a key on the command line, inside your blog's folder, or in the admin:

khalid keys create

The blog API is described in an OpenAPI file, a standard description that many tools read. A TypeScript SDK, a ready-made library for JavaScript and TypeScript code, comes with Khalid. For AI agents, run khalid mcp, and run khalid agents to print a guide written for them.

There are also starter projects for showing Khalid posts inside an Astro or a Next.js site, for teams whose main website is built with one of those.

See it live #

The blog API needs Khalid running as a server, so the demo has none. You can read every part on GitHub:

Next: blog hosting and speed. Also see theme sync and languages.

About the author

The Khalid team

Makers of Khalid at SerpDad

Experience Builds Khalid in the open, with every change checked by tests before it lands

Khalid is made by SerpDad, a small team that builds SEO tools. The code is written by Claude, an AI model from Anthropic, and reviewed against a written ten-point checklist before it lands. Every rule, test and decision is public in the repository, so you can check how any part of Khalid works.

Free and open source. Pick one of three ways to start.

Start a blog

Posts that link here

Comments are not open on this site.