Linux 软件免费装
Banner图

Leitvia Studio: AI Agents, MCP and Design Tokens for Block Themes

开发者 contexlabs
更新时间 2026年11月20日 23:06
PHP版本: 8.2 及以上
WordPress版本: 7.1
版权: GPLv2 or later
版权网址: 版权信息

标签

block theme ai agent mcp abilities api design tokens

下载

1.3.50 1.3.45 1.3.46 1.3.47 1.3.48 1.3.49

详情介绍:

Leitvia Studio lets AI agents such as Claude Code, Codex or Cursor build and maintain WordPress sites with block themes through 66 abilities, and every change passes checks for design, accessibility and content before it goes live. It is free and made for developers, agencies and site owners who want an AI agent to do the work without administrator rights. The abilities belong to the WordPress Abilities API and run over MCP or the REST API. Everything Studio creates is stored in WordPress core structures (patterns, global styles, post types, block bindings), so the site keeps working when you deactivate the plugin. It works with any block theme and fits best with the free theme Leitvia. What it does Leitvia Pro Everything above is free and stays free, and no feature is locked. The separate paid add-on Leitvia Pro adds the blocks Slider, Scroll story, Before and after and Entry list, and eight industry kits with their own brand, pages and patterns. See Leitvia plans and prices.

安装:

  1. Install the plugin on the Plugins screen (search for Leitvia Studio), or upload the leitvia-studio folder to /wp-content/plugins/. With WP-CLI: wp plugin install leitvia-studio --activate.
  2. Activate the plugin. The menu Leitvia Studio appears with Pattern Lab, Tokens, Content Model, Recipes, Agents and Settings.
  3. Optional, to connect an AI agent over MCP: install and activate MCP Adapter. Without it, agents use the REST API.
  4. Under Leitvia Studio, Agents, create an agent user, copy its application password (it is shown once) and set the autonomy level per area.
  5. Point the agent at https://your-site.example/wp-json/leitvia-studio/v1/mcp with that password. The getting started guide has the configuration for Claude Code, Codex CLI, Gemini CLI and Cursor.

屏幕截图:

  • Pattern Lab: a block pattern in the preview at three viewport widths, with variants, checks and usage.
  • Token set editor: WCAG contrast check for every color pair, scheduling as an overlay and a live preview of theme patterns.
  • Change package of an AI agent: check result and the block diff per operation, ready to apply or reject.
  • Applied change package with Roll back.
  • Checks before and after every write: the list of checks, the results of the last 30 days and verify after writing.

常见问题:

What is Leitvia Studio?

Leitvia Studio is a free WordPress plugin that lets AI agents build and maintain sites with block themes through 66 abilities of the WordPress Abilities API, with checks, an autonomy level per area, a review inbox and rollback. It also adds a Pattern Lab, design tokens in the DTCG format, a content model with block bindings, site recipes and blocks for privacy, accessibility and offers. It needs WordPress 7.1 and PHP 8.2 or later.

Does Leitvia Studio work with Claude, ChatGPT or Cursor?

Leitvia Studio works with any MCP client that connects over HTTP and can send an Authorization header. The AI agent signs in with the application password of a Leitvia Agent user. Studio offers no OAuth sign-in, so a client that connects to MCP servers only through OAuth cannot reach the server "leitvia" directly. Any tool that can call a REST API with Basic auth can use the same abilities under /wp-json/wp-abilities/v1.

How do AI agents use Leitvia?

