A NetBeans IDE plugin that provides integration with Claude Code through the Model Context Protocol (MCP).
- Automatic Detection: Creates a lock file that Claude Code CLI can discover
- WebSocket Communication: Establishes real-time communication using MCP over WebSocket
- IDE Integration: Provides access to NetBeans project structure, file operations, and editor content
- File Operations: Read, write, and list files through Claude Code
- Project Management: Access open projects and project files
- Document Access: Retrieve content from open documents in the editor
- NetBeans IDE 23.0 or later
- Java 11 or later
- Maven 3.6 or later
- Clone or download this project
- Navigate to the project directory
- Build the plugin:
mvn clean package- The plugin will be built as
target/claude-code-netbeans-1.0.0.nbm
- Open NetBeans IDE
- Go to Tools > Plugins
- Click the Downloaded tab
- Click Add Plugins... and select the
.nbmfile - Follow the installation wizard
- Restart NetBeans when prompted
The plugin automatically starts when NetBeans launches and:
- Creates Lock File: Writes connection information to
~/.claude/ide/{port}.lock - Starts WebSocket Server: Listens on an available port (8990-9100 range)
- Updates on Changes: Refreshes workspace information when projects are opened/closed
-
Install Claude Code: Follow the official installation guide
-
Start NetBeans: Open NetBeans with your project
-
Run Claude Code: In any terminal, run:
claude
-
Verify Connection: Claude Code should automatically detect NetBeans. You can verify with:
/ide
The plugin provides these tools to Claude Code:
read_file: Read file contentswrite_file: Write content to fileslist_files: List directory contents
get_open_projects: List all open projectsget_project_files: Get files in a specific project
get_open_documents: List open documentsget_document_content: Get content from open documents
Check the plugin status through Tools > Claude Code Status in the NetBeans menu.
- ClaudeCodeInstaller: Main plugin lifecycle manager
- LockFileManager: Handles lock file creation and updates
- WebSocketMCPServer: WebSocket server for MCP communication
- NetBeansMCPHandler: Processes MCP messages and provides IDE capabilities
- MCPWebSocketHandler: WebSocket message routing
Claude Code CLI → WebSocket → NetBeans Plugin → NetBeans IDE APIs
← ← ←
{
"pid": 12345,
"ideName": "NetBeans",
"transport": "ws",
"port": 8991,
"workspaceFolders": ["/path/to/project"]
}src/main/java/org/openbeans/claude/netbeans/
├── ClaudeCodeInstaller.java # Plugin lifecycle
├── LockFileManager.java # Lock file management
├── WebSocketMCPServer.java # WebSocket server
├── MCPWebSocketHandler.java # WebSocket message handler
├── NetBeansMCPHandler.java # MCP protocol implementation
└── ClaudeCodeAction.java # Status action
src/main/resources/
├── org/openbeans/claude/netbeans/Bundle.properties
└── META-INF/services/org.openide.modules.ModuleInstall
src/main/nbm/
└── manifest.mf # Plugin manifest
- NetBeans Platform APIs: IDE integration
- Model Context Protocol SDK: MCP implementation
- Jetty WebSocket: WebSocket server
- Jackson: JSON processing
# Build and install in development NetBeans
mvn clean install nbm:run-ide
# Package for distribution
mvn clean package- Check NetBeans logs: View > IDE Log
- Verify Java 11+ is being used
- Ensure all dependencies are available
- Verify lock file exists:
~/.claude/ide/{port}.lock - Check if WebSocket port is accessible
- Review plugin status: Tools > Claude Code Status
- Check firewall settings for the port range (8990-9100)
- Verify no other applications are using the ports
- Review NetBeans and plugin logs
- Fork the repository
- Create a feature branch
- Make your changes
- Add tests if applicable
- Submit a pull request
See the LICENSE file for details.
For issues and questions:
- Check the NetBeans IDE logs
- Review Claude Code documentation
- Create an issue in the project repository