Turn it on
1
Open the settings page
Go to Settings › Tools › MCP Server.
2
Enable it
Turn on Enable MCP server and apply. It is off by default.
3
Check the status
Status shows the port it is running on, or why it failed to start. Endpoint shows the URL for the current
window’s project.
127.0.0.1 only, on a random port, and every request must carry a token that changes each time OpenIDEA starts. Requests from another origin or host are refused.
Connect a client
The settings page has two buttons under Client configuration. Both copy anmcpServers entry in the JSON format most clients accept.
- Copy Stdio Config (recommended): the client starts OpenIDEA’s executable with
--mcp-stdio, which relays to the running IDE. It holds no token and keeps working after OpenIDEA restarts. - Copy HTTP Config: the client connects to
http://127.0.0.1:<port>/mcpwithAuthorization: Bearer <token>. It stops working when OpenIDEA restarts, because the port and token change.
--project names the project the client works on. Leave it out and the bridge uses the directory the client starts it in, so one configuration works for every project you open in OpenIDEA.
- Claude Code
- Codex
- Other clients
Add the server for the current project from a terminal in the project directory:Or paste the copied JSON into a
.mcp.json file at the project root to share it with your team.openidea.exe in the installation (or portable) folder.
OpenIDEA must be running with the project open for the tools to work. A client may name any folder inside an open project; the server picks the open project that contains it. HTTP clients name it with the X-OpenIDEA-Project header or the ?project= query.
While the server runs, OpenIDEA writes its port and token to mcp/server.json in its application data directory (readable only by you); the stdio bridge reads it from there.
Tools
Notes on what they do:
read_filealso reads sources of dependencies and files inside jar and zip archives.search_symbolandfind_referencesuse the IDE’s index and the language servers;get_symbol_inforeturns what Quick Documentation shows.get_file_problemsandget_project_problemsreturn what the Problems tool window shows, after your inspection profile is applied, rather than a fresh analysis.rename_refactoringrenames through the language server, so references that a text search would miss are updated too. It can preview without writing.apply_patchaccepts the Codexapply_patchformat and unified diffs. Paths must stay inside the project.git_diffcompares files on disk, so unsaved editor text is not included.
Safety
- Untrusted projects expose only the read-only tools. Tools that write files, rename, reformat, build or run need a project you have trusted.
- Running and building ask first.
execute_run_configurationandbuild_projectshow a dialog in OpenIDEA naming the client, the project, the tool and what will run. Choose Allow or Deny; several requests queue up. - Tools that write refuse paths outside the project.
Limits
- Remote projects (opened over SSH, on a server or in a container) are not supported by the MCP server yet.
- The server serves only projects open in OpenIDEA. Closing the project’s window makes its tools unavailable.
- Responses are plain JSON; the server does not stream over SSE.