listMBeansLABSCO SUMMARY
A JVM you can ask questions of.
Everything JMX exposes — heap and thread beans, application metrics, the operations an app publishes for its operators — becomes readable and callable in the session, including the writes that change a running system.
What it is
A JMX front end for a Java application with a Jolokia agent attached. It lists the JVM's MBeans, lists a bean's attributes and operations, reads and writes attributes, and executes operations — over HTTP rather than through a JMX console.
What you get
- Every MBean object name in the connected JVM
- The operations and the attributes defined on a given MBean, as JSON definitions
- An attribute read, and an attribute written
- An operation executed on a bean
- Two distributions: a standalone server that connects to a JVM with a Jolokia agent, and a JVM agent that turns the application itself into the server
Requirements
For the standalone distribution, a Java application with a Jolokia agent attached; the JVM Agent distribution replaces the standard Jolokia JVM agent and opens the MCP port itself. Either way it connects to a single JVM, chosen at startup.
Setup effort
One command — jbang org.jolokia.mcp:jolokia-mcp-server:0.5.1:runner
USE CASES
Finding out what a running application exposes
List the MBeans, then the operations on the ones that look relevant — the fastest way into an application whose internals you do not know.
Reading a live metric off the JVM
Get the attribute definitions for the bean, then read the value — memory, threads, queue depth, whatever the application publishes.
Changing a setting without a restart
Writable attributes — a log level, a cache size, a feature switch — are set on the running JVM, with the definitions read first to see what a value may be.
Triggering an operation the application publishes
Operations meant for operators — flush a cache, force a GC, rotate something — are called by name once you have their signature.
6 tools
Listed in project docs. Your client may show a different list.
listMBeanOperationslistMBeanAttributesreadMBeanAttributewriteMBeanAttributeexecuteMBeanOperationBEFORE YOU INSTALL
What to know first
Tools you get
6 tools named in the project's documentation.
Requires
jbang on PATH
INSTALLATION
Connect your client
Add the block to your client, or run the command directly.
Server setup
Configuration file
{
"mcpServers": {
"jolokia": {
"command": "jbang",
"args": [
"org.jolokia.mcp:jolokia-mcp-server:0.5.1:runner"
]
}
}
}The command line the project publishes
jbang org.jolokia.mcp:jolokia-mcp-server:0.5.1:runner