Question
I need to enable the MCP Server on the headless IDE backend without connecting to it and opening Settings.
Answer
Define the following VM options using JAVA_TOOL_OPTIONS environment variable.
export JAVA_TOOL_OPTIONS="-Didea.mcp.server.force.enable=true -Didea.mcp.server.force.port=64342"
If you use an IDE backend in Docker, you define the same environment variable in devcontainer.json.
"containerEnv": {
"JAVA_TOOL_OPTIONS": "-Didea.mcp.server.force.enable=true -Didea.mcp.server.force.port=64342"
}
You can now use the following endpoints.
http://127.0.0.1:64342/sse
http://127.0.0.1:64342/stream
To check it is working, do a quick test with curl.
curl -v --max-time 2 http://127.0.0.1:64342/stream
Comments
0 comments
Please sign in to leave a comment.