Back to blogs
MCP Integration

Use Codex, Claude, and OpenCode with EZPost

Connect an AI agent to your blog through one secure MCP endpoint. Draft in Markdown, update posts, manage categories, and publish without writing an API client.

Updated July 2026·7 min read

Yes, EZPost supports MCP today. The production API exposes a stateless Streamable HTTP server at /api/v1/mcp, protected by the same API keys as the External API.

What the agent can do

MCP lets a compatible agent discover EZPost's tools and input schemas at runtime. The agent chooses a tool, asks for approval when its client requires it, and sends the request under your account. There is no separate SDK or generated client to maintain.

list-postsSearch and filter drafts or published posts
get-post-by-slugRead a published post and related posts
create-postCreate a Markdown or BlockNote draft
update-postEdit an existing post by ID
delete-postDelete a post by ID
publish-postPublish a draft
unpublish-postReturn a post to draft
list-categoriesList categories and subcategories
create-categoryCreate a category
create-subcategoryCreate a nested category

Before you connect

  1. Create a key in Settings → API Keys.
  2. Export it as an environment variable so it does not enter a project config or Git history.
  3. Use the hosted EZPost MCP endpoint shown below.
terminal
Loading…

Codex

Codex reads MCP servers from ~/.codex/config.toml. Theenv_http_headers mapping keeps the key outside the file.

~/.codex/config.toml
Loading…

Start a new Codex session, then verify with codex mcp get ezpost.

Claude Code

Claude Code supports remote HTTP servers in .mcp.json and expands environment variables in headers.

.mcp.json
Loading…

Run claude mcp list or open /mcp inside Claude Code to confirm the connection.

OpenCode

OpenCode describes HTTP MCP connections as remoteservers. Disable OAuth discovery because EZPost uses an API key header.

opencode.json
Loading…

Run opencode mcp list to inspect its connection status.

Cursor and VS Code

Other MCP clients use the same endpoint and header, but their config envelope differs. For Cursor, add an HTTP server namedezpost in its MCP settings. In VS Code, run MCP: Add Server, choose HTTP, then keep the key in a secure input variable rather than source control. The complete client-specific guide stays at /docs/mcp.

A useful first workflow

Start with a draft and review it before publishing. For example:

“List my categories, create a Markdown draft titled ‘Shipping a NestJS app safely’, and show me the new post before doing anything else.”

After review, ask the agent to update the draft or publish it. Keep destructive actions such as delete-post behind your client's approval prompt.

Security and current limits

API keys must be active and unexpired. Rotate a key if it is pasted into a tracked file or shared transcript.
Every tool is scoped to the user who owns the API key. Use HTTPS outside local development.
EZPost currently supports stateless Streamable HTTP only. OAuth, stdio, server notifications, and MCP resources are not part of this release.

Troubleshooting

  • 401: the x-api-key header is missing, invalid, inactive, or expired.
  • No tools: restart the client or open a new session after changing its MCP config.
  • Tool error: inspect the returned message for a missing post, duplicate slug, or invalid category ID.

Connect your agent

See the full tool reference, request format, and manual curl check in the setup guide.