End user System Administrator DevOps Developer Jahia 8.2

Model Context Protocol (MCP) and Jahia

Question

I'd like to connect Claude Code to my Jahia instance.

Solution

Requirements

You need a Jahia 8.2.3.0 installed and running

Configure a MCP server

Apollo MCP server

Requirements

You need an API token with the scope graphql enabled.

Steps

Jahia provides APIs thanks to a GraphQL endpoint on JAHIA_URL/modules/graphql.

Apollo is providing, amongst other things, a binary server to provide a MCP endpoint as an interface to a GraphQL endpoint: https://www.apollographql.com/docs/apollo-mcp-server/run

  • Download the binary apollo-mcp-server
  • Add a file named config.yaml with a similar content to this one: 
endpoint: http://localhost:8080/modules/graphql
transport:
  type: streamable_http
  port: 5000
schema:
  source: local
  path: schema.graphql
operations:
  source: introspect
introspection:
  introspect:
    enabled: true
  search:
    enabled: true
  validate:
    enabled: true
  execute:
    enabled: true
overrides:
  mutation_mode: all
headers: { "authorization": "APIToken XXXXXXXXXXXXXXXXXX" }
  • Retrieve the complete schema of the GraphQL APIs with this command:
apollo client:download-schema schema.graphql --endpoint=http://localhost:8080/modules/graphql --header="Authorization: APIToken XXXXXXXXXXXXXXXXXX"
  • Start the MCP server: 
./apollo-mcp-server config.yaml
  • Add the MCP to claude: 
claude mcp add apollo-mcp npx mcp-remote http://127.0.0.1:5000/mcp

Jahia MCP community server

Requirements

Make sure Jahia is running with a JDK 17.

You need to: 

Steps

  • Add the MCP to claude: 
claude mcp add jahia-mcp --transport http --header "Authorization: APIToken XXXXXXXXXXXXXXXXXX" http://localhost:8080/modules/mcp

 

Tests with Claude

Start Claude and execute the command /mcp to check if the MCP is activated.

Ask Claude to list the operations available in the related MCP.

If everything is ok, try asking Claude to: 

  • Install the module org.jahia.modules/addstuff
  • To export a website in the path test
  • To shutdown Jahia