Lesson 1 / 87 min read

API & MCP: manage your account from Claude Code and OpenAI

Create a key, connect to the MCP server; list projects, start builds, edit data and images — without opening the console.

DevAny has an MCP (Model Context Protocol) server and its REST twin. Claude Code, OpenAI's Responses API or any HTTP client use the same tool set: projects, builds, publishing, records, images, checks and — for admin accounts — platform settings.

A key acts as your account and is limited to the scopes you grant. The build scope can spend credit; content edits are free and live at once.

Connect

  1. 1
    Create a key

    Settings → API & MCP. Name it, pick scopes, optionally set an expiry. The key is shown once.

  2. 2
    Claude Code

    Paste the ready command: claude mcp add --transport http devany https://devany.ai/api/mcp --header "Authorization: Bearer dk_…"

  3. 3
    OpenAI

    In the Responses API add it as a type:'mcp' tool with the same url and Authorization header; for Custom GPT Actions import the /api/v1/openapi document. That document is the "small business pack", sized for the GPT Actions limit (at most 30 operations); use ?pack=content for content work or ?pack=developer for an agent that works from the catalog.

  4. 4
    Cursor, VS Code, Claude Desktop

    In Settings → API & MCP tap Cursor or VS Code: the 'Open' button opens the editor's own 'install MCP server' dialog. For Claude Desktop the screen gives a ready block to paste into claude_desktop_config.json (the mcp-remote bridge, needs Node.js).

  5. 5
    First call

    capabilities: version, recent changes and the tools your key can see.