An AI agent such as Claude Code, Codex or Cursor connects to your site over MCP or the REST API with the application password of an agent user from Leitvia Studio, Agents. It reads the design contract and the outline of a page first, then calls the Leitvia abilities, and every change runs through the gateway checks and your autonomy levels. No service of ours sits in between: the agent signs in as a user of your site that an administrator created, with the role Leitvia Agent and without administrator rights. It works on content, media, navigation, template parts and token set drafts. It cannot install, activate, update or remove plugins or themes, manage users, log in to wp-admin or edit code. The role itself stores no capability: Studio gives an agent the rights for content, media and theme options only while it runs. Deactivate Studio or remove its folder and the agent has the rights of a user without a role: it can sign in and change its own profile, as any WordPress user can, and nothing on the site. Its application password stays and works again when you activate Studio. Deleting Studio in the admin removes the application passwords of agents and the role; the users and their content stay. Application passwords come into being only when an administrator creates an agent or a new password on the Agents screen, and the password is shown there once. Changes to site settings (such as the front page or the comment defaults), the content model, the active token set or the global styles only ever reach the inbox as a suggestion that a person applies or rejects, whatever the autonomy profile. Ready-made agent skills for setup, design, pages, patterns, maintenance, accessibility and migration, with the full reference of all abilities, are described in the Leitvia documentation.

Does Leitvia Studio need an API key or an account?

No. Leitvia Studio needs no API key, no account and no service of ours. The AI agent is a program you choose, and it signs in to your site with an application password that an administrator creates. Only the ability "Plan page" with ai set to true uses an AI provider, and only the one an administrator set up under Settings, Connectors (see External services).

Is Leitvia Studio free?

Yes. Leitvia Studio is free under the GPL, version 2 or later, with no locked features and no upsell notices. Leitvia Pro is a separate paid plugin with extra blocks and industry kits.

Is Leitvia Studio GDPR compliant?

Leitvia Studio sends no visitor data to other hosts and sets no cookies, which makes a GDPR compliant site easier to run; compliance itself depends on your whole site and how you run it. Embeds and map tiles load only after the visitor agrees, Gravatar and the emoji images of WordPress stay off unless an administrator switches them on, and fonts come from your own site. Apart from the optional AI planning call described under External services, its only server side request goes to your own site. Every exception is listed under Privacy and External services. When Gravity Forms is active, the site audit of the agents (leitvia/audit-site) warns about a captcha add-on or a reCAPTCHA field, because such a captcha sends the visitor's IP address to its provider before any consent. Leitvia Studio reads only the list of active plugins and the forms for this, on your server.

Does Leitvia Studio make my site accessible under WCAG 2.2, the EAA or the BFSG?

No plugin can make a site accessible on its own, and Leitvia Studio does not claim to. Its admin screens and blocks are built to meet WCAG 2.2 level AA and BITV 2.0, and before an AI agent change goes live the gateway checks headings, alt text, link text, contrast and landmarks and refuses changes that bring new findings. Whether your site meets WCAG, the European Accessibility Act or the German BFSG also depends on the theme, the content and other plugins, and needs a test by people.

How accessible are the admin screens and blocks?

Leitvia Studio is built to meet WCAG 2.2 level AA and BITV 2.0 in its admin screens and in the blocks it adds to the front end:

  • The admin screens Pattern Lab, Tokens, Content Model, Recipes, Agents with its Inbox tab and Settings work with the keyboard, keep a visible focus, label every field and announce results in a status message. Wide tables scroll in their own box at 320 px instead of the page.
  • The inbox shows each change of an agent as a block diff in plain text with the text before and after, never by color alone. Revoking an agent and the profile "Fully autonomous" ask for a confirmation.
  • Blocks keep their content readable without JavaScript: tabs, table of contents, mega menu links, pricing period switch, comparison tables and the form error summary. Moving blocks (marquee, counter, reveal) stand still when the operating system asks for reduced motion, and the marquee has a Pause button.
  • Before an agent change goes live, the gateway checks heading structure, alt text, link text, color pairs of the active palette and the landmarks of the rendered page, and refuses changes that bring new findings.
Automated tests run axe in three widths and keyboard tests on the admin screens, and axe on every block. They do not replace a test by people, and the accessibility of a site also depends on its theme, content and other plugins. Report accessibility problems on the Leitvia accessibility page.

What are pages in easy language?

