---
title: "Quickstart"
manual: "WebMCP tool for TYPO3"
version: "0.4"
permalink: "https://docs.typo3.org/permalink/neoblack/webmcp:quickstart@0.4"
source: "Quickstart/Index.rst"
rendered: "2026-10-07T22:31:54+00:00"
---

> [!WARNING]
> **Experimental.** This extension is experimental and not yet ready for
> production use. It is built on top of
> [WebMCP](https://github.com/webmachinelearning/webmcp), which is itself
> an experimental, early-stage proposal. Both the underlying specification
> and this extension's API may change or break at any time without notice.
> Use at your own risk.

# Quickstart {#quickstart}

This walkthrough takes you from a freshly installed extension to a working tool
that an AI agent can call on the page. It uses the `static` primitive, so no
JavaScript and no external index are required.

-   [Prerequisites](https://docs.typo3.org/permalink/neoblack/webmcp:prerequisites@0.4)
-   [Step 1 – Write a tool provider](https://docs.typo3.org/permalink/neoblack/webmcp:step-1-write-a-tool-provider@0.4)
-   [Step 2 – Wire the manifest into the page](https://docs.typo3.org/permalink/neoblack/webmcp:step-2-wire-the-manifest-into-the-page@0.4)
-   [Step 3 – Verify it in the browser](https://docs.typo3.org/permalink/neoblack/webmcp:step-3-verify-it-in-the-browser@0.4)
-   [Next steps](https://docs.typo3.org/permalink/neoblack/webmcp:next-steps@0.4)

## Prerequisites {#prerequisites}

-   The extension is installed and set up (see [Installation](https://docs.typo3.org/permalink/neoblack/webmcp:installation@0.4)).
-   You have a site package where you can add PHP classes and TypoScript.

## Step 1 – Write a tool provider {#step-1-write-a-tool-provider}

Create a small PHP class in your site package (or any extension). Because the
`\Neoblack\Webmcp\Tool\ToolProviderInterface` carries the
`#[AutoconfigureTag('webmcp.tool')]` attribute, an autoconfigured service
implementing it is picked up automatically — no `Services.yaml` entry is
needed as long as your extension enables autoconfiguration.

**EXT:my_sitepackage/Classes/Tool/ServicesToolProvider.php**

```php
<?php

declare(strict_types=1);

namespace Vendor\SitePackage\Tool;

use Neoblack\Webmcp\Tool\Manifest;
use Neoblack\Webmcp\Tool\Primitive;
use Neoblack\Webmcp\Tool\ToolProviderInterface;
use TYPO3\CMS\Frontend\ContentObject\ContentObjectRenderer;

final class ServicesToolProvider implements ToolProviderInterface
{
    public function name(): string
    {
        return 'list_services';
    }

    public function manifest(ContentObjectRenderer $cObj, array $processedData): ?Manifest
    {
        return new Manifest(
            name: 'list_services',
            description: 'List the services this company offers.',
            inputSchema: ['type' => 'object', 'properties' => new \stdClass()],
            primitive: Primitive::StaticList,
            data: [
                'items' => [
                    ['title' => 'Consulting', 'url' => 'https://example.org/consulting'],
                    ['title' => 'Development', 'url' => 'https://example.org/development'],
                ],
                'resultKey' => 'services',
                'text' => [
                    'heading' => 'Our services:',
                    'line' => '{n}. {title} – {url}',
                ],
            ],
        );
    }
}
```

> [!NOTE]
> If your site package does not autoconfigure services, add the tag manually:
>
> **EXT:my_sitepackage/Configuration/Services.yaml**
>
> ```yaml
> Vendor\SitePackage\Tool\ServicesToolProvider:
>   tags:
>     - name: webmcp.tool
> ```

## Step 2 – Wire the manifest into the page {#step-2-wire-the-manifest-into-the-page}

Add the three pieces described in [Configuration](https://docs.typo3.org/permalink/neoblack/webmcp:configuration@0.4) to your site package. In
short:

**TypoScript setup — data processor and runtime**

```typoscript
page.10.dataProcessing {
    40 = Neoblack\Webmcp\DataProcessing\ToolManifestProcessor
    40 {
        endpoint = /webmcp-event
        as = webmcpConfigJson
    }
}

page.includeJSFooter {
    webmcp = EXT:neoblack_webmcp/Resources/Public/JavaScript/webmcp.js
    webmcp.defer = 1
}
```

Render the JSON block once in your page template:

**Fluid page template — emit the manifest**

```html
<f:if condition="{webmcpConfigJson}">
    <script type="application/json" id="webmcp-config"><f:format.raw>{webmcpConfigJson}</f:format.raw></script>
</f:if>
```

## Step 3 – Verify it in the browser {#step-3-verify-it-in-the-browser}

Reload a frontend page and open the browser's developer console.

1.  Confirm the manifest is on the page:

    **Console — inspect the manifest**

    ```javascript
    JSON.parse(document.getElementById('webmcp-config').textContent).tools
    ```

    You should see your `list_services` tool in the returned array.

    ![Browser console showing the list_services tool in the parsed manifest](../Images/QuickstartConsole.png)
1.  Confirm the runtime registered it against the `ModelContext`:

    **Console — check for an agent surface**

    ```javascript
    document.modelContext || navigator.modelContext
    ```

    A `ModelContext` implementation is only present in agent-capable browsers
    (for example Chrome with the WebMCP flag or origin trial, see
    [Standards and browser support](https://docs.typo3.org/permalink/neoblack/webmcp:standards@0.4)). If `document.modelContext` and
    `navigator.modelContext` are both `undefined`, the page is fine — there
    is simply no agent surface to register against. To list the tools the page
    actually registered, use the Model Context Tool Inspector extension (see
    [Troubleshooting](https://docs.typo3.org/permalink/neoblack/webmcp:troubleshooting@0.4)).

> [!TIP]
> Once an agent operates the page, it can discover `list_services` and call
> it; the runtime returns the curated list and (unless disabled) records one
> anonymous usage row visible in the [backend module](https://docs.typo3.org/permalink/neoblack/webmcp:analytics@0.4).

## Next steps {#next-steps}

-   Swap `static` for another primitive — `search`, `navigate` or
    `mailto` — see [Writing tools](https://docs.typo3.org/permalink/neoblack/webmcp:developer@0.4).
-   Return `null` from `manifest()` to hide a tool on pages where it does
    not apply.

> [!NOTE]
> **See also**
>
> -   [Writing tools](https://docs.typo3.org/permalink/neoblack/webmcp:developer@0.4) – every primitive's payload and the escape hatch.
> -   [Troubleshooting](https://docs.typo3.org/permalink/neoblack/webmcp:troubleshooting@0.4) – what to check if the tool does not show up.
> -   [Analytics](https://docs.typo3.org/permalink/neoblack/webmcp:analytics@0.4) – inspect usage in the **System > WebMCP** module.
