About Jolokia MCP Server
Jolokia MCP Server uses Jolokia's JMX-HTTP bridge to manage Java applications, for developers and operators inspecting or controlling JVM MBeans. It offers standalone and JVM Agent deployment options.
Key features
- 01List MBeans in a JVM
- 02Inspect MBean operations and attributes
- 03Read and write attribute values
- 04Execute MBean operations
Use cases
- 01Inspect MBeans in a Java application
- 02Read or change runtime attributes
- 03Invoke JVM management operations
MCP support
Exposes tools for querying and operating JVM MBeans to MCP clients. It can run as a standalone server connected to Jolokia or as a JVM Agent that makes the application itself serve an MCP HTTP endpoint.
Configuration
Local server config is the same for every client. Copy it into your client’s MCP config file.
We haven’t collected a package or remote endpoint for this server. Follow the instructions in the project README.
Tools
Local servers expose tools only once running on your machine, and the maintainer has not provided a tool list.
Details
From the project READMEJolokia MCP Server
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.
https://github.com/user-attachments/assets/624ec93b-da69-49b5-be8f-02f2ff14bd2e
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 nameattribute(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 nameattribute(String): Attribute namevalue(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 nameoperation(String): Operation nameargs(Object[]): Arguments
- Output (
String): String representation of the return value of the operation or "null"
Jolokia Version Compatibility
The following table shows the Jolokia versions compatible with each release of jolokia-mcp-server.
| jolokia-mcp-server | Jolokia |
|---|---|
| 0.6.x | 2.6.1 – 2.6.3 |
| 0.5.x | 2.4.3 – 2.6.0 |
| 0.4.x | 2.2.9 – 2.4.3 |
| 0.3.x | 2.2.8 – 2.2.9 |
| 0.2.x | 2.2.8 |
| 0.1.x | 2.2.8 |
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.6.1-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.6.1:runner"
]
}
}
}
JVM Agent
Download the MCP server javaagent jar:
Then run your Java application with -javaagent option:
java -javaagent:jolokia-mcp-agent-jvm-0.6.1-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.6.1-runner.jar [Jolokia URL]
Using JBang, you can directly run it with the Maven GAV (org.jolokia.mcp:jolokia-mcp-server:0.6.1:runner):
jbang org.jolokia.mcp:jolokia-mcp-server:0.6.1:runner
HTTP Transport
By default, this MCP server runs with stdio transport. To switch it to HTTP transport, use the --http option:
java -jar jolokia-mcp-server-0.6.1-runner.jar --http
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 |
--http | false (stdio) | Enable HTTP transport |
--sse | false (stdio) | Deprecated. Use --http |
--port=<number> | 8080 | The port for the HTTP endpoint. Equivalent to -Dquarkus.http.port=<number>. When the option is set, HTTP is always enabled |
--method=<GET|POST> | Preferred HTTP method for Jolokia requests (GET or POST). Equivalent to -Djolokia.mcp.preferred-http-method=<method> | |
-D*=* | System properties |
The system properties that are relevant to the MCP server:
| System property | Default | Description |
|---|---|---|
quarkus.http.port | 8080 | (HTTP) The port for the HTTP endpoint |
jolokia.mcp.url | http://localhost:8778/jolokia | Equivalent to the positional parameter |
jolokia.mcp.preferred-http-method | Not set | Preferred HTTP method for Jolokia requests (GET or POST) |
Build
mvn clean install
Comments
New to MCP?
From what the protocol is to installing your first server, these answers cover most first questions.
An open protocol that defines how AI applications connect to external tools and data in a uniform way. Clients talk to the model; MCP servers provide tools, resources and prompt templates. They exchange standard messages, so one server can be reused by many clients.