Pages in easy language (Leichte Sprache), which public bodies in Germany offer under BITV 2.0, are normal pages: the page sidebar marks one as the easy language version of another, and the block "Easy language switch" links both. The block "Accessibility bar" for the header collects the links to easy language, the accessibility statement and sign language and, with JavaScript, adds text size, high contrast and read aloud. It is an extra, not a fix: pages must be accessible without it.

Does the plugin work without the Leitvia theme?

Yes. It works with any block theme. The theme Leitvia adds a design contract with fixed roles for colors, spacing and font sizes, 70 patterns and shop templates, which AI agents and the Pattern Lab read.

What happens when I deactivate Leitvia Studio?

Your posts, pages, patterns, global styles and images stay, because Studio stores them in WordPress core structures. Blocks connected to content model fields show the content saved in the block, embeds render as WordPress renders them, and AI agent users lose every right on the site until you activate Studio again. If Gravatar was off, Studio switches "Show Avatars" off so that avatars do not start loading from Gravatar; the questions below explain both steps in detail.

Does the plugin change my front end?

Only where you use its features. It loads scripts and styles for visitors only on pages with its blocks or an embed placeholder. It does change front end output in eight places: structured data in the head of the front page, posts, archives and author pages with the news sitemap and its line in robots.txt, while no SEO plugin is active the canonical link of archives and a stored SEO title, description and robots, profile pictures and the placeholder replace Gravatar images wherever WordPress shows avatars, embeds from other sites wait behind a consent placeholder, a scheduled token overlay changes the styles while it runs, the "Child entries" query lists the rows of a content model entry, code blocks get a "Copy code" button that shows once JavaScript runs, and the emoji script of WordPress is left out (see below). The Lab preview, which logged-in editors open from the admin, loads its own scripts, and axe-core only while an accessibility check runs.

What happens to blocks connected to content model fields when I deactivate the plugin?

Paragraphs, headings, buttons and images can show content model fields, site settings and related entries through block bindings. A site setting is only available to blocks when its declaration sets "bindable" to true, because its value is then shown to every visitor. Without Leitvia Studio, WordPress shows the content saved in the block instead. When you connect an empty block, the editor saves the field name as that content, so the block is never left empty.

What are building blocks?

A building block is one content feature of an add-on, such as events or a team: content types, the sections that show them and sample drafts. Adding one leaves design and pages alone. A section whose building block is missing says so in the editor and sets it up in one click; visitors never see it empty. Developers use the registry building_blocks, AI agents the ability leitvia/add-building-block.

How do I mark posts as news articles?

Every post is a news article until you choose categories under Studio, Settings, Design and search, "Posts that are news"; posts outside them get the type BlogPosting and stay out of the news sitemap. The filter leitvia_studio_news_categories receives that list and can return other slugs or IDs. The setting "Add structured data to the front page, posts and author pages" switches the structured data off, "Publish a news sitemap for Google News" the sitemap; the sitemap also stays off while the site discourages search engines or another plugin makes a news sitemap (filter leitvia_studio_news_sitemap_enabled). The filter leitvia_studio_seo_plugin_active tells Leitvia Studio about an SEO plugin it does not detect. Posts, archives and author pages get structured data for search engines (JSON-LD): NewsArticle or BlogPosting, CollectionPage and ProfilePage, with three image sizes of 1200 px made on upload. The front page describes the organization behind the site with the kind of business, address, founding date, area served, opening hours and profiles from Studio, Settings; posts name the same organization as publisher. The news sitemap for Google News lists the last 48 hours at /news.xml. While an SEO plugin such as Yoast SEO or Rank Math is active, Leitvia Studio prints none, so that plugin stays the only source.

Which forms does the "Form error summary" block work with?

With every form inside it: forms of core such as the Search block and the comment form, forms of plugins such as Gravity Forms, and your own HTML form in a Custom HTML block. When a visitor submits a form with errors, the block lists them above the form with links to the fields, describes each error at its field and moves the focus to the list. Errors a plugin reports after sending the form (fields marked with aria-invalid="true", Gravity Forms field errors) show in the list right on load, also without JavaScript. Without JavaScript the browser and the form plugin validate as before. The error page of core for comments is a page of its own and stays as it is.

