AI-assistent via MCP

Låt en AI-assistent sköta hemsidan åt dig

MCP (Model Context Protocol) är ett öppet sätt för AI-assistenter som Claude att använda verktyg. Koppla din assistent till DizWeb, så kan den läsa och skriva sidor, hämta bilder, byta tema och läsa formulärsvar, direkt från chatten. Den här sidan visar hur du ansluter och vad assistenten kan göra.

Vad kan assistenten göra?

Du skriver vad du vill ha gjort, med vanliga ord. Assistenten hittar rätt sida, gör ändringen i ett utkast och berättar vad den har gjort. Till exempel:

  • ”Skriv om texten på startsidan så att den låter mer personlig.”
  • ”Skapa en sida om våra tjänster med en knapp till kontaktformuläret.”
  • ”Lägg till menylänken ”Boka tid” som går till vår bokningssida.”
  • ”Hämta tre ljusa bilder på kaffe från bildbanken och gör ett galleri.”
  • ”Byt till ett ljusare tema och använd vår gröna färg #2f6f4f.”
  • ”Vi har nya öppettider. Uppdatera dem överallt på sajten.”
  • ”Visa veckans formulärsvar.”
  • ”Ångra den senaste publiceringen av sidan Om oss.”

Assistenten kan läsa och redigera sidor och block, skapa sidor och menylänkar, publicera och återställa versioner, byta tema, ändra sajtens inställningar, hämta bilder och dokument till mediebiblioteket och läsa formulärsvar. Ändringar på sidor hamnar i utkastet och syns inte för besökarna förrän sidan publiceras.

Vilka planer ingår?

MCP ingår i Plus och Pro (från 349 kr/mån). Nya konton testar Plus gratis i 14 dagar, så du kan prova direkt. Jämför planerna.

Planens gränser gäller även för assistenten, till exempel hur många sidor du kan ha och om undersidor ingår. Når den en gräns får du veta det i chatten.

Kom igång

Använder du claude.ai eller ChatGPT behöver du ingen nyckel: lägg till DizWeb som anpassad koppling och logga in, se Anslut din AI-klient. För Claude Code, Claude Desktops konfigurationsfil och andra program skapar du en API-nyckel:

  1. Skapa en API-nyckel

    Logga in, gå till ”API & MCP” i menyn, skriv ett namn som ”Claude på min dator” och klicka på ”Skapa nyckel”. Bara ägare och administratörer kan skapa nycklar.

  2. Spara nyckeln

    Nyckeln visas bara en gång. Kopiera den och förvara den säkert, till exempel i en lösenordshanterare.

  3. Anslut din AI-klient

    Följ instruktionen för din klient nedan och byt ut <DIN-API-NYCKEL> mot nyckeln.

  4. Be om hjälp

    Börja gärna med ”Vad finns på min sajt?” eller ett av de färdiga uppdragen.

Anslut din AI-klient

Serveradressen är https://app.dizweb.se/api/mcp. Kopplingar i claude.ai och ChatGPT loggar in med ditt DizWeb-konto. Övriga klienter skickar en API-nyckel i headern Authorization: Bearer <DIN-API-NYCKEL>.

claude.ai (webb, mobil och Claude Desktop)

  1. Öppna inställningarna i claude.ai, gå till Kopplingar (Connectors) och välj att lägga till en anpassad koppling (Add custom connector).
  2. Skriv namnet DizWeb och klistra in https://app.dizweb.se/api/mcp. Lämna eventuella fält för OAuth Client ID och Client Secret tomma.
  3. Klicka på Anslut (Connect), logga in på DizWeb, välj sajt och klicka på Godkänn.

Kopplingen följer med till Claude i mobilen och i Claude Desktop. På Team- och Enterprise-konton kan det vara en administratör som lägger till anpassade kopplingar.

ChatGPT

  1. Öppna inställningarna i ChatGPT, gå till Appar och kopplingar (Apps & Connectors) och slå på utvecklarläget (Developer mode) under Avancerat.
  2. Skapa en ny app eller koppling, skriv namnet DizWeb, klistra in https://app.dizweb.se/api/mcp och välj OAuth som autentisering.
  3. Klicka på Skapa eller Anslut, logga in på DizWeb, välj sajt och klicka på Godkänn.

Menyerna heter lite olika beroende på version och kontotyp, och utvecklarläget finns inte i alla ChatGPT-planer. Bara ägare och administratörer i DizWeb kan godkänna en koppling.

Claude Code

Kör kommandot i terminalen. Lägg till --scope user om du vill ha sajten i alla projekt.

Terminal
claude mcp add --transport http dizweb https://app.dizweb.se/api/mcp --header "Authorization: Bearer <DIN-API-NYCKEL>"

Vill du logga in i stället för att använda en nyckel lägger du till servern utan headern, skriver /mcp i Claude Code och väljer att logga in.

Claude Desktop

