MCP Server

AI agents & LLMs: read this documentation as Markdown at nextblog.ai/docs/mcp.md or browse the per-section Markdown index.
The NextBlog MCP server lets AI agents — Claude, ChatGPT, Cursor, VS Code, Claude Code and any other Model Context Protocol client — run your account by chatting. It exposes 37 tools covering the same actions as the dashboard and the Full REST API. Included on every plan.
  • Endpoint: https://nextblog.ai/api/mcp
  • Transport: Streamable HTTP, stateless (no session). Both protocol eras answer from the same URL; GET and DELETE return 405.
  • Hosted only — no npm or stdio package to install.
  • The server never charges a card: credit-spending and destructive tools need confirm: true, billing tools return Stripe URLs.
https://nextblog.ai/api/mcp

Authentication

  • Account API key (recommended, account-wide): Authorization: Bearer nb_u_.... Create one at /agents → Account API keys: the secret is shown once, can be read-only and is revocable immediately. One key covers every project; the agent calls list_projects and passes the chosen projectId to each project tool.
  • OAuth 2.1 (account-wide, browser consent): the client discovers /.well-known/oauth-protected-resource, opens the NextBlog consent page and you approve. Nothing to copy.
  • Project API key (legacy, one project): Authorization: Bearer nb_.... Account-level tools return 403 ACCOUNT_SCOPE_REQUIRED.
  • A read-only account key refuses every mutating tool with 403 READ_ONLY_KEY; read tools keep working.
  • Review and revoke every connected client on /agents. An OAuth token already issued keeps working until it expires (about an hour); an account key stops on the next request.
  • Unauthenticated calls return 401 with WWW-Authenticate: Bearer resource_metadata="https://nextblog.ai/.well-known/oauth-protected-resource".

Connect a client

Client guides: Claude · ChatGPT · Cursor · Hermes · Claude Code · Codex · VS Code.
Claude (web and desktop)
Settings → Connectors → Add custom connector. Name NextBlog, remote MCP server URL:
Name: NextBlog
Remote MCP server URL: https://nextblog.ai/api/mcp
Start a chat and ask “List my NextBlog projects.” The consent page opens the first time.
ChatGPT
Settings → Connectors → add a custom connector (developer mode if your workspace offers it) and paste https://nextblog.ai/api/mcp as the server URL. The first tool call opens the NextBlog consent page.
Cursor
Add to ~/.cursor/mcp.json (or .cursor/mcp.json):
{
  "mcpServers": {
    "nextblog": {
      "url": "https://nextblog.ai/api/mcp"
    }
  }
}
Settings → MCP lists nextblog; Cursor starts the OAuth flow on first use. For a header-only setup add "headers": { "Authorization": "Bearer nb_u_..." } — one account key covers every project.
VS Code
Add to .vscode/mcp.json:
{
  "servers": {
    "nextblog": {
      "type": "http",
      "url": "https://nextblog.ai/api/mcp"
    }
  }
}
Run “MCP: List Servers”, select nextblog and start it.
Claude Code
claude mcp add --transport http nextblog https://nextblog.ai/api/mcp
Run /mcp inside Claude Code to authenticate, or claude mcp list to confirm the connection.

Tools (37)

confirm: true is required by tools marked ✅; without it the call returns CONFIRMATION_REQUIRED and changes nothing.
Connection and account
  • ping — health check: server name, version, protocol era
  • whoami — user, auth type, account key name and read-only state, plan, credits, projects
  • list_projects — accessible projects with post counts (an account key sees them all)
  • get_project — settings plus per-provider configured flags
  • create_project — create a project (account key or OAuth; plan limits apply)
  • update_project — schedule, language, length, subdomain, linking, credentials, webhook
  • delete_project ✅ — delete a project and its posts (account key or OAuth)
  • rotate_api_key ✅ — new key returned once; the old key stops immediately
  • extract_project_info — URL → name/description (5 per UTC day)
  • generate_project_description — regenerate a description (same quota)
  • get_project_backlinks — given/received Backlink Network counts
  • get_analytics — 7/30/90-day totals, timeline, project stats, top posts
Posts and generation
  • list_posts — compact list (no markdown), filters and pagination
  • get_post — full markdown, integration URLs, video status
  • create_post — title + markdown required; 0 credits
  • update_post — any editable field or status; 0 credits
  • delete_post ✅ — irreversible
  • approve_post ✅ — publish and push to every enabled integration (paid plan)
  • decline_post — mark declined and unpublished
  • unpublish_post — revert to draft and remove from CMSs
  • generate_post ✅ — 1 credit (5 with a video); poll get_generation_status
  • get_generation_status — recent runs or one instanceId
  • generate_video ✅ — 4 credits; needs YouTube + xAI voice
  • get_video_status — latest video job for a post
Integrations and connections
  • get_integrations — 13 providers, configured flags, publish targets
  • update_integrations — configure any provider; credentials are write-only
  • test_integration — test a CMS connection with optional overrides
  • get_connect_url — browser URL for Shopify, YouTube, Google, Blogger or GSC
  • list_connections — YouTube (account) and Shopify (project) connections
  • disconnect_connection ✅ — remove a YouTube or Shopify connection
  • get_gsc_status — Search Console connection and token expiry
  • list_gsc_sites — available Search Console properties
  • disconnect_gsc ✅ — disconnect GSC everywhere (account key or OAuth)
Billing and voices
  • get_billing_status — plan, credits, limits, renewal
  • create_checkout_link — Stripe Checkout URL (never charges)
  • create_billing_portal_link — Stripe Customer Portal URL (never charges)
  • list_voices — ElevenLabs and xAI voices for video narration

Limits

  • 120 requests/minute and 1,000/hour per token, shared with REST v1
  • 10 generations/hour, 10 videos/hour, 20 billing links/hour
  • 200 KB markdown, 200-character title, 500-character description
  • List pages: limit 1–100 (default 50); request body 1 MB
  • 429 RATE_LIMITED with Retry-After; per-tool limits surface as a tool error with the same code

Troubleshooting

  • 401 AUTH_REQUIRED — no credential; let the client run OAuth or send Authorization: Bearer nb_u_...
  • 401 INVALID_API_KEY — key revoked, rotated or wrong; create an account key at /agents or copy the current project key
  • 403 ACCOUNT_SCOPE_REQUIRED — the credential is bound to one project; use an account key or OAuth
  • 403 READ_ONLY_KEY — the account key is read-only; create a read-write key
  • 403 PROJECT_SCOPE_VIOLATION — the project key belongs to another project
  • UPGRADE_REQUIRED — plan gating (approve needs a paid plan, project limit reached)
  • INSUFFICIENT_CREDITS — nothing was spent; wait for renewal or upgrade
  • CONFIRMATION_REQUIRED — retry with confirm: true if the effect is intended
  • 429 RATE_LIMITED — honour Retry-After
  • 404 NOT_FOUND on every call — the MCP server is disabled on this deployment
Canonical Markdown: /docs/mcp.md. Every action also has an HTTP equivalent in the Full REST API.