MCP servers installation and configuration¶
Ibexa DXP's MCP Servers LTS Update package can provide MCP servers to external AI agents.
Installation¶
Install the LTS Update package with Composer:
1 | |
MCP Servers feature comes with built-in tools but doesn't come with a default configuration. You have to create your own MCP servers through their configuration and enable JWT authentication for them.
Authentication configuration¶
JWT MCP firewall¶
AI agents use JWT authentication against Ibexa DXP's MCP servers.
In config/packages/lexik_jwt_authentication.yaml, enable the authorization_header token extractor
to allow the use of JWT token bearer in Authorization header.
In config/packages/security.yaml,
- uncomment the
ibexa_jwt_restfirewall to allow the request of JWT tokens through REST or GraphQL - uncomment the
ibexa_jwt_mcpfirewall to allow the use of JWT authentication against MCP servers
Notice that you don't need to activate JWT authentication for the REST API or the GraphQL API.
You can now request JWT tokens to use with your MCP servers. See examples of JWT token requests in REST JWT authentication, in GraphQL JWT authentication, or in cURL test of MCP server.
Repository user¶
- The user can generate a JWT token with their own account, or a secondary dedicated account, and pass the token to the MCP client.
- A gateway can use a dedicated shared user to generate a JWT token and establish the connection.
MCP server configuration¶
MCP servers are defined per repository and assigned per SiteAccess scope.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | |
Routes are built automatically from MCP server path configs.
Those routes are identified as ibexa.mcp.<server_identifier>.
List them by running php bin/console debug:router --siteaccess=<within_scope_siteaccess> ibexa.mcp.
MCP server options¶
| Option | Type | Required | Default | Description |
|---|---|---|---|---|
path |
string | Yes | MCP server endpoint path (appended to SiteAccess-aware base URL) | |
enabled |
boolean | No | false |
Whether the server is enabled |
version |
string | No | 1.0.0 |
MCP server version |
description |
string | No | null |
Server implementation description |
instructions |
string | No | null |
Prompt-like instructions dedicated to the AI agent |
tools |
string | No | [] |
List of tool classes |
discovery_cache |
string | Yes | PSR-6 or PSR-16 cache pool service identifier | |
session |
object | Yes | Session storage configuration |
Notice that a server is disabled by default, it needs to be explicitly enabled.
Tools configuration¶
Tools are the main capabilities of an MCP server, they are the actions that an AI can call on the system.
MCP server design best practice
An MCP server with too many tools makes it harder for the AI agent to choose the right one. Create several servers with specific sets of tools for different contexts and purposes. Focus on the needs and tasks of the human user actually prompting the AI agent when designing your MCP servers and capabilities, not on the technical possibilities.
There is two ways to associate tools with a server:
toolsin server configuration lists PHP classes (FQCN) from which all theMcpToolattributes are associated with the server (for example, for built-in tools or third parties)serversargument inMcpToolattribute associates the specified tool to servers
Built-in tools¶
MCP Servers LTS Update comes with the following built-in tools:
Ibexa\Mcp\Tool\TranslationToolslist_languages: Lists all languages in the current SiteAccesslist_content_languages: Lists languages in which given content item has translationslist_non_translated_content_ids: Lists IDs of content with missing translations for a given language code
Ibexa\Mcp\Tool\SeoToolsget_non_seo_content_ids: Returns IDs of content items that are missing SEO optimization (no meta title tag)
1 2 3 4 5 6 7 8 | |
Discovery cache¶
Discovery is cached to avoid scanning for capabilities on every request. A PSR-6 or PSR-16 cache pool must be provided for this caching.
For example, a dedicated Redis/Valkey could be set up:
1 | |
Session storage¶
MCP servers store session data their own way.
Options¶
| Option | Type | Default | Description |
|---|---|---|---|
type |
enum | memory |
Session store type: psr16, file, or memory |
service |
string | null |
PSR-16 cache service ID for psr16 session store |
prefix |
string | mcp_ |
Key prefix for psr16 session store |
directory |
string | null |
Directory path for file session store |
ttl |
integer | 3600 |
Session TTL in seconds |
In production, psr16 with Redis/Valkey is recommended like for regular sessions.
PSR-16¶
Sessions are stored with a PSR-16 compatible cache implementation.
It requires service option pointing to a valid cache service ID.
And optionally a more specific prefix option than the default mcp_ to avoid key collisions with other cache usages.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
File¶
Sessions are persisted to the filesystem. it requires directory option to be set.
In this example, sessions are stored in var/cache/<environment>/mcp/sessions/ directory
(for example, var/cache/dev/mcp/session/ in dev environment and var/cache/prod/mcp/sessions/ in prod environment):
1 2 3 | |
Memory¶
Sessions are stored in memory. Suitable for development and STDIO transport. It might not work with containers like Docker/DDEV.
1 2 | |