Öppna Settings > Developer > Edit Config i Claude Desktop och lägg till servern i filen claude_desktop_config.json. Kopplingen går via det fria verktyget mcp-remote, så du behöver ha Node.js installerat. Starta om Claude Desktop efteråt.

claude_desktop_config.json
{
  "mcpServers": {
    "dizweb": {
      "command": "npx",
      "args": [
        "-y",
        "mcp-remote",
        "https://app.dizweb.se/api/mcp",
        "--header",
        "Authorization:${DIZWEB_AUTH}"
      ],
      "env": {
        "DIZWEB_AUTH": "Bearer <DIN-API-NYCKEL>"
      }
    }
  }
}

Andra MCP-klienter

Servern använder MCP Streamable HTTP. Klienter med stöd för MCP-inloggning (OAuth) hittar den själva, och klienter som kan skicka egna headers fungerar med en API-nyckel. Många, som Cursor och VS Code, har en konfiguration som liknar den här:

mcp.json
{
  "mcpServers": {
    "dizweb": {
      "type": "http",
      "url": "https://app.dizweb.se/api/mcp",
      "headers": {
        "Authorization": "Bearer <DIN-API-NYCKEL>"
      }
    }
  }
}

Färdiga uppdrag

Servern har färdiga uppdrag (MCP-prompter) som ger assistenten en genomtänkt arbetsordning. I Claude Code skriver du till exempel /mcp__dizweb__build_site. I Claude Desktop hittar du dem i menyn för tillägg i chattfältet.

Bygg sajten från en beskrivning

build_site

Assistenten planerar sidor, skriver texter, väljer tema och bilder, lägger till kontaktformulär och visar en sammanfattning innan något publiceras.

businessobligatorisk
Beskriv verksamheten: vad ni gör, för vem, var ni finns och hur kunder når er.
tonevalfri
Önskad ton, till exempel "personlig och avslappnad" eller "saklig".

Skapa en ny sida

new_page

Assistenten skapar en ny sida i samma stil som resten av sajten och sparar den som utkast.

topicobligatorisk
Vad sidan ska handla om, till exempel "Våra behandlingar".
parentvalfri
Titel på sidan den ska ligga under (lämna tomt för toppnivå).
detailsvalfri
Fakta och önskemål som ska med på sidan.

Granska sajten

review_site

Assistenten läser alla sidor och kontrollerar texter, alt-texter, länkar, SEO och kontaktuppgifter, och ger en prioriterad lista med förslag.

focusvalfri
Något särskilt att granska, till exempel "SEO" eller "startsidan".

Uppdatera innehåll

update_content

Assistenten hittar alla ställen där en uppgift förekommer, uppdaterar utkasten och frågar innan något publiceras.

changeobligatorisk
Vad som har ändrats, till exempel "Nya öppettider: mån–fre 9–17, lör 10–14".

Säkerhet

  • En nyckel ger full åtkomst till din sajt. Skapa en nyckel per program och klicka på ”Återkalla” under ”API & MCP” om en nyckel kommer på avvägar. Där ser du också när varje nyckel användes senast.
  • En koppling i claude.ai eller ChatGPT arbetar i namnet på den som godkände den och gäller en sajt. Under ”Anslutna appar” på sidan ”API & MCP” ser du alla kopplingar och kan klicka på ”Koppla från”. Kopplingen slutar också fungera om personen inte längre är ägare eller administratör.
  • Assistenten är instruerad att arbeta i utkast, att inte hitta på uppgifter som priser eller öppettider och att fråga innan den publicerar, tar bort något eller lanserar sajten. Kontrollera gärna ändringarna i editorn innan du ber den publicera.
  • Varje publicering sparas som en version, så du kan alltid gå tillbaka till en tidigare version av en sida.
  • Formulärsvar innehåller besökarnas personuppgifter. Assistenten läser dem bara när du ber om det.

Verktygsreferens

Servern har 33 verktyg. Listan skapas automatiskt från samma kod som servern använder, så den stämmer alltid. Beskrivningarna är de som assistenten själv läser och är därför på engelska.

Läser
Hämtar uppgifter, ändrar ingenting.
Ändrar
Sparar i utkast eller mediebiblioteket. Syns inte för besökare förrän sidan publiceras.
Syns direkt
Påverkar den publika sajten direkt.

Sajt

Översikt, tema, inställningar, domäner och sökningar.

get_site

Get site

Läser

Site overview: name, subdomain, public URL, publish status, site search on/off (searchEnabled), SEO, header, footer, plan limits, the current theme (themeId, stored overrides in themeSettings and the effective colours/fonts in effectiveTheme), every available theme with the kinds of business it suits (suitedFor), its default colours, fonts and style (card, divider, media, header), the site's own CSS (customCss; null when the plan has no custom CSS) and the font names set_theme accepts. Call this first.

Inga parametrar.

set_theme

Set theme

Syns direkt

