Class SwingMcpPlugin

java.lang.Object
is.codion.plugin.swing.mcp.SwingMcpPlugin

public final class SwingMcpPlugin extends Object
Plugin that integrates MCP server directly into a Codion application. This allows AI tools to control the application via the Model Context Protocol over HTTP.

Configure with system properties: -Dcodion.swing.mcp.http.port=8080 (sets HTTP port, default 8080)

  • Field Details

    • HTTP_PORT

      public static final PropertyValue<Integer> HTTP_PORT
      System property to set the HTTP server port (default: 8080).
      • Value type: Integer
      • Default value: null
  • Method Details

    • mcpServer

      public static State mcpServer(JComponent applicationComponent)
      Create an MCP server for the given application component.
      Parameters:
      applicationComponent - the application component
      Returns:
      a State controlling the started state of this mcp server