Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

extensions/intellij/README.md

Raw
Rendered preview
intellij

intellij

Open Pi's current project in IntelliJ and expose its MCP tools.

Installation

Setup

In IntelliJ, open Settings | Tools | MCP Server | Manual Client Configuration. Copy its HTTP Stream URL into Pi's existing intellij.url setting.

{
	"intellij": {
		"url": "http://127.0.0.1:PORT/ENDPOINT"
	}
}

Pi reads trusted project settings first, then user settings. Untrusted project settings are ignored. The URL must be loopback HTTP without embedded credentials. Invalid values produce a warning and never fall through to another source.

Use

Run /intellij launch to open the nearest project containing an .idea directory above Pi's current directory. Launching works without intellij.url and leaves Pi's current directory unchanged. Add IntelliJ's command-line launcher to PATH: idea on macOS/Linux; idea64.exe, idea.exe, idea.cmd, or idea.bat on Windows. Windows batch launchers also require COMSPEC; paths containing %, !, or double quotes require a native .exe launcher. A successful launch request does not mean IntelliJ or its MCP server is ready yet. Once ready, use /mcp to reconnect if needed.

Pi searches upward from its current directory for the nearest .idea directory. When both .idea and valid intellij.url exist, it registers the intellij MCP server for the current session. Pi's built-in MCP support owns connection, retry, discovery, status, and /mcp management. Tools use native names such as mcp__intellij__get_project_modules and are discovered through tool search. Use /mcp to inspect, reconnect, disable, or change their exposure. Tool arguments, including projectPath, are sent unchanged. No connection occurs without both conditions; launching is explicit and never writes Pi configuration.

SDK sessions must load createMcpExtension() explicitly; add tool search or codemode when using indirect exposure. Each Pi session owns its connection, so concurrent sessions can use different endpoint URLs. IntelliJ starts only when you run /intellij launch.

Reference

Commands

Command Purpose
/intellij Launch IntelliJ for the project containing Pi's cwd

Setting names

Setting
intellij.url
<img src="assets/banner.svg" alt="intellij" height="70">

# intellij

Open Pi's current project in IntelliJ and expose its MCP tools.

[Installation](../../README.md#install)

## Setup

In IntelliJ, open **Settings | Tools | MCP Server | Manual Client Configuration**.
Copy its HTTP Stream URL into Pi's existing `intellij.url` setting.

```json
{
	"intellij": {
		"url": "http://127.0.0.1:PORT/ENDPOINT"
	}
}
```

Pi reads trusted project settings first, then user settings.
Untrusted project settings are ignored.
The URL must be loopback HTTP without embedded credentials.
Invalid values produce a warning and never fall through to another source.

## Use

Run `/intellij launch` to open the nearest project containing an `.idea` directory above Pi's current directory.
Launching works without `intellij.url` and leaves Pi's current directory unchanged.
Add IntelliJ's command-line launcher to `PATH`: `idea` on macOS/Linux; `idea64.exe`, `idea.exe`, `idea.cmd`, or `idea.bat` on Windows.
Windows batch launchers also require `COMSPEC`; paths containing `%`, `!`, or double quotes require a native `.exe` launcher.
A successful launch request does not mean IntelliJ or its MCP server is ready yet.
Once ready, use `/mcp` to reconnect if needed.

Pi searches upward from its current directory for the nearest `.idea` directory.
When both `.idea` and valid `intellij.url` exist, it registers the `intellij` MCP server for the current session.
Pi's built-in MCP support owns connection, retry, discovery, status, and `/mcp` management.
Tools use native names such as `mcp__intellij__get_project_modules` and are discovered through tool search.
Use `/mcp` to inspect, reconnect, disable, or change their exposure.
Tool arguments, including `projectPath`, are sent unchanged.
No connection occurs without both conditions; launching is explicit and never writes Pi configuration.

SDK sessions must load `createMcpExtension()` explicitly; add tool search or codemode when using indirect exposure.
Each Pi session owns its connection, so concurrent sessions can use different endpoint URLs.
IntelliJ starts only when you run `/intellij launch`.

## Reference

<!-- config:start -->
### Commands

| Command | Purpose |
| --- | --- |
| `/intellij` | Launch IntelliJ for the project containing Pi's cwd |

### Setting names

| Setting |
| --- |
| `intellij.url` |
<!-- config:end -->