Change the theme and/or its overrides; visible on the public site at once. Omit themeId to keep the current theme. Each override: a value sets it, null removes it (back to the theme's default), omitted keeps the current value. Changing themeId keeps existing overrides unless you null them. Colours are #RRGGBB; fonts must be one of: Inter, Manrope, Space Grotesk, DM Sans, Work Sans, Playfair Display, Source Serif 4, Lora, Fraunces, Literata, Atkinson Hyperlegible Next, Baloo 2, Lexend, Big Shoulders Display, Archivo, Fredoka, Nunito, Funnel Display, Funnel Sans, JetBrains Mono, Bricolage Grotesque, Figtree, Familjen Grotesk, Cormorant, Jost, Newsreader, Public Sans, Noto Serif Display, Albert Sans, Bodoni Moda, Karla, Syne, Schibsted Grotesk, Saira, Red Hat Text, Red Hat Mono, Crimson Pro, Source Sans 3, Hanken Grotesk, Geist Mono (exact names, see get_site availableFonts). Themes are listed by get_site; pick one whose suitedFor matches the business. A theme's suggestedHeader (e.g. overlayHero) is not applied automatically; set it via update_site_settings header if wanted.

Parametrar
  • themeId
    valfri
    "nordic" | "bold" | "classic" | "studio" | "klarsyn" | "lekfull" | "smedja" | "bomull" | "kisel" | "kakel" | "skargard" | "byra" | "stilla" | "sjuttio" | "portier" | "glod" | "spegel" | "verkstad" | "minne" | "ljusbord"

    Theme id from get_site availableThemes. Omit to keep the current theme.

  • primaryColor
    valfri
    string | null

    Primary colour override as #RRGGBB (buttons, links). null = theme default.

    mönster ^#[0-9a-fA-F]{6}$

  • accentColor
    valfri
    string | null

    Accent colour override as #RRGGBB. null = theme default.

    mönster ^#[0-9a-fA-F]{6}$

  • fontHeading
    valfri
    "Inter" | "Manrope" | "Space Grotesk" | "DM Sans" | "Work Sans" | "Playfair Display" | "Source Serif 4" | "Lora" | "Fraunces" | "Literata" | "Atkinson Hyperlegible Next" | "Baloo 2" | "Lexend" | "Big Shoulders Display" | "Archivo" | "Fredoka" | "Nunito" | "Funnel Display" | "Funnel Sans" | "JetBrains Mono" | "Bricolage Grotesque" | "Figtree" | "Familjen Grotesk" | "Cormorant" | "Jost" | "Newsreader" | "Public Sans" | "Noto Serif Display" | "Albert Sans" | "Bodoni Moda" | "Karla" | "Syne" | "Schibsted Grotesk" | "Saira" | "Red Hat Text" | "Red Hat Mono" | "Crimson Pro" | "Source Sans 3" | "Hanken Grotesk" | "Geist Mono" | null

    Heading font override. One of: Inter, Manrope, Space Grotesk, DM Sans, Work Sans, Playfair Display, Source Serif 4, Lora, Fraunces, Literata, Atkinson Hyperlegible Next, Baloo 2, Lexend, Big Shoulders Display, Archivo, Fredoka, Nunito, Funnel Display, Funnel Sans, JetBrains Mono, Bricolage Grotesque, Figtree, Familjen Grotesk, Cormorant, Jost, Newsreader, Public Sans, Noto Serif Display, Albert Sans, Bodoni Moda, Karla, Syne, Schibsted Grotesk, Saira, Red Hat Text, Red Hat Mono, Crimson Pro, Source Sans 3, Hanken Grotesk, Geist Mono. null = theme default.

  • fontBody
    valfri
    "Inter" | "Manrope" | "Space Grotesk" | "DM Sans" | "Work Sans" | "Playfair Display" | "Source Serif 4" | "Lora" | "Fraunces" | "Literata" | "Atkinson Hyperlegible Next" | "Baloo 2" | "Lexend" | "Big Shoulders Display" | "Archivo" | "Fredoka" | "Nunito" | "Funnel Display" | "Funnel Sans" | "JetBrains Mono" | "Bricolage Grotesque" | "Figtree" | "Familjen Grotesk" | "Cormorant" | "Jost" | "Newsreader" | "Public Sans" | "Noto Serif Display" | "Albert Sans" | "Bodoni Moda" | "Karla" | "Syne" | "Schibsted Grotesk" | "Saira" | "Red Hat Text" | "Red Hat Mono" | "Crimson Pro" | "Source Sans 3" | "Hanken Grotesk" | "Geist Mono" | null

    Body text font override. One of: Inter, Manrope, Space Grotesk, DM Sans, Work Sans, Playfair Display, Source Serif 4, Lora, Fraunces, Literata, Atkinson Hyperlegible Next, Baloo 2, Lexend, Big Shoulders Display, Archivo, Fredoka, Nunito, Funnel Display, Funnel Sans, JetBrains Mono, Bricolage Grotesque, Figtree, Familjen Grotesk, Cormorant, Jost, Newsreader, Public Sans, Noto Serif Display, Albert Sans, Bodoni Moda, Karla, Syne, Schibsted Grotesk, Saira, Red Hat Text, Red Hat Mono, Crimson Pro, Source Sans 3, Hanken Grotesk, Geist Mono. null = theme default.

  • radius
    valfri
    "none" | "small" | "medium" | "large" | null

    Corner radius override. null = theme default.

set_custom_css

Set custom CSS

Syns direkt

Set the site's own CSS (Design → Egen CSS in the backoffice); applied after the theme on every public page at once, and shown in the editor preview. Plus and Pro only (plan.limits.customCss). mode "replace" (default) sets the whole stylesheet (empty string removes it); "append" adds your rules after the existing ones. Read the current CSS from get_site customCss first and keep the user's rules. Prefer theme variables (var(--site-primary) …) so rules follow the theme. Stable selectors: a block's [data-block-id="<block id>"] (or its own class, block field cssClass), a page's .site-page-id-<page id>; also .site-block--<type>, one class per block setting (e.g. .site-block--align-right), .site-block--first/--last, .site-page--home. Comment each rule group in Swedish so the user understands it. Max 20000 characters; no HTML.

Parametrar
  • css
    obligatorisk
    string

    CSS text. With mode replace an empty string removes the custom CSS.

  • mode
    valfri
    "replace" | "append"

    replace (default) or append

update_site_settings

Update site settings

Syns direkt

Update site name, SEO defaults, business details, header, footer, publish status or site search (all visible on the public site at once). seo.googleVerification takes the token (or the whole meta tag) from Google Search Console's HTML tag method. Object fields (seo, header, footer) are merged with the current values; omitted keys are kept. Images (logo, share image, favicon) are set by media id: header.logoMediaId, seo.ogImageMediaId, seo.faviconMediaId (upload or import the image first; the URL is resolved server-side). The header button is header.cta, a link object.

Parametrar
  • name
    valfri
    string

    Site name (shown in the header when showSiteName is on)

    1–255 tecken

  • seo
    valfri
    object
    • title
      valfri
      string

      Site title, usually the company name (max 70). Added after every page's title ("Om oss – Företaget"), except on the home page, whose own SEO title is used exactly as written (put the company name in it yourself); a home page without one gets this title.

      max 70 tecken

    • description
      valfri
      string

      Default meta description (max 160).

      max 160 tecken

    • ogImageMediaId
      valfri
      string (uuid) | "" | null

      Default share image (Open Graph, ideally 1200x630): the mediaId of an IMAGE in this site's media library (from list_media, upload_media or an import tool). The URL is filled in server-side. "" or null removes it.

    • ogImageUrl
      valfri
      string

      Default share image URL. Prefer the *MediaId field. If you set the URL directly it must be "" (remove) or a /uploads/<siteId>/… URL of this site's media (list_media `url`); external URLs are rejected.

      max 1000 tecken

    • faviconMediaId
      valfri
      string (uuid) | "" | null

      Favicon (square PNG, at least 64x64): the mediaId of an IMAGE in this site's media library (from list_media, upload_media or an import tool). The URL is filled in server-side. "" or null removes it.

    • faviconUrl
      valfri
      string

      Favicon URL. Prefer the *MediaId field. If you set the URL directly it must be "" (remove) or a /uploads/<siteId>/… URL of this site's media (list_media `url`); external URLs are rejected.

      max 1000 tecken

    • googleVerification
      valfri
      string

      Google Search Console verification: the token or the whole <meta name="google-site-verification"> tag. "" removes it.

      max 300 tecken

  • header
    valfri
    object

    logoMediaId = logo image; showSiteName = show the name as text; cta = header button (link object); sticky = header follows on scroll; overlayHero = transparent header over a first hero with media; contactBar = thin bar above the header with the footer's phone, e-mail and address (default: the theme's choice); style = 'solid' | 'glass' (frosted translucent header, best with sticky); glassOpacity = transparency 0-90 (%), glassBlur = 0-30 (px), glassTint = 'theme' | 'light' | 'dark', glassBorder = thin bottom border

    • logoMediaId
      valfri
      string (uuid) | "" | null

      Logo shown in the header (PNG/WebP with transparent background works best): the mediaId of an IMAGE in this site's media library (from list_media, upload_media or an import tool). The URL is filled in server-side. "" or null removes it.

    • logoUrl
      valfri
      string

      Deprecated: use logoMediaId. Prefer the *MediaId field. If you set the URL directly it must be "" (remove) or a /uploads/<siteId>/… URL of this site's media (list_media `url`); external URLs are rejected.

      max 1000 tecken

    • showSiteName
      valfri
      boolean

      Show the site name as text next to (or instead of) the logo

    • cta
      valfri
      object | null

      Header button as a link object { label, href?, kind?, pageId?, mediaId?, newTab? } (same semantics as block links). To a page: { label, pageId } (href is filled in from the page and follows renames). To a form block: { label, kind: "anchor", pageId, href: "/path#kontakt" }. External: { label, href: "https://…", newTab: true }. Phone/e-mail: { label, href: "tel:…" | "mailto:…" }. null removes the button.

    • ctaLabel
      valfri
      string

      Legacy alternative to cta: button text.

      max 60 tecken

    • ctaHref
      valfri
      string

      Legacy alternative to cta: plain button target (no page tracking). Empty string removes the button.

      max 1000 tecken

    • ctaNewTab
      valfri
      boolean

      Legacy alternative to cta: open in a new tab.

    • sticky
      valfri
      boolean
    • overlayHero
      valfri
      boolean
    • contactBar
      valfri
      boolean

      Contact bar above the header with phone/e-mail/address from the footer. Omit to follow the theme's default.

    • style
      valfri
      "solid" | "glass"
    • glassOpacity
      valfri
      integer

      0–90

    • glassBlur
      valfri
      integer

      0–30

    • glassTint
      valfri
      "theme" | "light" | "dark"
    • glassBorder
      valfri
      boolean
  • business
    valfri
    object

    The business for search engines (schema.org LocalBusiness data on the home page): type (schema.org type, default LocalBusiness), street, postalCode, city, areaServed (e.g. a city or region the business serves; works without a street address). Phone, e-mail and social links come from footer. Merged key by key; "" clears a field. Never invent an address.

    • type
      valfri
      "LocalBusiness" | "ProfessionalService" | "HomeAndConstructionBusiness" | "HealthAndBeautyBusiness" | "MedicalBusiness" | "FoodEstablishment" | "Store" | "AutomotiveBusiness" | "SportsActivityLocation" | "LodgingBusiness" | "EntertainmentBusiness" | "Organization" | ""
    • street
      valfri
      string | ""
    • postalCode
      valfri
      string | ""
    • city
      valfri
      string | ""
    • areaServed
      valfri
      string | ""
  • footer
    valfri
    object
    • text
      valfri
      string

      max 2000 tecken

    • email
      valfri
      string

      max 255 tecken

    • phone
      valfri
      string

      max 50 tecken

    • address
      valfri
      string

      max 500 tecken

    • socialLinks
      valfri
      object[]
  • tracking
    valfri
    object

    Analytics and marketing tags. Setting any id makes the site show a cookie banner, and nothing loads before the visitor consents (Google Analytics = statistics, Meta pixel = marketing, Tag Manager = both, with Consent Mode). Only use ids the user gave you. The customer's own code (Pro) can only be set in the backoffice. Merged key by key.

    • googleAnalyticsId
      valfri
      string

      Google Analytics 4 measurement id, G-XXXXXXXXXX; "" removes it

      max 30 tecken

    • googleTagManagerId
      valfri
      string

      Google Tag Manager container id, GTM-XXXXXXX; "" removes it

      max 30 tecken

    • metaPixelId
      valfri
      string

      Meta (Facebook) pixel id, digits; "" removes it

      max 30 tecken

    • privacyHref
      valfri
      string

      The site's privacy page for the banner's "Läs mer", e.g. /integritet

      max 500 tecken

    • bannerText
      valfri
      string

      Replaces the cookie banner's default text (Swedish)

      max 400 tecken

  • isPublished
    valfri
    boolean

    true = site is live on its domain (launch); false = visitors see "coming soon"

  • searchEnabled
    valfri
    boolean

    Site search: true = a search button in the header and a search page at /sok over the published pages

