MCP server

Connect AI agents to your Inventra organization.

Inventra ships a hosted Model Context Protocol server that lets any MCP-compatible agent — Claude Code, Claude Desktop, Cursor, and others — read and write blocks, blog posts, categories, tags, and sitemap entries in your organization. Give the agent an API key, point it at the endpoint, and it can manage your content the same way you would from the dashboard.

How it works

Endpoint https://www.inventra.sh/api/mcp
Transport HTTP (Streamable HTTP, no SSE)
Auth OAuth 2.1 (sign in with email) — or an x-api-key header for clients that don't speak OAuth
Scope Every call is scoped to your active organization. Agents never pass an orgId — it's inferred from the token.

Choose your setup

  • Claude Desktop — use the Connectors UI (no JSON, no API key). See Claude Desktop below.
  • Claude Code, Cursor, scripts — use the API key (x-api-key header). See Claude Code.
  • Stdio-only clients — wrap the HTTP endpoint with mcp-remote. See Stdio fallback.

Get your API key (for non-OAuth clients)

From the dashboard, go to Settings → API key, copy the key, and treat it like a production secret.

INVENTRA_API_KEY=inventra_xxx

Regenerating the key invalidates the old one immediately, so every client using the previous value will need to be updated.

Install in your client

Claude Desktop

Claude Desktop supports Inventra natively through OAuth — no JSON editing, no API key.

  1. In Claude Desktop, open Settings → Connectors → Add custom connector.
  2. Set Name to Inventra and Remote MCP server URL to https://www.inventra.sh/api/mcp.
  3. Click Add. A browser tab opens at www.inventra.sh asking you to sign in.
  4. Sign in with the email you use for Inventra. Approve the authorization prompt.
  5. Back in Claude Desktop, the Inventra connector is now active. Try asking "List the blocks in my organization" in any chat.

The token is bound to the organization that's active in your Inventra dashboard at the moment you sign in. To switch the connector to a different organization, switch your active org in the dashboard, then disconnect and re-add the connector.

Claude Code

Add the server to your project's .mcp.json (or the global ~/.claude.json):

{
  "mcpServers": {
    "inventra": {
      "type": "http",
      "url": "https://www.inventra.sh/api/mcp",
      "headers": {
        "x-api-key": "inventra_xxx"
      }
    }
  }
}

Or use the CLI:

claude mcp add --transport http inventra https://www.inventra.sh/api/mcp \
  --header "x-api-key: inventra_xxx"

Cursor

Add the server to ~/.cursor/mcp.json (global, available in every project) or .cursor/mcp.json in your repo (project-scoped):

{
  "mcpServers": {
    "inventra": {
      "url": "https://www.inventra.sh/api/mcp",
      "headers": {
        "x-api-key": "inventra_xxx"
      }
    }
  }
}

Open Cursor Settings → MCP to confirm the server is listed and showing a green status.

Other clients

Any MCP client that can speak Streamable HTTP will work. Point it at https://www.inventra.sh/api/mcp and either complete the OAuth flow or attach the x-api-key header.

Stdio fallback

For clients that only support stdio transports (or older agents that can't speak HTTP MCP at all), wrap the endpoint with mcp-remote:

{
  "mcpServers": {
    "inventra": {
      "command": "npx",
      "args": [
        "mcp-remote",
        "https://www.inventra.sh/api/mcp",
        "--header",
        "x-api-key:inventra_xxx"
      ]
    }
  }
}

mcp-remote is fetched on demand via npx, so you need Node 18+ on your PATH. If npx is being shadowed by an older Node version, pin the absolute path (e.g. "command": "/path/to/node-20/bin/npx").

Verify it works

Ask your agent:

List the blocks in my organization.

It should call list_blocks and return the blocks you see in the dashboard. If you get an authentication error, re-check the x-api-key header — see Troubleshooting.

Available tools

All tools are automatically scoped to the organization behind the API key. Agents don't need to pass an orgId.

Blocks

Tool Purpose
list_blocks Paginated listing of blocks. Supports search, sort, and filtering by status.
list_blocks_schema Discovery view of every block with its field contracts — use when the agent needs to understand block structure before editing.
get_block Fetch a single block by UUID or slug.
create_block Create a block (name, slug, pages, fields).
update_block Patch an existing block.
delete_block Delete a block by ID.
duplicate_block Clone a block with media URLs cleared so they can be replaced.
check_block_slug Check whether a slug is available before creating.
list_block_pages List the distinct page names blocks are grouped under.

Content

Tool Purpose
list_contents Paginated listing of blog posts and articles (body excluded for speed).
get_content_by_id Fetch a full content item including its body.
get_content_by_slug Fetch a published item by slug.
create_content Create a blog post or article (draft or published — scheduling goes through the dashboard).
update_content Patch an existing content item.
delete_content Delete a content item by ID.

Taxonomy & organization

Tool Purpose
list_categories All categories in the org, sorted alphabetically.
list_tags All tags in the org, sorted alphabetically.
list_organization_users Read-only list of organization members.
get_organization Org metadata plus public integration keys (e.g., Google Analytics measurement ID). Never returns the API key or secret credentials.

SEO

Tool Purpose
get_sitemap_entries Published slugs with ISO 8601 lastModified timestamps, ready to feed a Next.js sitemap.ts.

Troubleshooting

Symptom Likely cause
401 Unauthorized on every call Missing, mistyped, or regenerated x-api-key. Copy a fresh value from Settings → API key.
Client can't find the server The client only supports stdio transports. Wrap the URL with mcp-remote — see Stdio fallback.
Tools return empty arrays The API key belongs to an org that has no content yet. Double-check you're using the key for the right organization in the dashboard.
Changes aren't showing up on your site The MCP writes to Inventra immediately, but your website's cache may still be warm. See Production setup → Caching.