Using Liferay as an MCP Server
Liferay DXP 2025.Q4+ Beta Feature
Using Liferay DXP as an MCP server requires a beta feature flag (LPD-63311).
The Model Context Protocol (MCP) is an open source standard for connecting to AI applications, such as GitHub Copilot or Cursor. When the feature flag is enabled, Liferay DXP functions as an MCP server that AI applications can use. You can configure any AI service that uses MCP configuration to interact with Liferay DXP.
Configuring the MCP server requires generating an authorization header using valid user credentials to access Liferay DXP. You must encode the credentials to create a token, for example using basic authentication. The AI service has the same permissions as the authorized user in the configuration.
Here are some example AI services you can configure to use Liferay DXP.
Configuring GitHub Copilot
Configuring GitHub Copilot requires using Visual Studio Code.
-
Follow these steps for VS Code.
-
When you add the
mcp.jsonfile, save this configuration for Liferay DXP:{ "servers": { "liferay": { "url": "http://localhost:8080/o/mcp/sse", "type": "http", "headers": { "Authorization": "Basic [basic auth token]" } } } }
Configuring Cursor
-
Follow the Quickstart steps and set up an MCP server in the Cursor application.
-
The MCP server configuration is in
[home directory]/.cursor/mcp.jsonby default. Save this configuration in the file to use Liferay DXP:{ "mcpServers": { "liferay": { "url": "http://localhost:8080/o/mcp/sse", "type": "http", "headers": { "Authorization": "Basic [basic auth token]", "Content-Type": "application/json" } } } }
Configuring Claude Desktop
-
Follow these instructions.
-
Open the developer settings in the Claude Desktop application to access the server configuration, in
claude_desktop_config.json. Save this configuration to use Liferay DXP:{ "mcpServers": { "liferay": { "command": "npx", "args": [ "mcp-remote", "http://localhost:8080/o/mcp/sse", "--header", "Authorization: Basic [basic auth token]" ] } } }
Debugging with the Official MCP Inspector
Once you’ve configured your server, you can use the official MCP inspector to test and debug it.
Start the inspector by running
npx @modelcontextprotocol/inspector
Configure the inspector with these parameters:
URL: http://localhost:8080/o/mcp/sse
Transport: HTTP Server Sent Events
Headers: Authorization: Basic [basic auth token]