> For the complete documentation index, see [llms.txt](https://doc.orbeon.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://doc.orbeon.com/form-builder/mcp.md).

# Form Builder MCP

## Availability

[\[SINCE Orbeon Forms 2025.1.2\]](/release-notes/orbeon-forms-2025.1.2.md)

This is an early access feature. We're actively working to improve it by creating more tools that expose additional Form Builder functionality to AI agents and by improving the documentation and ergonomics. We believe it is already very useful, which is why we want to make it available to you early. Please let us know if you have any feedback.

Watch the video which shows Form Builder MCP support in the browser:

{% embed url="<https://www.youtube.com/watch?v=-nQ0ed_BfOg>" %}

## What it does

The Form Builder MCP server makes Form Builder's features available to AI agents through the MCP (Model Context Protocol), which is a standard protocol supported by most AI agents. This allows AI agents to interact with Form Builder to:

* create forms based on user instructions
* modify existing forms based on user instructions
* retrieve information about forms, such as their structure and metadata.

Orbeon Forms provides both:

* A Form Builder MCP Server; this is covered in the first section below.
* Support for WebMCP in Form Builder loaded in your browser; this is covered in the second section below.

## MCP Server

<figure><img src="/files/RA7i9wbtgoFN762YmVDM" alt="" width="690"><figcaption><p>AI agent connected to Form Builder MCP</p></figcaption></figure>

### Orbeon Forms configuration

To use the MCE server, set the following property two properties. The first enables the MCP server (it is disabled by default). The second sets the password used to sign the token, which you need to set the value of this property to a secure password.

```xml
<property 
    as="xs:boolean" 
    name="oxf.fb.mcp.enable" 
    value="true"/>
<property 
    as="xs:string"  
    name="oxf.fb.mcp.token.password" 
    value=""/>
```

In order to revoke all tokens issued, simply change the token password.

Once you have those two properties in place, you can generate a token. Open any form in Form Builder and click on the key icon that shows at the top right of the page to reveal the token dialog.

<figure><img src="/files/ULscYcd3LGPx1jm5ibZB" alt="" width="510"><figcaption><p>Creating an MCP token in Form Builder</p></figcaption></figure>

If choosing "Readonly" access, only read-only operations will be allowed, such as listing forms and retrieving form metadata. If choosing "Read/Write" access, all operations will be allowed, including creating and modifying forms.

By default, the token validity is one day. You can change this by setting the following property:

```xml
<property 
    as="xs:integer" 
    name="oxf.fb.mcp.token.validity" 
    value="1440"/>
```

The duration is in minutes, so:

* `1440` means 24 hours (1 day)
* `10080` means 7 days (1 week)
* `44640` means 31 days (1 month)

### Agent configuration

In what follows:

* `your-form-builder-url` is the URL to your Orbeon Forms, for example `https://example.org/orbeon/fr/mcp/builder`
  * An important part is `/fr/mcp/builder`, which is the path to the MCP server in Form Builder.
  * The domain, port, and prefix (here `/orbeon`) should be those of your Orbeon Forms instance.
* `your-token` is the value of the token you generated in Form Builder.

#### Claude Code

Add the MCP server with:

```
claude mcp add orbeon your-form-builder-url \
    --scope user \
    --transport http \
    --header "Authorization: Bearer your-token"
```

You can then run `claude mcp list` to check it was correctly added and that Claude is able to connect.

#### Codex CLI

Declare an `ORBEON_MCP_TOKEN` environment variable with the value of your token value, then run:

```
codex mcp add orbeon \
    --url your-form-builder-url \ 
    --bearer-token-env-var ORBEON_MCP_TOKEN
```

You can then run `codex mcp list` to check it was correctly properly added.

#### GitHub Copilot CLI

Add the MCP server with:

```
copilot mcp add orbeon \
    --url your-form-builder-url \
    --type http \
    --header "Authorization=Bearer your-token"
```

#### Antigravity CLI

Edit your `~/.gemini/antigravity-cli/mcp_config.json` to add the `orbeon` MCP server, for example:

```json
{
  "mcpServers": {
    "orbeon": {
      "serverUrl": "your-form-builder-url",
      "headers": {
        "Authorization": "Bearer your-token"
      }
    }
  }
}
```

#### Skill (optional)

You can also add to your AI agent a skill file. The latest version of the skill file can be found [in the Orbeon Forms GitHub repository here](https://github.com/orbeon/orbeon-forms/blob/master/.agents/skills/orbeon/SKILL.md). You place such as file in the appropriate location for your AI agent, for example:

```
.agents/skills/orbeon/SKILL.md
```

## WebMCP

<figure><img src="/files/SgSPuNRrlvq524KQb3S9" alt="" width="600"><figcaption><p>AI agent connected to Form Builder through WebMCP</p></figcaption></figure>

As of Summer 2026, WebMCP is a nascent, but very promising standard. The idea is that users will load a WebMCP page in their browser, open an agent in a sidebar, either built in the browser or provided by a browser extension, and the agent in the sidebar will be able to use tools provided by that page. Gemini in Chrome would be a prime candidate to support this, and other vendors like Anthropic or OpenAI could provide similar support through a browser extensions. This could provide a very seamless experience for users.

Today, we get a taste for what using WebMCP will feel like by using a regular external agent, such as Claude or Codex. To set this up:

1. In Chrome, open `chrome://flags/`, search for "MCP", enable both "WebMCP support in DevTools" and "WebMCP for testing", then restart the browser.
2. Set up your agent to add [Chrome DevTools for agents](https://github.com/ChromeDevTools/chrome-devtools-mcp). Make sure to use the `--autoConnect` parameter so your agent can connect to a live browser (for instance, with Claude Code, use `claude mcp add chrome-devtools -s user -- npx chrome-devtools-mcp@latest --autoConnect`).
3. In Chrome, open a form in Form Builder, and ask your agent "with Chrome DevTools, through WebMCP, give me a list of the control in the form I have open in Form Builder".

This set up quite convenient:

* It doesn't require users to generate a token in Form Builder and set up their agent with that token.
* Users can see changes made to the form in real time in the browser. They can also make their own changes, and use both the agent and the Form Builder UI in the same session to update a form.
* In the future, when agents built in the browser, such as Gemini in Chrome, support WebMCP, users will be able to do all of the above directly from their browser, without even having to install an external agent.

## Usage patterns

With MCP support, you can use your AI agent to interact with Form Builder in various ways using prompts such as:

> Using Orbeon, create a new demo form for a personal collection of widgets. Split the form into sections, and use appropriate form controls. Then save and close the form.

The result might look like this:

![Example of a form created by an AI agent](/files/sd0OpCQYl4H5vcTJeL2m)

Further prompts can be used to update the form layout, for example:

> Using Orbeon, edit form 33e71949140e1282b9428770176994bdb24c702a and modify the size of control widget-quantity to half its current width.

Or add validation rules:

> Using Orbeon, update form 33e71949140e1282b9428770176994bdb24c702a to make the type of the widget-quantity field a non-negative integer.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://doc.orbeon.com/form-builder/mcp.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
