Skip to content
For AI agents: the complete documentation index is available at llms.txt; this page is also available as Markdown at index.md.

DIL MCP server

The Data Intelligence Layer come with a built-in MCP server helpin AI agents to fetch metrics and use them to provide content improvement suggestions or take actions.

MCP server configuration

You can check the service existence with the following command:

1
php bin/console debug:container ibexa.mcp.server.default.data_intelligence_layer

You can check the route existence with the following command:

1
php bin/console debug:router ibexa.mcp.data_intelligence_layer

This MCP server need to be associated to some SiteAccesses and allowed to be accessed from some hosts. For details, see Data Intelligence Layer configuration.

MCP server test

You can use the MCP server from an agent CLI command. Like in the Work with MCP servers example, you can use a wrapper script to ease JWT token acquisition.

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
set -e

export NODE_TLS_REJECT_UNAUTHORIZED=0

baseUrl='http://localhost' # Adapt to your test case
mcpServer="$baseUrl/admin/mcp/data-intelligence"

jwtToken=$(curl -s -X 'POST' \
  "$baseUrl/api/ibexa/v2/user/token/jwt" \
  -H "X-Siteaccess: admin" \
  -H 'Content-Type: application/vnd.ibexa.api.JWTInput+json' \
  -H 'Accept: application/vnd.ibexa.api.JWT+json' \
  -d '{
        "JWTInput": {
          "_media-type": "application/vnd.ibexa.api.JWTInput+json",
          "username": "admin",
          "password": "publish"
        }
      }' | jq -r .JWT.token)

exec npx -y supergateway \
  --streamableHttp "$mcpServer" \
  --oauth2Bearer "$jwtToken" \
  --header 'Accept-Language: en' \
  --logLevel none

Notice:

  • the admin in MCP server URL as default URIElement: 1 SiteAccess matching is used in this local test example
  • the X-Siteaccess: admin header when requiring the JWT token TODO: mention this need in mcp_usage.md example instead.
  • the Accept-Language: en header when establishing the gateway TODO: Why is it suddenly needed? Because it's the admin SiteAccess?

Prompt examples

How the French translation is covered?

Pick me one random folder that need translation into French.