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;
GETandDELETEreturn 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/mcpAuthentication
- 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 callslist_projectsand passes the chosenprojectIdto 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 return403 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
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/mcpStart 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/mcpRun
/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 erawhoami— user, auth type, account key name and read-only state, plan, credits, projectslist_projects— accessible projects with post counts (an account key sees them all)get_project— settings plus per-providerconfiguredflagscreate_project— create a project (account key or OAuth; plan limits apply)update_project— schedule, language, length, subdomain, linking, credentials, webhookdelete_project✅ — delete a project and its posts (account key or OAuth)rotate_api_key✅ — new key returned once; the old key stops immediatelyextract_project_info— URL → name/description (5 per UTC day)generate_project_description— regenerate a description (same quota)get_project_backlinks— given/received Backlink Network countsget_analytics— 7/30/90-day totals, timeline, project stats, top posts
Posts and generation
list_posts— compact list (no markdown), filters and paginationget_post— full markdown, integration URLs, video statuscreate_post— title + markdown required; 0 creditsupdate_post— any editable field or status; 0 creditsdelete_post✅ — irreversibleapprove_post✅ — publish and push to every enabled integration (paid plan)decline_post— mark declined and unpublishedunpublish_post— revert to draft and remove from CMSsgenerate_post✅ — 1 credit (5 with a video); pollget_generation_statusget_generation_status— recent runs or oneinstanceIdgenerate_video✅ — 4 credits; needs YouTube + xAI voiceget_video_status— latest video job for a post
Integrations and connections
get_integrations— 13 providers,configuredflags, publish targetsupdate_integrations— configure any provider; credentials are write-onlytest_integration— test a CMS connection with optional overridesget_connect_url— browser URL for Shopify, YouTube, Google, Blogger or GSClist_connections— YouTube (account) and Shopify (project) connectionsdisconnect_connection✅ — remove a YouTube or Shopify connectionget_gsc_status— Search Console connection and token expirylist_gsc_sites— available Search Console propertiesdisconnect_gsc✅ — disconnect GSC everywhere (account key or OAuth)
Billing and voices
get_billing_status— plan, credits, limits, renewalcreate_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:
limit1–100 (default 50); request body 1 MB - 429
RATE_LIMITEDwithRetry-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 sendAuthorization: Bearer nb_u_...401 INVALID_API_KEY— key revoked, rotated or wrong; create an account key at /agents or copy the current project key403 ACCOUNT_SCOPE_REQUIRED— the credential is bound to one project; use an account key or OAuth403 READ_ONLY_KEY— the account key is read-only; create a read-write key403 PROJECT_SCOPE_VIOLATION— the project key belongs to another projectUPGRADE_REQUIRED— plan gating (approve needs a paid plan, project limit reached)INSUFFICIENT_CREDITS— nothing was spent; wait for renewal or upgradeCONFIRMATION_REQUIRED— retry withconfirm: trueif the effect is intended429 RATE_LIMITED— honourRetry-After404 NOT_FOUNDon 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.