GitHub Copilot in the Eclipse IDE. This short tutorial explains how to install the GitHub Copilot plug-in for Eclipse, how to sign in, how to use code completions and Copilot Chat, and how to extend the agent with custom instructions and MCP servers.

1. Using GitHub Copilot in Eclipse

GitHub Copilot is an AI coding assistant from GitHub. The official GitHub Copilot plug-in for the Eclipse IDE offers inline code completions, next edit suggestions and a chat view with an agent mode that can change files and run commands in your workspace.

To use it, you need a GitHub account with access to Copilot. The free Copilot plan is sufficient to get started, but it limits the number of completions and chat messages per month.

1.1. Installing the plug-in

The current release of the plug-in requires Eclipse 2024-03 or newer, and Eclipse 2024-09 or newer for MCP support. This changes with version 0.23.0 of the plug-in, which requires Eclipse 2025-12 and Java 21.

Install it via the Eclipse Marketplace:

  1. Select Help  Eclipse Marketplace…​.

  2. Search for GitHub Copilot and press Install.

  3. Restart Eclipse.

Alternatively, use Help  Install New Software…​ with the following update site.

https://azuredownloads-g3ahgwb5b8bkbxhd.b01.azurefd.net/github-copilot/

1.2. Signing in

After the restart, sign in with your GitHub account:

  1. Click the Copilot icon in the status bar at the bottom right of the workbench and select Sign In to GitHub.

  2. In the Sign In to GitHub dialog, click Copy Code and Open. This copies a device code and opens the GitHub device activation page in your browser.

  3. Paste the code, click Continue and then Authorize GitHub Copilot Plugin.

  4. Confirm the dialog in Eclipse with OK.

The Copilot status bar icon is also the entry point for the other Copilot actions, for example, opening the chat or the Copilot preferences.

1.3. Using code completions

Copilot suggests code as you type, displayed as grey ghost text in the editor. For example, type the following method signature in a Java class and wait a moment.

public int getDiff(int a, int b)

You can also describe the intended code in a comment and let Copilot suggest the implementation below it.

The following shortcuts control the suggestions:

Shortcut Action

Tab

Accept the suggestion

Esc

Dismiss the suggestion

Ctrl+→ (macOS: Cmd+→)

Accept only the next word of the suggestion

Ctrl+Alt+/ (macOS: Option+Cmd+/)

Request a suggestion manually

Copilot also offers next edit suggestions. Based on your last change, it predicts the next location you probably want to edit, for example, other usages of a renamed variable. An arrow in the editor gutter indicates such a suggestion. Press Tab to navigate to it and Tab again to accept it.

1.4. Using Copilot Chat and agent mode

To open the chat, click the Copilot icon in the status bar and select Open Chat. Enter a prompt in the prompt box and press Enter. Type / in the prompt box to see the available slash commands, for example, /explain to explain the selected code.

Use the agents dropdown at the bottom of the chat panel to switch the mode, and the model picker to select the AI model. The most important modes are:

Ask

Copilot answers questions about your code without changing it.

Agent

Copilot works autonomously on a task. It reads and edits files in your workspace and can propose terminal commands, which you confirm before they run. Agent mode is the default mode.

Plan

Copilot analyzes the task and creates a step-by-step plan which you can review before any code is changed.

1.5. Adding custom instructions

Custom instructions tell Copilot about the conventions of your project, for example, the build commands or the preferred libraries. Create a .github/copilot-instructions.md file in the root of your project and describe these conventions in natural language. Copilot adds the content of this file to every chat request.

This is a Java 21 project built with Maven.
Use JUnit 5 and AssertJ for tests.
Run `mvn verify` to build and test the project.

You can also define workspace-wide instructions via the Copilot status bar icon and Edit preferences. Select GitHub Copilot  Custom Instructions, enable Enable workspace instructions and enter your instructions in the Workspace section.

Custom instructions in Eclipse are a public preview feature and may change.

1.6. Extending the agent with MCP servers

The Model Context Protocol (MCP) allows the agent to use additional tools, for example, to access GitHub issues or a database.

The easiest way to add an MCP server is the MCP registry:

  1. Open Copilot Chat and click the MCP icon in the chat panel.

  2. In the MCP Registry window, click Install next to the servers you want to use, then click Close.

  3. Click the tools icon in the chat panel to see and select the tools available to the agent.

To configure a server manually, open the Copilot preferences via the status bar icon and Edit preferences and select the MCP preference page below GitHub Copilot. Add the server definition in JSON format under Server Configurations. Eclipse supports both local servers, which are started as a process, and remote servers, which are accessed via a URL.

If your Copilot license is managed by an organization, an administrator must enable the MCP servers in Copilot policy before you can use MCP servers.

2. Links and literature

Home Tutorials Training Consulting Books Company Contact us


Get more...