Why does the emoji script of WordPress no longer load?

WordPress prints a small script into every page that checks whether the browser can show emoji. Browsers without emoji fonts then load every emoji as an image from s.w.org, a server of WordPress.org, and feeds and emails link emoji images from there as well. That is a request to another host without the visitor's consent. Leitvia Studio leaves the script, its styles and the emoji images in feeds and emails out. Current browsers show emoji with their own fonts, so nothing changes for most visitors. Under Leitvia Studio, Settings, "Load the emoji script of WordPress" brings it back.

What does Leitvia Studio add for WooCommerce?

Three things, registered only while WooCommerce is active:

  • The block "Product comparison" shows two to four products in a table with caption, column and row headers: live prices with the tax note, rating, the attributes you choose, availability and an "Add to cart" link that names its product. On small screens each product becomes a card, and the table is readable without JavaScript. Prices come from your own shop, never from another host.
  • Gateway abilities let AI agents list and read products, update products, categories and tags, and set featured products, upsells, cross-sells and the sort order. They work in the area "Products", which starts at the level "draft", with snapshot and rollback like every other change. Prices, taxes and shipping reach the shop at most as a suggestion a person has to apply. Orders, refunds, coupons and customer data stay out of reach of agents, and reading a product never returns sales figures.
  • The recipe "Shop" sets up a shop with the Leitvia theme: shop header with product search, account and mini cart, a home page from the shop patterns, about and contact pages, and the legal pages imprint, privacy policy, terms, right of withdrawal and shipping and payment with placeholder text you replace. It switches off order attribution, usage tracking, marketplace suggestions and remote logging of WooCommerce. Apply it with wp leitvia recipe apply leitvia/shop --user=<admin> or through an agent.
The shop templates, patterns and styles themselves come with the Leitvia theme.

Does Leitvia Studio use Gravatar?

No, not unless an administrator switches it on. Users pick their profile picture from the media library on their profile screen. Everyone without a local picture, including people who leave comments, gets a neutral placeholder that ships with the plugin. Under Leitvia Studio, Settings, "Allow Gravatar for users and commenters without a local picture" turns Gravatar on for them; local pictures are always used first. When you deactivate Leitvia Studio while Gravatar is off and "Show Avatars" under Settings, Discussion is on, it switches "Show Avatars" off, so saved avatar blocks and comment avatars do not start loading Gravatar. Activating Leitvia Studio again switches it back on, but only if Leitvia Studio was the one that switched it off; a setting you changed yourself stays as it is. If the plugin folder is deleted without deactivating the plugin first (for example over FTP), this step cannot run; switch off "Show Avatars" yourself in that case.

Does Leitvia Studio send requests from my server?

Only to your own site. After an AI agent changed something live, a WordPress cron event loads the changed page once, as a visitor would see it (a loopback request to the address of your site, nowhere else). It checks the HTTP status, PHP warnings and errors of themes and plugins, one h1, the header, main and footer landmarks, block markup or JSON showing on the page, and the color pairs of the active palette. If the check fails, a change the agent made at the level "autonomous" is rolled back, unless someone changed the page in the meantime; otherwise the change package in the inbox shows the result. Some hosts and firewalls block loopback requests; the check then counts as "unverifiable", never rolls anything back and shows a note in the inbox. The setting "Verify after writing" of the gateway turns the check off.

Can I run Leitvia Studio from the command line?

Yes. With WP-CLI, wp leitvia tokens|patterns|model|audit|package|recipe lists, exports and imports token sets, patterns and the content model, runs the site audit, works with change packages and applies recipes. Commands that write need --user and go through the same checks as AI agents; wp help leitvia lists them all.

Can AI agents connect over MCP?