list_domains

List domains

Läser

Custom domains connected to the site with their verification status.

Inga parametrar.

list_site_searches

List site searches

Läser

What visitors searched for with the site search (/sok) in a period: total searches, the most common queries and the queries without results (useful for finding missing content). Logged anonymously (normalized query and result count only). searchEnabled tells whether the search is currently on (toggle it with update_site_settings).

Parametrar
  • period
    valfri
    "today" | "yesterday" | "7d" | "30d" | "90d" | "12m"

    Period in Europe/Stockholm time. Default 30d.

  • limit
    valfri
    integer

    Max queries per list. Default 20

    1–50

Sidor och block

Läs, skapa och redigera sidor och deras block.

list_pages

List pages

Läser

Page tree (two levels) in menu order with id, title, path, publish state and whether the draft has unpublished changes. Items with kind "link" are menu links (a menu item pointing to a URL, file or page; no content, path or versions): manage them with create_nav_link, update_nav_link and delete_page. Change the menu order with reorder_pages. total counts pages only (menu links do not count toward maxPages).

Inga parametrar.

get_page

Get page

Läser

Full page: metadata, SEO, the draft (title + blocks you edit), the live version (publishedVersion: number, title, blocks; null if never published) and the number of versions. isPublished = the page has a live version; hasUnpublishedChanges = the draft differs from it.

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

