Model Context Protocol
1.0

Adds support for the Model Context Protocol (MCP). Tools can be defined in Java code and exposed to AI systems using MCP.

Enabling this feature

To enable the Model Context Protocol 1.0 feature, add the following element declaration into your server.xml file, inside the featureManager element:

<feature>mcp-1.0</feature>

Stable API packages provided by this feature

  • org.mcpjava.server

  • org.mcpjava.server.completion

  • org.mcpjava.server.content

  • org.mcpjava.server.elicitation

  • org.mcpjava.server.progress

  • org.mcpjava.server.prompts

  • org.mcpjava.server.resources

  • org.mcpjava.server.roots

  • org.mcpjava.server.sampling

  • org.mcpjava.server.spi

  • org.mcpjava.server.tools

Features that this feature enables

Supported Java versions

  • JavaSE-17.0

  • JavaSE-21.0

  • JavaSE-25.0

  • JavaSE-26.0

Developing a feature that depends on this feature

If you are developing a feature that depends on this feature, include the following item in the Subsystem-Content header in your feature manifest file.

io.openliberty.mcp-1.0; type="osgi.subsystem.feature"