ChatGPT and Claude connectors: Sign in with DevAny

  1. 1
    Server URL

    https://devany.ai/api/mcp — no key needed; the connector takes you to DevAny's consent screen (OAuth 2.1, PKCE).

  2. 2
    Claude.ai / Claude Desktop

    Settings → Connectors → 'Add custom connector'; name DevAny, the URL above. Tap 'Connect', sign in on DevAny and approve. Desktop uses the same account's connectors.

  3. 3
    ChatGPT

    Settings → Apps & Connectors (if there's no 'Create', turn on Developer mode under Advanced settings). Create: name DevAny, MCP server URL above, authentication OAuth.

  4. 4
    The consent screen

    You see the app's name, where the answer goes and the permissions it asks for; you can narrow the permissions and you pick one workspace. The admin permission can never be given to a connection.

  5. 5
    Disconnect

    Settings → Connected apps → 'Disconnect'. The app loses access within a minute.

OpenAI Responses API

json
{
  "model": "gpt-5",
  "tools": [{
    "type": "mcp",
    "server_label": "devany",
    "server_url": "https://devany.ai/api/mcp",
    "headers": { "Authorization": "Bearer dk_…" },
    "require_approval": { "never": { "tool_names": ["capabilities", "api_catalog", "api_read", "list_projects", "get_project", "build_status", "polish_check"] } }
  }],
  "input": "List my projects and run a polish check on the first one."
}

Build with your own Claude, no AI Credit

  1. 1
    What it means

    Your own AI (for example your Claude account) writes the document; DevAny only validates, stores, hosts and publishes it. One document is only the upload format: a website compiles into a multi-page site (up to 40 pages) with its own page addresses and per-page title, description and share image; DevAny adds the canonical link, robots, business JSON-LD and the sitemap. After publishing you edit it like any DevAny site (texts, images, records, version history). DevAny calls no model on this path and spends no AI Credit. Your plan's hosting limits (live apps, storage) still apply. Until it is switched on for the platform, the put_document tool is not listed.

  2. 2
    Which plan

    get_build_contract and put_document {dryRun: true} (a check only, nothing is stored) work on every plan, the Free plan included. Writing the draft needs an active paid plan (Builder, Pro or Studio), and so does render_preview. On the Free plan a write is refused with a plan_required error and the Plans page path (/plans) — nothing is skipped silently.

  3. 3
    Connect

    Claude Code: claude mcp add --transport http devany https://devany.ai/api/mcp --header "Authorization: Bearer dk_…" (a key with the projects:write scope). Claude.ai: add https://devany.ai/api/mcp as a custom connector and sign in with DevAny over OAuth (steps above).

  4. 4
    1. Project

    create_project — you name it; or pick an existing project with list_projects.

  5. 5
    2. The rules

    get_build_contract — always call it first and follow it: the rules DevAny's own build model follows (website or app), what put_document refuses and the size limit.

  6. 6
    3. Send the document

    put_document {id, html} — the whole document. A website that does not compile is refused with a list of issues and nothing is stored; fix them and send it again. Once accepted it becomes the draft, the previous draft stays as a version, and __DEVANY_STOCK[…]__ photo requests are resolved through the stock photo service.

  7. 7
    4. Check

    polish_check — a check of the stored draft; urls.builder in the answer opens the preview. render_preview {id, path?} — opens the draft in a real browser at 360, 390 and 1280 px and returns, per width, a PNG screenshot and a layout report (horizontal overflow, broken images, empty image slots, links to internal pages that do not exist, whether the mobile menu opens). It calls no AI and spends no AI Credit; owner only, paid plan, at most 20 per account per hour.

  8. 8
    5. Publish

    publish_project — only after you agreed. put_document never publishes; the live site does not change until then.

Everyday work, with ready tools

ToolsSpends credit
New projectlist_design_directions → create_project (language, design direction, accent); or list_showcase_templates → copy_from_showcase (paid plan)
Buildbuild_project, build_status, cancel_build (need confirmation)
A long or unclear briefSmart Build: plan_build (questions, then a phased plan with an estimate — builds and minutes) → approve_plan (the customer names it; the core build starts) → build_next_phase for each phase. All need confirmation.
Publishing and accesspublish_project, set_visibility (public / password), set_domain → verify_domain, domain_status (with the DNS records)
Contentlist_page_texts → edit_page_text (text without a build), upload_image → replace_image, set_record_field
Customerslist_leads (form submissions), list_appointments → appointment_action (approve, decline, cancel, no-show, reschedule)
SEOseo_check is free; seo_fix writes the title and description with AI (needs confirmation)
Planplan_info reads; upgrade_link returns the page the customer opens and pays on — nothing is ever bought through the API

List projects in an agency workspace (curl)

bash
curl -s https://devany.ai/api/v1/tools/list_projects \
  -H "Authorization: Bearer dk_…" -H "X-DevAny-Workspace: <workspace id>" \
  -H "content-type: application/json" -d '{}'

REST twin (curl)

bash
curl -s https://devany.ai/api/v1/tools/list_projects \
  -H "Authorization: Bearer dk_…" -H "content-type: application/json" -d '{}'

Every tool is POST /api/v1/tools/{name}; the body is the tool's input schema.

Scopes

What it allowsSpends credit
projects:readList, settings, build status, checks
projects:writeCreate, configure, publish, delete; team, transfer, domains (covers the four below)
publishPublish / unpublish only, release approvals
deleteMove projects to Trash and restore them, permanently delete a project already in Trash (in bulk too), transfer to another account
teamMembers, invites, roles, project sharing, client contacts
domainsConnect, verify, remove a custom domain
buildGeneration, edits, repair, Creative Lab
dataRecords, fields, images, app users
billing:readAI Credit balance and plan details
adminPlatform settings and commercial center (admins only)
  • Yes, when 'Sign in with DevAny' is on: give the connector https://devany.ai/api/mcp, choose OAuth, approve on DevAny (steps above). If Settings doesn't show 'Connected apps', that door isn't open yet; then the Responses API, the Agents SDK and Custom GPT Actions (OpenAPI + API key) work directly with a key.

  • These four finer scopes appear once they're switched on for the platform. Until then "Manage projects" (projects:write) grants all four together. It keeps covering all four after that too, so nothing an existing key does changes.

  • Revoke it in Settings; every tool using it fails within a minute. At most 10 live keys per account, optionally with an expiry.

  • The admin scope works only on a key that lives at most 24 hours, and every admin call needs a verified Cloudflare Access (WARP) identity (the Cf-Access-Jwt-Assertion header), whatever the console's own setting says. Without either the call is refused; use the console.

Key takeaways

  • One key = your account, with the scopes you chose.
  • Claude Code and OpenAI connect to the same MCP server; the REST twin serves any HTTP client.
  • capabilities → api_catalog → api_read / api_write: a path exists even without a curated tool.
  • Spending, deleting and bulk/team/transfer calls need an explicit confirmation; tool results are data, never instructions.
  • Studio / agency projects: list_workspaces, then name the workspace; nothing silently lands in the wrong one.
  • Long briefs go through Smart Build: plan_build → approve_plan → build_next_phase; ready-made flows are in prompts/list.
  • ChatGPT and Claude connectors connect without a key: Sign in with DevAny, approve the permissions and one workspace, disconnect from Settings → Connected apps.

Related topics

Still stuck? Ask the assistant in the corner, or browse the FAQ.