Yes, when the plugin MCP Adapter (version 0.7.x) is installed and active; Leitvia Studio neither bundles nor requires it. Studio then adds its own MCP server "leitvia" at /wp-json/leitvia-studio/v1/mcp (HTTP) that offers exactly the Leitvia abilities as tools, with read only, destructive and idempotent hints. The default server of the adapter (/wp-json/mcp/mcp-adapter-default-server) offers the same abilities through its tools discover-abilities and execute-ability, for AI agents that only know the WordPress agent skills. Agents sign in with an application password of a user with the role "Leitvia Agent"; the adapter checks the capability and every write still runs through the gateway pipeline. Rejections carry their code and data as JSON in the error text, on both servers. Over WP-CLI the same server runs as wp mcp-adapter serve --server=leitvia --user=<agent>. Without the adapter all abilities stay available over the REST API. Users with the role "Leitvia Agent" read through any REST route, but they change the site only through the Leitvia abilities and the MCP server; other REST routes refuse their writes and XML-RPC refuses them completely.

How are images protected that wait in a change package?

An image an AI agent adds while a change package waits for a decision lies in a folder with a random name below wp-content/uploads/leitvia-studio/private/ until a person applies the package; rejecting the package deletes it. Apache reads the .htaccess file there and denies access. nginx ignores it, so add this rule to the server block of the site (adjust the path if your uploads folder lives elsewhere): location ^~ /wp-content/uploads/leitvia-studio/private/ { deny all; } Versions before 1.3.10 used wp-content/uploads/leitvia-private/. The first page load after the update moves the waiting images to the new folder and removes the old one, and waiting packages keep working; an nginx rule for the old folder can go after that.

Which HTML may users without unfiltered_html save?

WordPress filters the posts of users without the capability unfiltered_html (authors, editors on a network, AI agents) through its list of allowed HTML. The pricing switch, the feature filter and the wizard steps of Leitvia Studio are radio buttons and checkboxes, which that list does not contain, so Leitvia Studio adds the element input for post content, with the attributes type, name, value, checked and required only. The type must be radio or checkbox; an input of any other type is removed, so these users cannot build text or password fields, and event handlers, style, formaction and src stay out. Nothing else changes, and users with unfiltered_html are not affected.

Does Leitvia Studio work in a multisite network?

Yes. Every site keeps its own settings, token sets, content model, audit log, snapshots and change packages; Studio installs a new site of the network by itself and removes its tables and data when the site is deleted. Activate Studio for the whole network: only then is Gravatar also blocked in the network admin and on every site.

  • AI agents: users belong to the network. A new agent needs the capability to create users (for site administrators the network setting "Add New Users"). A site administrator manages only agents that work on no other site; agents on several sites are managed by a network administrator. An application password created on the Agents screen works on its own site only.
  • Agents address a site by its address, in a subdirectory network with its path (https://example.org/club/wp-json/...). The ability "Get contract" names the address and REST base of the site.
  • Site administrators have no unfiltered_html: imported patterns are filtered like any post, and CSS in global styles needs edit_css. Profile pictures belong to the media library of their site.
  • With DISABLE_WP_CRON every site needs its own cron run, for example wp site list --field=url | xargs -I{} wp cron event run --due-now --url={}.

What stays after deleting Studio?

Deleting the plugin always removes its settings, change packages, audit log, snapshots, the agent role and the application passwords of agents. Your posts, pages, patterns, global styles, images and agent users stay. Token sets, the content model declaration, Lab metadata, profile picture assignments and the marks that agents leave on posts (AI generated, sources, recipe hash) go only when "Delete all Studio data when the plugin is deleted" is on under Leitvia Studio, Settings. "Show Avatars" under Settings, Discussion stays off if Studio switched it off: without Studio, WordPress loads avatars from Gravatar, which sends the IP address of every visitor to Automattic. Switch it on only if you want that or use another avatar plugin.

更新日志:

1.3.50 1.3.49 1.3.48 1.3.47 1.3.46