get_block_schema

Get block schema

Läser

JSON Schema for page blocks (hero, text, image, image_text, services, features, testimonials, logos, team, gallery, video, files, faq, hours, price_list, location, form, spacer), block labels and editing rules. Read before creating or editing blocks.

Inga parametrar.

create_page

Create page

Ändrar

Create a page (as a draft). Slug defaults to a slugified title. parentId makes it a sub page (max two levels, plan permitting; the parent must be a page, not a menu link).

Parametrar
  • title
    obligatorisk
    string

    1–255 tecken

  • slug
    valfri
    string

    URL slug, e.g. "om-oss"

    mönster ^[a-z0-9](?:[a-z0-9-]{0,98}[a-z0-9])?$

  • parentId
    valfri
    string (uuid)
  • blocks
    valfri
    object[]

    Full block list. See get_block_schema for the format.

  • showInNav
    valfri
    boolean

update_page_draft

Update page draft

Ändrar

Save title, blocks and/or SEO to the page draft. `blocks` REPLACES the whole block list (read get_page first). Pass draft.updatedAt from get_page as baseUpdatedAt so the save fails instead of overwriting changes someone made after you read the page. Nothing is published until publish_page, the page's SEO included (unlike update_site_settings, which applies at once).

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

  • title
    valfri
    string

    1–255 tecken

  • blocks
    valfri
    object[]

    Full block list. See get_block_schema for the format.

  • seo
    valfri
    object

    Page SEO. Merged with the current values. Saved with the draft: like the blocks, it reaches the public page with publish_page (site-wide SEO in update_site_settings applies at once).

    • title
      valfri
      string

      SEO title of the page only (aim for 50-60 characters incl. the site title). The site title is appended automatically on every page except the home page, whose SEO title is used exactly as written (include the company name there yourself); see the server instructions.

      max 255 tecken

    • description
      valfri
      string

      Meta description, about 120-160 characters.

      max 500 tecken

    • ogImageMediaId
      valfri
      string (uuid) | "" | null

      Share image (Open Graph) of this page: the mediaId of an IMAGE in this site's media library (from list_media, upload_media or an import tool). The URL is filled in server-side. "" or null removes it.

    • ogImageUrl
      valfri
      string

      Share image URL. Prefer the *MediaId field. If you set the URL directly it must be "" (remove) or a /uploads/<siteId>/… URL of this site's media (list_media `url`); external URLs are rejected.

      max 1000 tecken

    • noIndex
      valfri
      boolean

      true = ask search engines not to index this page

  • baseUpdatedAt
    valfri
    string (date-time)

    draft.updatedAt from get_page. If the draft was saved after that, nothing is written and you get an error: read the page again and redo the change.

