Deprecated: Function get_magic_quotes_gpc() is deprecated in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 99

Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 619

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1169

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176

Warning: Cannot modify header information - headers already sent by (output started at /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php:99) in /hermes/walnacweb04/walnacweb04ab/b2791/pow.jasaeld/htdocs/De1337/nothing/index.php on line 1176
8000 GitHub - jolokia/jolokia-mcp-server: Let LLMs manage your Java application via JMX/Jolokia 🌶️
Nothing Special   »   [go: up one dir, main page]

Skip to content

jolokia/jolokia-mcp-server

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

97 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Jolokia MCP Server

Test

MCP server for Jolokia, a JMX-HTTP bridge for Java applications. This MCP server enables an LLM to manage a Java application using JMX API via Jolokia.

jolokia-mcp-demo.mov

Distributions

Since version 0.4, the Jolokia MCP Server offers two distinct distributions to suit different deployment needs:

Standalone MCP Server

The Standalone MCP Server acts as a conventional MCP server; it is registered to the MCP host with either stdio or HTTP, and the MCP server itself communicates with your Java application, which must have a Jolokia agent attached, via JMX over HTTP.

To use the Standalone MCP Server, you'll first need to attach a Jolokia agent to your Java application. For detailed instructions on how to do this, please refer to the Jolokia manual: https://jolokia.org/reference/html/manual/agents.html

JVM Agent MCP Server

In contrast, the JVM Agent MCP Server provides a streamlined, "drop-in" replacement for the standard Jolokia JVM Agent.

With this distribution, you simply attach the MCP Server's JVM Agent to your application instead of the standard Jolokia JVM Agent. The JVM Agent MCP Server then directly opens an HTTP port for the MCP protocol, effectively transforming your Java application itself into an MCP Server.

Features

This MCP server connects to a single JVM at startup and provides the following features on the connected JVM:

  • List MBeans from the connected JVM
  • List operations for a MBean
  • List attributes for a MBean
  • Read/write attributes of a MBean
  • Execute operations on a MBean

Tools

This MCP server provides 6 tools.

  • listMBeans
    • List available MBeans from the JVM
    • Output (List<String>): List of all MBean object names in the JVM
  • listMBeanOperations
    • List available operations for a given MBean
    • Inputs:
      • mbean (String): MBean name
    • Output (String): JSON-formatted definitions of all available operations for the given MBean
  • listMBeanAttributes
    • List available attributes for a given MBean
    • Inputs:
      • mbean (String): MBean name
    • Output (String): JSON-formatted definitions of all available attributes for the given MBean
  • readMBeanAttribute
    • Read an attribute from a given MBean
    • Inputs:
      • mbean (String): MBean name
      • attribute (String): Attribute name
    • Output (String): String representation of the given attribute's value or "null"
  • writeMBeanAttribute
    • Set the value to an attribute of a given MBean
    • Inputs:
      • mbean (String): MBean name
      • attribute (String): Attribute name
      • value (Object): Attribute value
    • Output (String): String representation of the given attribute's previous value or "null"
  • executeMBeanOperation
    • Execute an operation on a given MBean
    • Inputs:
      • mbean (String): MBean name
      • operation (String): Operation name
      • args (Object[]): Arguments
    • Output (String): String representation of the return value of the operation or "null"

Install

Standalone

Download the MCP server runner jar:

To install the Jolokia MCP server to a MCP host, add the following entry to the MCP settings:

{
  "mcpServers": {
    "jolokia": {
      "command": "java",
      "args": [
        "-jar",
        "<path-to-the-runner-jar>/jolokia-mcp-0.4.3-runner.jar"
      ]
    }
  }
}

Or if you prefer using JBang (no need for downloading the jar with this method):

{
  "mcpServers": {
    "jolokia": {
      "command": "jbang",
      "args": [
        "org.jolokia.mcp:jolokia-mcp-server:0.4.3:runner"
      ]
    }
  }
}

JVM Agent

Download the MCP server javaagent jar:

Then run your Java application with -javaagent option:

java -javaagent:jolokia-mcp-agent-jvm-0.4.3-javaagent.jar -jar your-app.jar

This would open the MCP HTTP transport at http://localhost:8779/mcp.

To register the Jolokia MCP server to a MCP host, add the following entry to the MCP settings:

{
  "mcpServers": {
    "jolokia": {
      "httpUrl": "http://localhost:8779/mcp"
    }
  }
}

Run

Run it with java -jar:

java -jar jolokia-mcp-server-0.4.3-runner.jar [Jolokia URL]

Using JBang, you can directly run it with the Maven GAV (org.jolokia.mcp:jolokia-mcp-server:0.4.3:runner):

jbang org.jolokia.mcp:jolokia-mcp-server:0.4.3:runner

HTTP Transport

By default, this MCP server runs with stdio transport. To switch it to HTTP transport, use the --sse option:

java -jar jolokia-mcp-server-0.4.3-runner.jar --sse

The HTTP transport endpoint by default launches at http://localhost:8080/mcp.

Config Options

Parameter/Option Default Description
Positional parameter http://localhost:8778/jolokia The Jolokia endpoint URL the MCP server connects to
--sse false (stdio) Enable HTTP transport
-D*=* System properties

The system properties that are relevant to the MCP server:

System property Default Description
quarkus.http.port 8080 (SSE) The port for the SSE endpoint
quarkus.mcp.server.sse.root-path mcp (SSE) The root path for the SSE endpoint (http://localhost:8080/mcp/sse)
jolokia.mcp.url http://localhost:8778/jolokia Equivalent to the positional parameter

Build

mvn clean install

About

Let LLMs manage your Java application via JMX/Jolokia 🌶️

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 3

  •  
  •  
  •  
0