MCP (Model Context Protocol) Configuration:

Enable or disable the MCP (Model Context Protocol) endpoint at /mockserver/mcp.

When enabled, MockServer exposes a JSON-RPC 2.0 endpoint implementing the MCP Streamable HTTP transport, allowing AI coding assistants to interact with MockServer programmatically — creating expectations, verifying requests, retrieving traffic, and debugging mismatches.

The MCP endpoint enforces the same control plane authentication (mTLS and/or JWT) as the REST API.

Type: boolean Default: true

Java Code:

ConfigurationProperties.mcpEnabled(boolean enable)

System Property:

-Dmockserver.mcpEnabled=...

Environment Variable:

MOCKSERVER_MCP_ENABLED=...

Property File:

mockserver.mcpEnabled=...

Example:

-Dmockserver.mcpEnabled="false"