add_block

Add block

Ändrar

Append (or insert at index) one block to the page draft. Defaults are filled in and `content`/`settings` are shallow-merged over them (top-level keys you send replace the default's, e.g. a full `items` list). Defaults never contain business facts: addresses, opening hours, prices, people and FAQ answers are "[FYLL I: …]" placeholders (hours: all days without times, location: no coords). Replace them with facts from the user, or keep them and list them in your summary. Returns the new block.

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

  • type
    obligatorisk
    "hero" | "text" | "image" | "image_text" | "services" | "features" | "testimonials" | "logos" | "team" | "gallery" | "video" | "files" | "faq" | "hours" | "price_list" | "location" | "form" | "spacer"
  • index
    valfri
    integer

    Position in the block list; default = end

    minst 0

  • content
    valfri
    object
  • settings
    valfri
    object

geocode_address

Geocode address

Läser

Look up map coordinates for a street address (OpenStreetMap Nominatim, the same lookup as the editor's "Hitta adressen på kartan"). Use the result as content.coords { lat, lon } in a location (Hitta hit) block; never guess coordinates. Check that displayName matches the intended place before using it. Rate limited (20 lookups per minute per account).

Parametrar
  • address
    obligatorisk
    string

    Full address: street and number, postal code and city, e.g. "Drottninggatan 5, 111 51 Stockholm"

    3–200 tecken

update_page_meta

Update page metadata

Syns direkt

Rename, change slug, move under another page (parentId, null = top level) or toggle navigation visibility. Moving a page adds a redirect from the old path.

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

  • title
    valfri
    string

    1–255 tecken

  • slug
    valfri
    string

    URL slug, e.g. "om-oss"

    mönster ^[a-z0-9](?:[a-z0-9-]{0,98}[a-z0-9])?$

  • parentId
    valfri
    string (uuid) | null
  • showInNav
    valfri
    boolean

delete_page

Delete page

Syns direkt

Delete a page permanently (all versions), or a menu link. Sub pages move to the top level. The home page cannot be deleted.

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

Meny och menylänkar

Menyns ordning och menyval som leder till en annan webbplats, en fil eller en sida.

reorder_pages

Reorder pages and menu links

Syns direkt

Set the menu order of pages and menu links that share a parent (top level when parentId is omitted/null, or the dropdown of a top-level page). orderedIds lists items in the wanted order; siblings you leave out keep their relative order after them. Items currently under another parent are MOVED here first (same rules as update_page_meta / update_nav_link: the plan must allow sub pages, max two levels, the home page stays at the top level and cannot have children, menu links are never parents, a page with sub pages cannot become a sub page; a moved page gets a new path and a redirect from the old one). Live on the public menu at once. Returns the new order of that level.

Parametrar
  • parentId
    valfri
    string (uuid) | null

    Parent page id (a top-level content page, not the home page). Omit or null = top level.

  • orderedIds
    obligatorisk
    string (uuid)[]

    Page and menu link ids from list_pages, in the wanted order

Publicering och versioner

Publicera, avpublicera och återställ versioner.

publish_page

Publish page

Syns direkt

Publish the current draft as a new immutable version and make it live.

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

  • note
    valfri
    string

    Short change note

    max 255 tecken

unpublish_page

Unpublish page

Syns direkt

Take a page offline. The draft and versions are kept. The home page cannot be unpublished.

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

list_versions

List versions

Läser

Versions of a page, newest first: published versions (kind "published", numbered) and saved states kept after MCP edits (kind "snapshot"; saves from the same app within 10 minutes share one). Any of them can be restored with restore_version.

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

restore_version

Restore version

Ändrar

Copy an older version into the draft. With publish=true it is published immediately as a new version.

Parametrar
  • pageId
    obligatorisk
    string (uuid)

    Page id (from list_pages)

  • versionId
    obligatorisk
    string (uuid)
  • publish
    valfri
    boolean

Media

Mediebiblioteket med bilder, film, dokument och mappar.

list_media

List media

Läser

Media library items as MediaRef objects (use them verbatim in blocks) plus filename, dimensions and folder path. kind "file" = documents (PDF, Word, Excel, ...) for the files block; their url is the original file.

Parametrar
  • kind
    valfri
    "image" | "video" | "file"
  • folder
    valfri
    string

    Only items directly in this folder (id, name or path). Use "/" for the root. Omit for all media.

    1–300 tecken

  • query
    valfri
    string

    Search filename and alt text across all folders

    max 100 tecken

  • limit
    valfri
    integer

    Default 50

    1–200

  • offset
    valfri
    integer

    minst 0

list_media_folders

List media folders

Läser

All folders in the media library with their path and number of files (null folder = root).

Inga parametrar.

create_media_folder

Create media folder

Ändrar

Create a folder in the media library (max 3 levels deep, names unique among siblings).

Parametrar
  • name
    obligatorisk
    string

    1–100 tecken

  • parent
    valfri
    string

    Parent folder (id, name or path). Omit for a top-level folder.

    1–300 tecken

import_media_from_url

Import media from URL

Ändrar

Download an image, video or document from a public URL into the media library. Returns a MediaRef to use in blocks. Documents use the same allowlist as uploads: PDF, Word (.doc/.docx), Excel (.xls/.xlsx), PowerPoint (.ppt/.pptx), OpenDocument (.odt/.ods/.odp), .txt, .csv, .rtf and .zip, max 25 MB. SVG images are converted to PNG (transparent background, 2000 px on the longest side) and only the PNG is stored; the SVG must be self-contained (no DOCTYPE, no linked images, fonts or stylesheets), max 2 MB. HTML, XML and scripts are never accepted.

Parametrar
  • url
    obligatorisk
    string (uri)
  • alt
    valfri
    string

    Alt text for images (describe the image in Swedish), display name for documents. Omit = empty; set it later with update_media.

    max 255 tecken

  • folder
    valfri
    string

    Folder to put it in (id, name or path). Omit for the root.

    1–300 tecken

upload_media

Upload media

Ändrar

Upload a file you have locally (e.g. the customer's logo or photos they gave you) into the media library, base64-encoded. Max 15 MB per file after decoding (for larger files use import_media_from_url with a public URL). Allowed: images (JPEG, PNG, WebP, GIF, SVG), videos (MP4, WebM) and documents (PDF, Word .doc/.docx, Excel .xls/.xlsx, PowerPoint .ppt/.pptx, OpenDocument .odt/.ods/.odp, .txt, .csv, .rtf, .zip). SVG images are converted to PNG (transparent background, 2000 px on the longest side) and only the PNG is stored; the SVG must be self-contained (no DOCTYPE, no linked images, fonts or stylesheets), max 2 MB. HTML, XML and scripts are never accepted; the file content must match its type, and it counts toward the plan's storage. Images get resized variants. Returns a MediaRef to use verbatim in blocks (and its mediaId for header.logoMediaId etc.).

Parametrar
  • data
    obligatorisk
    string

    The file's bytes as base64 (standard or URL-safe; a data:...;base64, prefix is allowed)

    minst 1 tecken

  • filename
    obligatorisk
    string

    File name with extension, e.g. "logo.png" or "meny.pdf" (documents are recognised by their extension)

    1–200 tecken

  • alt
    valfri
    string

    Alt text for images (describe the image in Swedish), display name for documents

    max 255 tecken

  • folder
    valfri
    string

    Folder to put it in (id, name or path). Omit for the root.

    1–300 tecken

update_media

Update media

Ändrar

Change an item in the media library: alt text (images; display name for documents) and/or its folder. Blocks keep a COPY of the MediaRef, so a new alt text only applies where you use the MediaRef from now on: to change it on existing pages, also update the alt field in those blocks (update_page_draft).

Parametrar
  • mediaId
    obligatorisk
    string (uuid)

    Media id (mediaId from list_media or an upload/import result)

  • alt
    valfri
    string

    New alt text (images) or display name (documents). Empty string clears it.

    max 255 tecken

  • folder
    valfri
    string

    Move to this folder (id, name or path). Use "/" for the root.

    1–300 tecken

delete_media

Delete media

Ändrar

Permanently delete an item from the media library (its file and all sizes). Refused while it is used: in a page draft or a published page (blocks, page share image, links to the file), in a menu link, or as logo, header button, share image or favicon; the error lists where. Remove it there first (and publish), then delete. Older page versions in the history are not checked: restoring one that used the file shows it as missing. Only delete what the user asked you to remove.

Parametrar
  • mediaId
    obligatorisk
    string (uuid)

    Media id (mediaId from list_media)

Bildbank

Gratis foton från Pixabay. Verktygen finns bara när bildbanken är aktiverad på plattformen.

search_stock_photos

Search stock photos

Läser

Search free stock photos (Pixabay, up to 30 per page). Returns candidates with a preview URL for you to judge. Set lang to the language of your query: "sv" (default) for Swedish words, "en" for English. English usually finds more and better photos; if a search gives few or poor results, try the other language. Use short, concrete nouns ("gardener", "hedge trimming", "bakery bread") rather than abstract phrases ("quality service"). Use import_stock_photo to add one to the media library before using it in a block; never put previewUrl in blocks.

Finns bara när bildbanken är aktiverad på plattformen.

Parametrar
  • query
    obligatorisk
    string

    Search words in the language given by lang

    2–100 tecken

  • lang
    valfri
    "sv" | "en"

    Language of the query: "sv" (default) or "en"

  • page
    valfri
    integer

    1–16

import_stock_photo

Import stock photo

Ändrar

Download a photo from search_stock_photos into the media library. Returns a MediaRef to use in blocks. Pass alt with a descriptive Swedish alt text; without it the alt text is generated from Pixabay's (often English) tags.

Finns bara när bildbanken är aktiverad på plattformen.

Parametrar
  • id
    obligatorisk
    string

    id from search_stock_photos

    mönster ^\d{1,12}$

  • alt
    valfri
    string

    Alt text in Swedish describing the photo. Default: built from the photo's tags.

    max 255 tecken

  • folder
    valfri
    string

    Folder to put it in (id, name or path). Omit for the root.

    1–300 tecken

Formulärsvar

Svar som besökare skickat via kontaktformulär.

list_form_submissions

List form submissions

Läser

Contact form submissions, newest first.

Parametrar
  • limit
    valfri
    integer

    Default 20

    1–200

  • offset
    valfri
    integer

    minst 0

get_form_submission

Get form submission

Läser

One form submission with all submitted fields.

Parametrar
  • id
    obligatorisk
    string (uuid)

För utvecklare

  • Endpoint: https://app.dizweb.se/api/mcp, transport MCP Streamable HTTP utan sessioner. Skicka JSON-RPC med POST. Servern heter dizweb (version 1.2.0).
  • Autentisering: Authorization: Bearer <DIN-API-NYCKEL>, eller en OAuth-åtkomsttoken. Både nyckel och token är knutna till en organisation och dess sajt; alla verktyg arbetar på den sajten.
  • OAuth 2.1 enligt MCP-specifikationen: ett anrop utan token får 401 med WWW-Authenticate: Bearer resource_metadata=… som pekar på https://app.dizweb.se/.well-known/oauth-protected-resource/api/mcp. Auktoriseringsservern beskrivs i https://app.dizweb.se/.well-known/oauth-authorization-server (dynamisk klientregistrering, authorization code med PKCE S256, roterande refresh-tokens, scope mcp).
  • Hälsokontroll utan nyckel: https://app.dizweb.se/api/mcp/health.
  • Hela katalogen som JSON (server, instruktioner, verktyg med parametrar och prompter), utan nyckel: https://app.dizweb.se/api/mcp/catalog.
  • Verktygsfel returneras som resultat med isError: true och ett meddelande på engelska.
Lista verktygen med curl
curl -X POST https://app.dizweb.se/api/mcp \
  -H "Authorization: Bearer <DIN-API-NYCKEL>" \
  -H "Content-Type: application/json" \
  -H "Accept: application/json, text/event-stream" \
  -d '{"jsonrpc":"2.0","id":1,"method":"tools/list"}'